Loading media/codec2/components/base/SimpleC2Component.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -45,23 +45,23 @@ void convertYUV420Planar8ToYV12(uint8_t *dstY, uint8_t *dstU, uint8_t *dstV, con if (isMonochrome) { // Fill with neutral U/V values. for (size_t i = 0; i < height / 2; ++i) { memset(dstV, kNeutralUVBitDepth8, width / 2); memset(dstU, kNeutralUVBitDepth8, width / 2); for (size_t i = 0; i < (height + 1) / 2; ++i) { memset(dstV, kNeutralUVBitDepth8, (width + 1) / 2); memset(dstU, kNeutralUVBitDepth8, (width + 1) / 2); dstV += dstUVStride; dstU += dstUVStride; } return; } for (size_t i = 0; i < height / 2; ++i) { memcpy(dstV, srcV, width / 2); for (size_t i = 0; i < (height + 1) / 2; ++i) { memcpy(dstV, srcV, (width + 1) / 2); srcV += srcVStride; dstV += dstUVStride; } for (size_t i = 0; i < height / 2; ++i) { memcpy(dstU, srcU, width / 2); for (size_t i = 0; i < (height + 1) / 2; ++i) { memcpy(dstU, srcU, (width + 1) / 2); srcU += srcUStride; dstU += dstUVStride; } Loading media/codec2/components/gav1/C2SoftGav1Dec.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ class C2SoftGav1Dec::IntfImpl : public SimpleInterface<void>::BaseParams { DefineParam(mSize, C2_PARAMKEY_PICTURE_SIZE) .withDefault(new C2StreamPictureSizeInfo::output(0u, 320, 240)) .withFields({ C2F(mSize, width).inRange(2, 4096, 2), C2F(mSize, height).inRange(2, 4096, 2), C2F(mSize, width).inRange(2, 4096), C2F(mSize, height).inRange(2, 4096), }) .withSetter(SizeSetter) .build()); Loading Loading @@ -650,8 +650,12 @@ bool C2SoftGav1Dec::outputBuffer(const std::shared_ptr<C2BlockPool> &pool, } C2MemoryUsage usage = {C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE}; c2_status_t err = pool->fetchGraphicBlock(align(mWidth, 16), mHeight, format, usage, &block); // We always create a graphic block that is width aligned to 16 and height // aligned to 2. We set the correct "crop" value of the image in the call to // createGraphicBuffer() by setting the correct image dimensions. c2_status_t err = pool->fetchGraphicBlock(align(mWidth, 16), align(mHeight, 2), format, usage, &block); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); Loading media/libstagefright/data/media_codecs_google_c2_video.xml +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ </MediaCodec> <MediaCodec name="c2.android.av1.decoder" type="video/av01"> <Limit name="size" min="96x96" max="1920x1080" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Limit name="blocks-per-second" min="24" max="2073600" /> <Limit name="bitrate" range="1-120000000" /> Loading media/libstagefright/data/media_codecs_sw.xml +1 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ </MediaCodec> <MediaCodec name="c2.android.av1.decoder" type="video/av01" variant="!slow-cpu"> <Limit name="size" min="2x2" max="2048x2048" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Limit name="block-count" range="1-16384" /> <Limit name="blocks-per-second" range="1-2073600" /> Loading Loading
media/codec2/components/base/SimpleC2Component.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -45,23 +45,23 @@ void convertYUV420Planar8ToYV12(uint8_t *dstY, uint8_t *dstU, uint8_t *dstV, con if (isMonochrome) { // Fill with neutral U/V values. for (size_t i = 0; i < height / 2; ++i) { memset(dstV, kNeutralUVBitDepth8, width / 2); memset(dstU, kNeutralUVBitDepth8, width / 2); for (size_t i = 0; i < (height + 1) / 2; ++i) { memset(dstV, kNeutralUVBitDepth8, (width + 1) / 2); memset(dstU, kNeutralUVBitDepth8, (width + 1) / 2); dstV += dstUVStride; dstU += dstUVStride; } return; } for (size_t i = 0; i < height / 2; ++i) { memcpy(dstV, srcV, width / 2); for (size_t i = 0; i < (height + 1) / 2; ++i) { memcpy(dstV, srcV, (width + 1) / 2); srcV += srcVStride; dstV += dstUVStride; } for (size_t i = 0; i < height / 2; ++i) { memcpy(dstU, srcU, width / 2); for (size_t i = 0; i < (height + 1) / 2; ++i) { memcpy(dstU, srcU, (width + 1) / 2); srcU += srcUStride; dstU += dstUVStride; } Loading
media/codec2/components/gav1/C2SoftGav1Dec.cpp +8 −4 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ class C2SoftGav1Dec::IntfImpl : public SimpleInterface<void>::BaseParams { DefineParam(mSize, C2_PARAMKEY_PICTURE_SIZE) .withDefault(new C2StreamPictureSizeInfo::output(0u, 320, 240)) .withFields({ C2F(mSize, width).inRange(2, 4096, 2), C2F(mSize, height).inRange(2, 4096, 2), C2F(mSize, width).inRange(2, 4096), C2F(mSize, height).inRange(2, 4096), }) .withSetter(SizeSetter) .build()); Loading Loading @@ -650,8 +650,12 @@ bool C2SoftGav1Dec::outputBuffer(const std::shared_ptr<C2BlockPool> &pool, } C2MemoryUsage usage = {C2MemoryUsage::CPU_READ, C2MemoryUsage::CPU_WRITE}; c2_status_t err = pool->fetchGraphicBlock(align(mWidth, 16), mHeight, format, usage, &block); // We always create a graphic block that is width aligned to 16 and height // aligned to 2. We set the correct "crop" value of the image in the call to // createGraphicBuffer() by setting the correct image dimensions. c2_status_t err = pool->fetchGraphicBlock(align(mWidth, 16), align(mHeight, 2), format, usage, &block); if (err != C2_OK) { ALOGE("fetchGraphicBlock for Output failed with status %d", err); Loading
media/libstagefright/data/media_codecs_google_c2_video.xml +1 −1 Original line number Diff line number Diff line Loading @@ -79,7 +79,7 @@ </MediaCodec> <MediaCodec name="c2.android.av1.decoder" type="video/av01"> <Limit name="size" min="96x96" max="1920x1080" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Limit name="blocks-per-second" min="24" max="2073600" /> <Limit name="bitrate" range="1-120000000" /> Loading
media/libstagefright/data/media_codecs_sw.xml +1 −1 Original line number Diff line number Diff line Loading @@ -184,7 +184,7 @@ </MediaCodec> <MediaCodec name="c2.android.av1.decoder" type="video/av01" variant="!slow-cpu"> <Limit name="size" min="2x2" max="2048x2048" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Limit name="block-count" range="1-16384" /> <Limit name="blocks-per-second" range="1-2073600" /> Loading