Loading media/codec2/components/aom/C2SoftAomEnc.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -50,11 +50,13 @@ C2SoftAomEnc::IntfImpl::IntfImpl(const std::shared_ptr<C2ReflectorHelper>& helpe 0u, (uint64_t)C2MemoryUsage::CPU_READ)) .build()); // Odd dimension support in encoders requires Android V and above size_t stepSize = isAtLeastV() ? 1 : 2; addParameter(DefineParam(mSize, C2_PARAMKEY_PICTURE_SIZE) .withDefault(new C2StreamPictureSizeInfo::input(0u, 320, 240)) .withFields({ C2F(mSize, width).inRange(2, 2048, 2), C2F(mSize, height).inRange(2, 2048, 2), C2F(mSize, width).inRange(2, 2048, stepSize), C2F(mSize, height).inRange(2, 2048, stepSize), }) .withSetter(SizeSetter) .build()); Loading media/codec2/components/vpx/C2SoftVpxEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <media/hardware/VideoAPI.h> #include <Codec2BufferUtils.h> #include <Codec2CommonUtils.h> #include <C2Debug.h> #include "C2SoftVpxEnc.h" Loading Loading @@ -63,12 +64,14 @@ C2SoftVpxEnc::IntfImpl::IntfImpl(const std::shared_ptr<C2ReflectorHelper> &helpe 0u, (uint64_t)C2MemoryUsage::CPU_READ)) .build()); // Odd dimension support in encoders requires Android V and above size_t stepSize = isAtLeastV() ? 1 : 2; addParameter( DefineParam(mSize, C2_PARAMKEY_PICTURE_SIZE) .withDefault(new C2StreamPictureSizeInfo::input(0u, 64, 64)) .withFields({ C2F(mSize, width).inRange(2, 2048, 2), C2F(mSize, height).inRange(2, 2048, 2), C2F(mSize, width).inRange(2, 2048, stepSize), C2F(mSize, height).inRange(2, 2048, stepSize), }) .withSetter(SizeSetter) .build()); Loading media/codec2/sfplugin/utils/Codec2CommonUtils.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ bool isAtLeastU() { return isAtLeast(__ANDROID_API_U__, "UpsideDownCake"); } bool isAtLeastV() { return isAtLeast(__ANDROID_API_V__, "VanillaIceCream"); } static bool isP010Allowed() { // The Vendor API level which is min(ro.product.first_api_level, ro.board.[first_]api_level). // This is the api level to which VSR requirement the device conform. Loading media/codec2/sfplugin/utils/Codec2CommonUtils.h +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ bool isAtLeastT(); bool isAtLeastU(); bool isAtLeastV(); bool isVendorApiOrFirstApiAtLeastT(); /** Loading media/libstagefright/data/media_codecs_sw.xml +3 −3 Original line number Diff line number Diff line Loading @@ -335,7 +335,7 @@ </MediaCodec> <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" variant="slow-cpu,!slow-cpu"> <Alias name="OMX.google.vp8.encoder" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Variant name="!slow-cpu"> <Limit name="size" min="2x2" max="2048x2048" /> Loading Loading @@ -371,7 +371,7 @@ <Alias name="OMX.google.vp9.encoder" /> <!-- profiles and levels: ProfileMain : Level_Version0-3 --> <Limit name="size" min="2x2" max="2048x2048" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <!-- 2016 devices can encode at about 8fps at this block count --> <Limit name="block-count" range="1-3600" /> <!-- max 1280x720 --> Loading @@ -380,7 +380,7 @@ <Attribute name="software-codec" /> </MediaCodec> <MediaCodec name="c2.android.av1.encoder" type="video/av01" enabled="false" minsdk="34" variant="slow-cpu,!slow-cpu"> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Variant name="!slow-cpu"> <Limit name="size" min="2x2" max="1920x1920" /> Loading Loading
media/codec2/components/aom/C2SoftAomEnc.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -50,11 +50,13 @@ C2SoftAomEnc::IntfImpl::IntfImpl(const std::shared_ptr<C2ReflectorHelper>& helpe 0u, (uint64_t)C2MemoryUsage::CPU_READ)) .build()); // Odd dimension support in encoders requires Android V and above size_t stepSize = isAtLeastV() ? 1 : 2; addParameter(DefineParam(mSize, C2_PARAMKEY_PICTURE_SIZE) .withDefault(new C2StreamPictureSizeInfo::input(0u, 320, 240)) .withFields({ C2F(mSize, width).inRange(2, 2048, 2), C2F(mSize, height).inRange(2, 2048, 2), C2F(mSize, width).inRange(2, 2048, stepSize), C2F(mSize, height).inRange(2, 2048, stepSize), }) .withSetter(SizeSetter) .build()); Loading
media/codec2/components/vpx/C2SoftVpxEnc.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <media/hardware/VideoAPI.h> #include <Codec2BufferUtils.h> #include <Codec2CommonUtils.h> #include <C2Debug.h> #include "C2SoftVpxEnc.h" Loading Loading @@ -63,12 +64,14 @@ C2SoftVpxEnc::IntfImpl::IntfImpl(const std::shared_ptr<C2ReflectorHelper> &helpe 0u, (uint64_t)C2MemoryUsage::CPU_READ)) .build()); // Odd dimension support in encoders requires Android V and above size_t stepSize = isAtLeastV() ? 1 : 2; addParameter( DefineParam(mSize, C2_PARAMKEY_PICTURE_SIZE) .withDefault(new C2StreamPictureSizeInfo::input(0u, 64, 64)) .withFields({ C2F(mSize, width).inRange(2, 2048, 2), C2F(mSize, height).inRange(2, 2048, 2), C2F(mSize, width).inRange(2, 2048, stepSize), C2F(mSize, height).inRange(2, 2048, stepSize), }) .withSetter(SizeSetter) .build()); Loading
media/codec2/sfplugin/utils/Codec2CommonUtils.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -46,6 +46,10 @@ bool isAtLeastU() { return isAtLeast(__ANDROID_API_U__, "UpsideDownCake"); } bool isAtLeastV() { return isAtLeast(__ANDROID_API_V__, "VanillaIceCream"); } static bool isP010Allowed() { // The Vendor API level which is min(ro.product.first_api_level, ro.board.[first_]api_level). // This is the api level to which VSR requirement the device conform. Loading
media/codec2/sfplugin/utils/Codec2CommonUtils.h +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,8 @@ bool isAtLeastT(); bool isAtLeastU(); bool isAtLeastV(); bool isVendorApiOrFirstApiAtLeastT(); /** Loading
media/libstagefright/data/media_codecs_sw.xml +3 −3 Original line number Diff line number Diff line Loading @@ -335,7 +335,7 @@ </MediaCodec> <MediaCodec name="c2.android.vp8.encoder" type="video/x-vnd.on2.vp8" variant="slow-cpu,!slow-cpu"> <Alias name="OMX.google.vp8.encoder" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Variant name="!slow-cpu"> <Limit name="size" min="2x2" max="2048x2048" /> Loading Loading @@ -371,7 +371,7 @@ <Alias name="OMX.google.vp9.encoder" /> <!-- profiles and levels: ProfileMain : Level_Version0-3 --> <Limit name="size" min="2x2" max="2048x2048" /> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <!-- 2016 devices can encode at about 8fps at this block count --> <Limit name="block-count" range="1-3600" /> <!-- max 1280x720 --> Loading @@ -380,7 +380,7 @@ <Attribute name="software-codec" /> </MediaCodec> <MediaCodec name="c2.android.av1.encoder" type="video/av01" enabled="false" minsdk="34" variant="slow-cpu,!slow-cpu"> <Limit name="alignment" value="2x2" /> <Limit name="alignment" value="1x1" /> <Limit name="block-size" value="16x16" /> <Variant name="!slow-cpu"> <Limit name="size" min="2x2" max="1920x1920" /> Loading