/foundation/multimedia/image_effect/frameworks/native/utils/format/ |
H A D | format_helper.cpp | 43 IEffectFormat srcFormat; 44 IEffectFormat dstFormat; 49 FormatConverter{ IEffectFormat::RGBA8888, IEffectFormat::YUVNV12, ConvertRGBAToNV12 }, 50 FormatConverter{ IEffectFormat::RGBA8888, IEffectFormat::YUVNV21, ConvertRGBAToNV21 }, 51 FormatConverter{ IEffectFormat::YUVNV12, IEffectFormat::RGBA8888, ConvertNV12ToRGBA }, 52 FormatConverter{ IEffectFormat::YUVNV21, IEffectFormat [all...] |
/foundation/multimedia/image_effect/interfaces/inner_api/native/utils/ |
H A D | format_helper.h | 38 IMAGE_EFFECT_EXPORT static uint32_t CalculateDataRowCount(uint32_t height, IEffectFormat format); 39 IMAGE_EFFECT_EXPORT static uint32_t CalculateRowStride(uint32_t width, IEffectFormat format); 40 IMAGE_EFFECT_EXPORT static uint32_t CalculateSize(uint32_t width, uint32_t height, IEffectFormat format); 41 IMAGE_EFFECT_EXPORT static std::unordered_set<IEffectFormat> GetAllSupportedFormats(); 42 IMAGE_EFFECT_EXPORT static bool IsSupportConvert(IEffectFormat srcFormat, IEffectFormat dstFormat);
|
/foundation/multimedia/image_effect/frameworks/native/capi/ |
H A D | native_common_utils.cpp | 30 static const std::map<IEffectFormat, ImageEffect_Format> FORMAT_TABLE = { 31 { IEffectFormat::RGBA8888, ImageEffect_Format::EFFECT_PIXEL_FORMAT_RGBA8888 }, 32 { IEffectFormat::YUVNV12, ImageEffect_Format::EFFECT_PIXEL_FORMAT_NV12 }, 33 { IEffectFormat::YUVNV21, ImageEffect_Format::EFFECT_PIXEL_FORMAT_NV21 }, 34 { IEffectFormat::RGBA_1010102, ImageEffect_Format::EFFECT_PIXEL_FORMAT_RGBA1010102 }, 35 { IEffectFormat::YCBCR_P010, ImageEffect_Format::EFFECT_PIXEL_FORMAT_YCBCR_P010 }, 36 { IEffectFormat::YCRCB_P010, ImageEffect_Format::EFFECT_PIXEL_FORMAT_YCRCB_P010 } 42 { "default", static_cast<uint32_t>(IEffectFormat::DEFAULT) }, 43 { "rgba_8888", static_cast<uint32_t>(IEffectFormat::RGBA8888) }, 44 { "nv21", static_cast<uint32_t>(IEffectFormat [all...] |
H A D | native_common_utils.h | 40 static void SwitchToOHFormatType(const IEffectFormat &formatType, ImageEffect_Format &ohFormatType); 42 static void SwitchToFormatType(const ImageEffect_Format &ohFormatType, IEffectFormat &formatType);
|
/foundation/multimedia/image_effect/frameworks/native/efilter/filterimpl/brightness/ |
H A D | brightness_efilter.cpp | 41 { IEffectFormat::RGBA8888, CpuBrightnessAlgo::OnApplyRGBA8888 }, in BrightnessEFilter() 42 { IEffectFormat::YUVNV12, CpuBrightnessAlgo::OnApplyYUVNV12 }, in BrightnessEFilter() 43 { IEffectFormat::YUVNV21, CpuBrightnessAlgo::OnApplyYUVNV21 }, in BrightnessEFilter() 50 IEffectFormat::RGBA8888, in BrightnessEFilter() 88 IEffectFormat formatType = src->bufferInfo_->formatType_; in Render() 89 std::unordered_map<IEffectFormat, ApplyFunc> formatFuncs = it->second; in Render() 142 info_->formats_.emplace(IEffectFormat::RGBA8888, std::vector<IPType>{ IPType::CPU, IPType::GPU }); in GetEffectInfo() 143 info_->formats_.emplace(IEffectFormat::YUVNV21, std::vector<IPType>{ IPType::CPU }); in GetEffectInfo() 144 info_->formats_.emplace(IEffectFormat::YUVNV12, std::vector<IPType>{ IPType::CPU }); in GetEffectInfo() 155 ErrorCode BrightnessEFilter::PreRender(IEffectFormat [all...] |
H A D | brightness_efilter.h | 48 ErrorCode PreRender(IEffectFormat &format) override; 55 std::unordered_map<IPType, std::unordered_map<IEffectFormat, ApplyFunc>> brightnessFilterInfo_;
|
H A D | gpu_brightness_algo.cpp | 147 dst->bufferInfo_->formatType_ = IEffectFormat::RGBA8888; in OnApplyRGBA8888()
|
/foundation/multimedia/image_effect/frameworks/native/efilter/filterimpl/contrast/ |
H A D | contrast_efilter.cpp | 40 { IEffectFormat::RGBA8888, CpuContrastAlgo::OnApplyRGBA8888 }, in ContrastEFilter() 41 { IEffectFormat::YUVNV12, CpuContrastAlgo::OnApplyYUVNV12 }, in ContrastEFilter() 42 { IEffectFormat::YUVNV21, CpuContrastAlgo::OnApplyYUVNV21 }, in ContrastEFilter() 49 IEffectFormat::RGBA8888, in ContrastEFilter() 87 IEffectFormat formatType = src->bufferInfo_->formatType_; in Render() 88 std::unordered_map<IEffectFormat, ApplyFunc> formatFuncs = it->second; in Render() 141 info_->formats_.emplace(IEffectFormat::RGBA8888, std::vector<IPType>{ IPType::CPU, IPType::GPU }); in GetEffectInfo() 142 info_->formats_.emplace(IEffectFormat::YUVNV21, std::vector<IPType>{ IPType::CPU }); in GetEffectInfo() 143 info_->formats_.emplace(IEffectFormat::YUVNV12, std::vector<IPType>{ IPType::CPU }); in GetEffectInfo() 154 ErrorCode ContrastEFilter::PreRender(IEffectFormat [all...] |
H A D | contrast_efilter.h | 48 ErrorCode PreRender(IEffectFormat &format) override; 55 std::unordered_map<IPType, std::unordered_map<IEffectFormat, ApplyFunc>> contrastFilterInfo_;
|
H A D | gpu_contrast_algo.cpp | 148 dst->bufferInfo_->formatType_ = IEffectFormat::RGBA8888; in OnApplyRGBA8888()
|
/foundation/multimedia/image_effect/test/unittest/ |
H A D | TestRenderEnvironment.cpp | 30 constexpr IEffectFormat FORMATE_TYPE = IEffectFormat::RGBA8888; 90 effectBuffer->bufferInfo_->formatType_ = IEffectFormat::DEFAULT; in HWTEST_F() 120 IEffectFormat format = IEffectFormat::YUVNV12; in HWTEST_F() 183 IEffectFormat format = IEffectFormat::YUVNV21; in HWTEST_F() 188 format = IEffectFormat::YUVNV12; in HWTEST_F() 230 effectBuffer->bufferInfo_->formatType_ = IEffectFormat::YUVNV12; in HWTEST_F() 235 IEffectFormat forma in HWTEST_F() [all...] |
H A D | TestUtils.cpp | 267 uint32_t result = formatHelper->CalculateDataRowCount(height, IEffectFormat::YUVNV12); in HWTEST_F() 270 result = formatHelper->CalculateDataRowCount(height, IEffectFormat::DEFAULT); in HWTEST_F() 273 result = formatHelper->CalculateRowStride(width, IEffectFormat::YCRCB_P010); in HWTEST_F() 276 result = formatHelper->CalculateRowStride(width, IEffectFormat::DEFAULT); in HWTEST_F() 299 FormatConverterInfo CreateConverterInfo(IEffectFormat format, void *addr, uint32_t rowStride) in CreateConverterInfo() 315 std::unordered_set<IEffectFormat> formats = FormatHelper::GetAllSupportedFormats(); in HWTEST_F() 318 ASSERT_TRUE(FormatHelper::IsSupportConvert(IEffectFormat::RGBA8888, IEffectFormat::YUVNV21)); in HWTEST_F() 320 std::shared_ptr<void> rgbaBuffer = AllocBuffer(FormatHelper::CalculateSize(WIDTH, HEIGHT, IEffectFormat::RGBA8888)); in HWTEST_F() 321 FormatConverterInfo rgbaConverterInfo = CreateConverterInfo(IEffectFormat in HWTEST_F() [all...] |
H A D | TestEffectMemoryManager.cpp | 31 constexpr IEffectFormat FORMATE_TYPE = IEffectFormat::RGBA8888;
|
H A D | image_effect_inner_unittest.cpp | 88 info->formatType_ = IEffectFormat::RGBA8888; in SetUp()
|
/foundation/multimedia/image_effect/frameworks/native/effect/pipeline/include/core/ |
H A D | capability.h | 29 IEffectFormat format = IEffectFormat::DEFAULT; 36 std::map<IEffectFormat, std::vector<IPType>> formats;
|
/foundation/multimedia/image_effect/frameworks/native/utils/common/ |
H A D | common_utils.h | 100 static IEffectFormat SwitchToEffectFormat(GraphicPixelFormat pixelFormat); 101 static IEffectFormat SwitchToEffectFormat(PixelFormat pixelFormat); 102 static GraphicPixelFormat SwitchToGraphicPixelFormat(IEffectFormat formatType); 103 static PixelFormat SwitchToPixelFormat(IEffectFormat formatType); 107 static const std::unordered_map<PixelFormat, IEffectFormat> pixelFmtToEffectFmt_; 108 static const std::unordered_map<GraphicPixelFormat, IEffectFormat> surfaceBufferFmtToEffectFmt_;
|
H A D | common_utils.cpp | 46 const std::unordered_map<PixelFormat, IEffectFormat> CommonUtils::pixelFmtToEffectFmt_ = { 47 { PixelFormat::RGBA_8888, IEffectFormat::RGBA8888 }, 48 { PixelFormat::NV21, IEffectFormat::YUVNV21 }, 49 { PixelFormat::NV12, IEffectFormat::YUVNV12 }, 50 { PixelFormat::RGBA_1010102, IEffectFormat::RGBA_1010102 }, 53 const std::unordered_map<GraphicPixelFormat, IEffectFormat> CommonUtils::surfaceBufferFmtToEffectFmt_ = { 54 { GraphicPixelFormat::GRAPHIC_PIXEL_FMT_RGBA_8888, IEffectFormat::RGBA8888}, 55 { GraphicPixelFormat::GRAPHIC_PIXEL_FMT_YCBCR_420_SP, IEffectFormat::YUVNV12 }, 56 { GraphicPixelFormat::GRAPHIC_PIXEL_FMT_YCRCB_420_SP, IEffectFormat::YUVNV21 }, 57 { GraphicPixelFormat::GRAPHIC_PIXEL_FMT_RGBA_1010102, IEffectFormat [all...] |
/foundation/multimedia/image_effect/frameworks/native/render_environment/ |
H A D | render_environment.h | 188 SurfaceBuffer *buffer, IEffectFormat format);
190 SurfaceBuffer *buffer, IEffectFormat format);
192 IEffectFormat format = IEffectFormat::RGBA8888);
196 IMAGE_EFFECT_EXPORT GLuint ConvertFromYUVToRGB(const EffectBuffer *source, IEffectFormat format);
197 IMAGE_EFFECT_EXPORT void ConvertFromRGBToYUV(RenderTexturePtr input, IEffectFormat format, void *data);
|
H A D | render_environment.cpp | 173 output->bufferInfo_->formatType_ = IEffectFormat::RGBA8888;
in GenMainTex() 234 if (source->bufferInfo_->formatType_ == IEffectFormat::RGBA8888) {
in DrawBufferToTexture() 248 GLuint RenderEnvironment::ConvertFromYUVToRGB(const EffectBuffer *source, IEffectFormat format)
in ConvertFromYUVToRGB() 263 if (format == IEffectFormat::YUVNV12) {
in ConvertFromYUVToRGB() 285 void RenderEnvironment::ConvertFromRGBToYUV(RenderTexturePtr input, IEffectFormat format, void *data)
in ConvertFromRGBToYUV() 302 if (format == IEffectFormat::YUVNV12) {
in ConvertFromRGBToYUV() 396 if (output->bufferInfo_->formatType_ == IEffectFormat::RGBA8888) {
in ConvertTextureToBuffer() 429 out->bufferInfo_->formatType_ = IEffectFormat::RGBA8888;
in ConvertYUV2RGBA() 486 void RenderEnvironment::DrawSurfaceBufferFromTex(RenderTexturePtr tex, SurfaceBuffer *buffer, IEffectFormat format)
in DrawSurfaceBufferFromTex() 492 if (format == IEffectFormat in DrawSurfaceBufferFromTex() [all...] |
/foundation/multimedia/image_effect/interfaces/inner_api/native/base/ |
H A D | effect_info.h | 32 enum class IEffectFormat : uint32_t { class 65 std::map<IEffectFormat, std::vector<IPType>> formats_;
|
H A D | effect_buffer.h | 45 IEffectFormat formatType_ = IEffectFormat::DEFAULT;
|
/foundation/multimedia/image_effect/frameworks/native/efilter/filterimpl/crop/ |
H A D | crop_efilter.cpp | 123 IEffectFormat format = src->bufferInfo_->formatType_; in Render() 124 CHECK_AND_RETURN_RET_LOG(format == IEffectFormat::RGBA8888 || format == IEffectFormat::RGBA_1010102, in Render() 203 IEffectFormat format = buffer->bufferInfo_->formatType_; in Render() 204 CHECK_AND_RETURN_RET_LOG(format == IEffectFormat::RGBA8888 || format == IEffectFormat::RGBA_1010102, in Render() 233 info_->formats_.emplace(IEffectFormat::RGBA8888, std::vector<IPType>{ IPType::CPU }); in GetEffectInfo() 234 info_->formats_.emplace(IEffectFormat::RGBA_1010102, std::vector<IPType>{ IPType::CPU }); in GetEffectInfo()
|
/foundation/multimedia/image_effect/frameworks/native/efilter/base/ |
H A D | efilter.cpp | 80 ErrorCode EFilter::PreRender(IEffectFormat &format) in PreRender() 171 IEffectFormat formatType = buffer->bufferInfo_->formatType_; in IpTypeConvert() 173 std::map<IEffectFormat, std::vector<IPType>> &formats = pixelFormatCap->formats; in IpTypeConvert() 176 it = formats.find(IEffectFormat::RGBA8888); in IpTypeConvert() 202 .len_ = FormatHelper::CalculateSize(buffer->tex->Width(), buffer->tex->Height(), IEffectFormat::RGBA8888), in ConvertFromGPU2CPU() 203 .formatType_ = IEffectFormat::RGBA8888, in ConvertFromGPU2CPU() 350 ErrorCode EFilter::CalculateEFilterIPType(IEffectFormat &formatType, IPType &ipType) in CalculateEFilterIPType() 353 std::map<IEffectFormat, std::vector<IPType>> &formats = pixelFormatCap->formats; in CalculateEFilterIPType() 406 if (src->bufferInfo_->formatType_ == IEffectFormat::RGBA8888) { in RenderWithGPU()
|
/foundation/multimedia/image_effect/interfaces/inner_api/native/efilter/ |
H A D | efilter.h | 48 IMAGE_EFFECT_EXPORT virtual ErrorCode PreRender(IEffectFormat &format); 80 ErrorCode CalculateEFilterIPType(IEffectFormat &formatType, IPType &ipType);
|
/foundation/multimedia/image_effect/frameworks/native/effect/manager/colorspace_manager/ |
H A D | colorspace_converter.cpp | 89 bufferInfo.formatType_ = IEffectFormat::RGBA8888; in AllocSdrSurfaceBuffer() 109 bufferInfo.formatType_ = IEffectFormat::RGBA8888; in AllocGainmapSurfaceBuffer()
|