Loading media/bufferpool/2.0/BufferPoolClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ namespace bufferpool { namespace V2_0 { namespace implementation { static constexpr int64_t kReceiveTimeoutUs = 1000000; // 100ms static constexpr int64_t kReceiveTimeoutUs = 2000000; // 2s static constexpr int kPostMaxRetry = 3; static constexpr int kCacheTtlUs = 1000000; // TODO: tune static constexpr size_t kMaxCachedBufferCount = 64; Loading media/codec2/core/include/C2Config.h +7 −0 Original line number Diff line number Diff line Loading @@ -394,6 +394,7 @@ enum : uint32_t { _C2_PL_VP9_BASE = 0x7000, _C2_PL_DV_BASE = 0x8000, _C2_PL_AV1_BASE = 0x9000, _C2_PL_VP8_BASE = 0xA000, C2_PROFILE_LEVEL_VENDOR_START = 0x70000000, }; Loading Loading @@ -547,6 +548,12 @@ enum C2Config::profile_t : uint32_t { PROFILE_AV1_0 = _C2_PL_AV1_BASE, ///< AV1 Profile 0 (4:2:0, 8 to 10 bit) PROFILE_AV1_1, ///< AV1 Profile 1 (8 to 10 bit) PROFILE_AV1_2, ///< AV1 Profile 2 (8 to 12 bit) // VP8 profiles PROFILE_VP8_0 = _C2_PL_VP8_BASE, ///< VP8 Profile 0 PROFILE_VP8_1, ///< VP8 Profile 1 PROFILE_VP8_2, ///< VP8 Profile 2 PROFILE_VP8_3, ///< VP8 Profile 3 }; enum C2Config::level_t : uint32_t { Loading media/libstagefright/id3/ID3.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -234,9 +234,11 @@ struct id3_header { } // first handle global unsynchronization bool hasGlobalUnsync = false; if (header.flags & 0x80) { ALOGV("removing unsynchronization"); hasGlobalUnsync = true; removeUnsynchronization(); } Loading Loading @@ -341,12 +343,12 @@ struct id3_header { memcpy(copy, mData, size); bool success = removeUnsynchronizationV2_4(false /* iTunesHack */); bool success = removeUnsynchronizationV2_4(false /* iTunesHack */, hasGlobalUnsync); if (!success) { memcpy(mData, copy, size); mSize = size; success = removeUnsynchronizationV2_4(true /* iTunesHack */); success = removeUnsynchronizationV2_4(true /* iTunesHack */, hasGlobalUnsync); if (success) { ALOGV("Had to apply the iTunes hack to parse this ID3 tag"); Loading Loading @@ -407,7 +409,7 @@ static void WriteSyncsafeInteger(uint8_t *dst, size_t x) { } } bool ID3::removeUnsynchronizationV2_4(bool iTunesHack) { bool ID3::removeUnsynchronizationV2_4(bool iTunesHack, bool hasGlobalUnsync) { size_t oldSize = mSize; size_t offset = mFirstFrameOffset; Loading Loading @@ -443,7 +445,7 @@ bool ID3::removeUnsynchronizationV2_4(bool iTunesHack) { flags &= ~1; } if ((flags & 2) && (dataSize >= 2)) { if (!hasGlobalUnsync && (flags & 2) && (dataSize >= 2)) { // This frame has "unsynchronization", so we have to replace occurrences // of 0xff 0x00 with just 0xff in order to get the real data. Loading media/libstagefright/include/ID3.h +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ private: bool parseV1(DataSourceBase *source); bool parseV2(DataSourceBase *source, off64_t offset); void removeUnsynchronization(); bool removeUnsynchronizationV2_4(bool iTunesHack); bool removeUnsynchronizationV2_4(bool iTunesHack, bool hasGlobalUnsync); static bool ParseSyncsafeInteger(const uint8_t encoded[4], size_t *x); Loading Loading
media/bufferpool/2.0/BufferPoolClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ namespace bufferpool { namespace V2_0 { namespace implementation { static constexpr int64_t kReceiveTimeoutUs = 1000000; // 100ms static constexpr int64_t kReceiveTimeoutUs = 2000000; // 2s static constexpr int kPostMaxRetry = 3; static constexpr int kCacheTtlUs = 1000000; // TODO: tune static constexpr size_t kMaxCachedBufferCount = 64; Loading
media/codec2/core/include/C2Config.h +7 −0 Original line number Diff line number Diff line Loading @@ -394,6 +394,7 @@ enum : uint32_t { _C2_PL_VP9_BASE = 0x7000, _C2_PL_DV_BASE = 0x8000, _C2_PL_AV1_BASE = 0x9000, _C2_PL_VP8_BASE = 0xA000, C2_PROFILE_LEVEL_VENDOR_START = 0x70000000, }; Loading Loading @@ -547,6 +548,12 @@ enum C2Config::profile_t : uint32_t { PROFILE_AV1_0 = _C2_PL_AV1_BASE, ///< AV1 Profile 0 (4:2:0, 8 to 10 bit) PROFILE_AV1_1, ///< AV1 Profile 1 (8 to 10 bit) PROFILE_AV1_2, ///< AV1 Profile 2 (8 to 12 bit) // VP8 profiles PROFILE_VP8_0 = _C2_PL_VP8_BASE, ///< VP8 Profile 0 PROFILE_VP8_1, ///< VP8 Profile 1 PROFILE_VP8_2, ///< VP8 Profile 2 PROFILE_VP8_3, ///< VP8 Profile 3 }; enum C2Config::level_t : uint32_t { Loading
media/libstagefright/id3/ID3.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -234,9 +234,11 @@ struct id3_header { } // first handle global unsynchronization bool hasGlobalUnsync = false; if (header.flags & 0x80) { ALOGV("removing unsynchronization"); hasGlobalUnsync = true; removeUnsynchronization(); } Loading Loading @@ -341,12 +343,12 @@ struct id3_header { memcpy(copy, mData, size); bool success = removeUnsynchronizationV2_4(false /* iTunesHack */); bool success = removeUnsynchronizationV2_4(false /* iTunesHack */, hasGlobalUnsync); if (!success) { memcpy(mData, copy, size); mSize = size; success = removeUnsynchronizationV2_4(true /* iTunesHack */); success = removeUnsynchronizationV2_4(true /* iTunesHack */, hasGlobalUnsync); if (success) { ALOGV("Had to apply the iTunes hack to parse this ID3 tag"); Loading Loading @@ -407,7 +409,7 @@ static void WriteSyncsafeInteger(uint8_t *dst, size_t x) { } } bool ID3::removeUnsynchronizationV2_4(bool iTunesHack) { bool ID3::removeUnsynchronizationV2_4(bool iTunesHack, bool hasGlobalUnsync) { size_t oldSize = mSize; size_t offset = mFirstFrameOffset; Loading Loading @@ -443,7 +445,7 @@ bool ID3::removeUnsynchronizationV2_4(bool iTunesHack) { flags &= ~1; } if ((flags & 2) && (dataSize >= 2)) { if (!hasGlobalUnsync && (flags & 2) && (dataSize >= 2)) { // This frame has "unsynchronization", so we have to replace occurrences // of 0xff 0x00 with just 0xff in order to get the real data. Loading
media/libstagefright/include/ID3.h +1 −1 Original line number Diff line number Diff line Loading @@ -91,7 +91,7 @@ private: bool parseV1(DataSourceBase *source); bool parseV2(DataSourceBase *source, off64_t offset); void removeUnsynchronization(); bool removeUnsynchronizationV2_4(bool iTunesHack); bool removeUnsynchronizationV2_4(bool iTunesHack, bool hasGlobalUnsync); static bool ParseSyncsafeInteger(const uint8_t encoded[4], size_t *x); Loading