Loading media/codec2/components/aom/C2SoftAomDec.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; // codecname set and passed in as a compile flag from Android.bp constexpr char COMPONENT_NAME[] = CODECNAME; Loading Loading @@ -112,7 +114,7 @@ class C2SoftAomDec::IntfImpl : public SimpleInterface<void>::BaseParams { addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault( new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 4)) new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -192,8 +194,8 @@ class C2SoftAomDec::IntfImpl : public SimpleInterface<void>::BaseParams { const C2P<C2StreamMaxPictureSizeTuning::output>& maxSize) { (void)mayBlock; // assume compression ratio of 2 me.set().value = (((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072); me.set().value = c2_max((((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072), kMinInputBufferSize); return C2R::Ok(); } static C2R DefaultColorAspectsSetter(bool mayBlock, C2P<C2StreamColorAspectsTuning::output> &me) { Loading media/codec2/components/avc/C2SoftAvcDec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ namespace android { namespace { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; constexpr char COMPONENT_NAME[] = "c2.android.avc.decoder"; constexpr uint32_t kDefaultOutputDelay = 8; constexpr uint32_t kMaxOutputDelay = 16; Loading Loading @@ -114,7 +114,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 4)) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -227,7 +227,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 2 me.set().value = (((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 192); me.set().value = c2_max((((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 192), kMinInputBufferSize); return C2R::Ok(); } Loading media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ #include "impeg2d.h" namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; constexpr char COMPONENT_NAME[] = "c2.android.mpeg2.decoder"; class C2SoftMpeg2Dec::IntfImpl : public SimpleInterface<void>::BaseParams { Loading Loading @@ -99,7 +99,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 2)) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -213,7 +213,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 1 me.set().value = (((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384); me.set().value = c2_max((((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384), kMinInputBufferSize); return C2R::Ok(); } Loading media/codec2/components/mpeg4_h263/C2SoftMpeg4Dec.cpp +4 −7 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ #include "mp4dec_api.h" namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; #ifdef MPEG4 constexpr char COMPONENT_NAME[] = "c2.android.mpeg4.decoder"; #else Loading Loading @@ -149,11 +149,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) #ifdef MPEG4 .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 1920 * 1088 * 3 / 2)) #else .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 352 * 288 * 3 / 2)) #endif .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -218,7 +214,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 1 me.set().value = (((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384); me.set().value = c2_max((((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384), kMinInputBufferSize); return C2R::Ok(); } Loading media/codec2/components/vpx/C2SoftVpxDec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ #include "C2SoftVpxDec.h" namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; #ifdef VP9 constexpr char COMPONENT_NAME[] = "c2.android.vp9.decoder"; #else Loading Loading @@ -166,7 +166,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 4)) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -244,7 +244,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 2 me.set().value = (((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072); me.set().value = c2_max((((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072), kMinInputBufferSize); return C2R::Ok(); } Loading Loading
media/codec2/components/aom/C2SoftAomDec.cpp +5 −3 Original line number Diff line number Diff line Loading @@ -29,6 +29,8 @@ namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; // codecname set and passed in as a compile flag from Android.bp constexpr char COMPONENT_NAME[] = CODECNAME; Loading Loading @@ -112,7 +114,7 @@ class C2SoftAomDec::IntfImpl : public SimpleInterface<void>::BaseParams { addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault( new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 4)) new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -192,8 +194,8 @@ class C2SoftAomDec::IntfImpl : public SimpleInterface<void>::BaseParams { const C2P<C2StreamMaxPictureSizeTuning::output>& maxSize) { (void)mayBlock; // assume compression ratio of 2 me.set().value = (((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072); me.set().value = c2_max((((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072), kMinInputBufferSize); return C2R::Ok(); } static C2R DefaultColorAspectsSetter(bool mayBlock, C2P<C2StreamColorAspectsTuning::output> &me) { Loading
media/codec2/components/avc/C2SoftAvcDec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ namespace android { namespace { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; constexpr char COMPONENT_NAME[] = "c2.android.avc.decoder"; constexpr uint32_t kDefaultOutputDelay = 8; constexpr uint32_t kMaxOutputDelay = 16; Loading Loading @@ -114,7 +114,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 4)) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -227,7 +227,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 2 me.set().value = (((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 192); me.set().value = c2_max((((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 192), kMinInputBufferSize); return C2R::Ok(); } Loading
media/codec2/components/mpeg2/C2SoftMpeg2Dec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ #include "impeg2d.h" namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; constexpr char COMPONENT_NAME[] = "c2.android.mpeg2.decoder"; class C2SoftMpeg2Dec::IntfImpl : public SimpleInterface<void>::BaseParams { Loading Loading @@ -99,7 +99,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 2)) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -213,7 +213,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 1 me.set().value = (((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384); me.set().value = c2_max((((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384), kMinInputBufferSize); return C2R::Ok(); } Loading
media/codec2/components/mpeg4_h263/C2SoftMpeg4Dec.cpp +4 −7 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ #include "mp4dec_api.h" namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; #ifdef MPEG4 constexpr char COMPONENT_NAME[] = "c2.android.mpeg4.decoder"; #else Loading Loading @@ -149,11 +149,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) #ifdef MPEG4 .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 1920 * 1088 * 3 / 2)) #else .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 352 * 288 * 3 / 2)) #endif .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -218,7 +214,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 1 me.set().value = (((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384); me.set().value = c2_max((((maxSize.v.width + 15) / 16) * ((maxSize.v.height + 15) / 16) * 384), kMinInputBufferSize); return C2R::Ok(); } Loading
media/codec2/components/vpx/C2SoftVpxDec.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ #include "C2SoftVpxDec.h" namespace android { constexpr size_t kMinInputBufferSize = 2 * 1024 * 1024; #ifdef VP9 constexpr char COMPONENT_NAME[] = "c2.android.vp9.decoder"; #else Loading Loading @@ -166,7 +166,7 @@ public: addParameter( DefineParam(mMaxInputSize, C2_PARAMKEY_INPUT_MAX_BUFFER_SIZE) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, 320 * 240 * 3 / 4)) .withDefault(new C2StreamMaxBufferSizeInfo::input(0u, kMinInputBufferSize)) .withFields({ C2F(mMaxInputSize, value).any(), }) Loading Loading @@ -244,7 +244,8 @@ public: const C2P<C2StreamMaxPictureSizeTuning::output> &maxSize) { (void)mayBlock; // assume compression ratio of 2 me.set().value = (((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072); me.set().value = c2_max((((maxSize.v.width + 63) / 64) * ((maxSize.v.height + 63) / 64) * 3072), kMinInputBufferSize); return C2R::Ok(); } Loading