Loading media/codec2/components/aom/C2SoftAomEnc.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <media/stagefright/foundation/MediaDefs.h> #include <C2Debug.h> #include <Codec2CommonUtils.h> #include <Codec2Mapper.h> #include <C2PlatformSupport.h> #include <SimpleC2Interface.h> Loading Loading @@ -105,19 +106,18 @@ C2SoftAomEnc::IntfImpl::IntfImpl(const std::shared_ptr<C2ReflectorHelper>& helpe .withSetter(ProfileLevelSetter) .build()); std::vector<uint32_t> pixelFormats = {HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, HAL_PIXEL_FORMAT_YCBCR_420_888}; if (isHalPixelFormatSupported((AHardwareBuffer_Format)HAL_PIXEL_FORMAT_YCBCR_P010)) { pixelFormats.push_back(HAL_PIXEL_FORMAT_YCBCR_P010); } addParameter(DefineParam(mPixelFormat, C2_PARAMKEY_PIXEL_FORMAT) .withDefault(new C2StreamPixelFormatInfo::output( .withDefault(new C2StreamPixelFormatInfo::input( 0u, HAL_PIXEL_FORMAT_YCBCR_420_888)) .withFields({C2F(mPixelFormat, value).oneOf({ HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, HAL_PIXEL_FORMAT_YCBCR_420_888, HAL_PIXEL_FORMAT_YCBCR_P010 }) }) .withFields({C2F(mPixelFormat, value).oneOf({pixelFormats})}) .withSetter((Setter<decltype(*mPixelFormat)>::StrictValueWithNoDeps)) .build()); addParameter(DefineParam(mRequestSync, C2_PARAMKEY_REQUEST_SYNC_FRAME) .withDefault(new C2StreamRequestSyncFrameTuning::output(0u, C2_FALSE)) .withFields({C2F(mRequestSync, value).oneOf({C2_FALSE, C2_TRUE})}) Loading media/codec2/components/aom/C2SoftAomEnc.h +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ class C2SoftAomEnc::IntfImpl : public SimpleInterface<void>::BaseParams { std::shared_ptr<C2StreamColorAspectsInfo::output> getCodedColorAspects_l() const { return mCodedColorAspects; } std::shared_ptr<C2StreamPixelFormatInfo::output> getPixelFormat_l() const { std::shared_ptr<C2StreamPixelFormatInfo::input> getPixelFormat_l() const { return mPixelFormat; } uint32_t getSyncFramePeriod() const; Loading @@ -156,7 +156,7 @@ class C2SoftAomEnc::IntfImpl : public SimpleInterface<void>::BaseParams { std::shared_ptr<C2StreamProfileLevelInfo::output> mProfileLevel; std::shared_ptr<C2StreamColorAspectsInfo::input> mColorAspects; std::shared_ptr<C2StreamColorAspectsInfo::output> mCodedColorAspects; std::shared_ptr<C2StreamPixelFormatInfo::output> mPixelFormat; std::shared_ptr<C2StreamPixelFormatInfo::input> mPixelFormat; }; Loading Loading
media/codec2/components/aom/C2SoftAomEnc.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ #include <media/stagefright/foundation/MediaDefs.h> #include <C2Debug.h> #include <Codec2CommonUtils.h> #include <Codec2Mapper.h> #include <C2PlatformSupport.h> #include <SimpleC2Interface.h> Loading Loading @@ -105,19 +106,18 @@ C2SoftAomEnc::IntfImpl::IntfImpl(const std::shared_ptr<C2ReflectorHelper>& helpe .withSetter(ProfileLevelSetter) .build()); std::vector<uint32_t> pixelFormats = {HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, HAL_PIXEL_FORMAT_YCBCR_420_888}; if (isHalPixelFormatSupported((AHardwareBuffer_Format)HAL_PIXEL_FORMAT_YCBCR_P010)) { pixelFormats.push_back(HAL_PIXEL_FORMAT_YCBCR_P010); } addParameter(DefineParam(mPixelFormat, C2_PARAMKEY_PIXEL_FORMAT) .withDefault(new C2StreamPixelFormatInfo::output( .withDefault(new C2StreamPixelFormatInfo::input( 0u, HAL_PIXEL_FORMAT_YCBCR_420_888)) .withFields({C2F(mPixelFormat, value).oneOf({ HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED, HAL_PIXEL_FORMAT_YCBCR_420_888, HAL_PIXEL_FORMAT_YCBCR_P010 }) }) .withFields({C2F(mPixelFormat, value).oneOf({pixelFormats})}) .withSetter((Setter<decltype(*mPixelFormat)>::StrictValueWithNoDeps)) .build()); addParameter(DefineParam(mRequestSync, C2_PARAMKEY_REQUEST_SYNC_FRAME) .withDefault(new C2StreamRequestSyncFrameTuning::output(0u, C2_FALSE)) .withFields({C2F(mRequestSync, value).oneOf({C2_FALSE, C2_TRUE})}) Loading
media/codec2/components/aom/C2SoftAomEnc.h +2 −2 Original line number Diff line number Diff line Loading @@ -136,7 +136,7 @@ class C2SoftAomEnc::IntfImpl : public SimpleInterface<void>::BaseParams { std::shared_ptr<C2StreamColorAspectsInfo::output> getCodedColorAspects_l() const { return mCodedColorAspects; } std::shared_ptr<C2StreamPixelFormatInfo::output> getPixelFormat_l() const { std::shared_ptr<C2StreamPixelFormatInfo::input> getPixelFormat_l() const { return mPixelFormat; } uint32_t getSyncFramePeriod() const; Loading @@ -156,7 +156,7 @@ class C2SoftAomEnc::IntfImpl : public SimpleInterface<void>::BaseParams { std::shared_ptr<C2StreamProfileLevelInfo::output> mProfileLevel; std::shared_ptr<C2StreamColorAspectsInfo::input> mColorAspects; std::shared_ptr<C2StreamColorAspectsInfo::output> mCodedColorAspects; std::shared_ptr<C2StreamPixelFormatInfo::output> mPixelFormat; std::shared_ptr<C2StreamPixelFormatInfo::input> mPixelFormat; }; Loading