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

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

Snap for 5702458 from aba76c4d to qt-release

Change-Id: I8e253b7a86619201d31a2f051c9b3b2caf53a6f8
parents c265107a aba76c4d
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -176,9 +176,9 @@ public:
            DIR_INPUT      = 0x00000000,
            DIR_OUTPUT     = 0x10000000,

            IS_STREAM_FLAG  = 0x00100000,
            STREAM_ID_MASK  = 0x03E00000,
            STREAM_ID_SHIFT = 21,
            IS_STREAM_FLAG  = 0x02000000,
            STREAM_ID_MASK  = 0x01F00000,
            STREAM_ID_SHIFT = 20,
            MAX_STREAM_ID   = STREAM_ID_MASK >> STREAM_ID_SHIFT,
            STREAM_MASK     = IS_STREAM_FLAG | STREAM_ID_MASK,

+1 −1
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@
 */

cc_test {
    name: "VtsHalMeidaC2V1_0TargetVideoDecTest",
    name: "VtsHalMediaC2V1_0TargetVideoDecTest",
    defaults: ["VtsHalMediaC2V1_0Defaults"],
    srcs: ["VtsHalMediaC2V1_0TargetVideoDecTest.cpp"],
}
+9 −4
Original line number Diff line number Diff line
@@ -46,6 +46,10 @@ class LinearBuffer : public C2Buffer {
    explicit LinearBuffer(const std::shared_ptr<C2LinearBlock>& block)
        : C2Buffer(
              {block->share(block->offset(), block->size(), ::C2Fence())}) {}

    explicit LinearBuffer(const std::shared_ptr<C2LinearBlock>& block, size_t size)
        : C2Buffer(
              {block->share(block->offset(), size, ::C2Fence())}) {}
};

static ComponentTestEnvironment* gEnv = nullptr;
@@ -371,11 +375,12 @@ void decodeNFrames(const std::shared_ptr<android::Codec2Client::Component>& comp
        ASSERT_EQ(eleStream.gcount(), size);

        work->input.buffers.clear();
        auto alignedSize = ALIGN(size, PAGE_SIZE);
        if (size) {
            std::shared_ptr<C2LinearBlock> block;
            ASSERT_EQ(C2_OK,
                    linearPool->fetchLinearBlock(
                        size, {C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE},
                        alignedSize, {C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE},
                        &block));
            ASSERT_TRUE(block);

@@ -385,13 +390,13 @@ void decodeNFrames(const std::shared_ptr<android::Codec2Client::Component>& comp
                fprintf(stderr, "C2LinearBlock::map() failed : %d", view.error());
                break;
            }
            ASSERT_EQ((size_t)size, view.capacity());
            ASSERT_EQ((size_t)alignedSize, view.capacity());
            ASSERT_EQ(0u, view.offset());
            ASSERT_EQ((size_t)size, view.size());
            ASSERT_EQ((size_t)alignedSize, view.size());

            memcpy(view.base(), data, size);

            work->input.buffers.emplace_back(new LinearBuffer(block));
            work->input.buffers.emplace_back(new LinearBuffer(block, size));
            free(data);
        }
        work->worklets.clear();
+2 −0
Original line number Diff line number Diff line
@@ -23,6 +23,8 @@
#define ENC_DEFAULT_FRAME_HEIGHT 288
#define MAX_ITERATIONS 128

#define ALIGN(_sz, _align) ((_sz + (_align - 1)) & ~(_align - 1))

/*
 * Common video utils
 */