Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1f8832f authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7314842 from 24ea4949 to sc-release

Change-Id: I7fb4fee6e8f0c8039d3e3bc5cadd0a97b5f260e1
parents 4b643229 24ea4949
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+7 −0
Original line number Diff line number Diff line
@@ -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,
};
@@ -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 {
+6 −4
Original line number Diff line number Diff line
@@ -234,9 +234,11 @@ struct id3_header {
    }

    // first handle global unsynchronization
    bool hasGlobalUnsync = false;
    if (header.flags & 0x80) {
        ALOGV("removing unsynchronization");

        hasGlobalUnsync = true;
        removeUnsynchronization();
    }

@@ -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");
@@ -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;
@@ -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.

+1 −1
Original line number Diff line number Diff line
@@ -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);