diff options
author | Zhao Zhili <zhilizhao@tencent.com> | 2023-12-29 21:22:57 +0800 |
---|---|---|
committer | Zhao Zhili <zhilizhao@tencent.com> | 2024-01-04 17:31:49 +0800 |
commit | 5d255ba95ad260146b27422b76e8d1c34a77af36 (patch) | |
tree | 94f51970ebab68fd5ae4c626eb96b3a408f98d4f /libavutil/hwcontext_videotoolbox.h | |
parent | 0f824d792d20783fda64279ab94e16676e48c2e6 (diff) | |
download | ffmpeg-5d255ba95ad260146b27422b76e8d1c34a77af36.tar.gz |
avutil/hwcontext_videotoolbox: add frame hwctx to specify color range
VideoToolbox use different identifiers for the same pixel format
with different color range, like
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
kCVPixelFormatType_420YpCbCr8BiPlanarFullRange.
Before the patch, vt_pool_alloc() always use limited range, and it
will fail for pixel format AV_PIX_FMT_BGRA since there is no limited
range kCVPixelFormatType_32BGRA.
Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
Diffstat (limited to 'libavutil/hwcontext_videotoolbox.h')
-rw-r--r-- | libavutil/hwcontext_videotoolbox.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libavutil/hwcontext_videotoolbox.h b/libavutil/hwcontext_videotoolbox.h index 25dde85df5..600e9f2c8d 100644 --- a/libavutil/hwcontext_videotoolbox.h +++ b/libavutil/hwcontext_videotoolbox.h @@ -39,10 +39,13 @@ * depending on application usage, so it is preferable to let CoreVideo manage * the pool using the default implementation. * - * Currently AVHWDeviceContext.hwctx and AVHWFramesContext.hwctx are always - * NULL. + * Currently AVHWDeviceContext.hwctx are always NULL. */ +typedef struct AVVTFramesContext { + enum AVColorRange color_range; +} AVVTFramesContext; + /** * Convert a VideoToolbox (actually CoreVideo) format to AVPixelFormat. * Returns AV_PIX_FMT_NONE if no known equivalent was found. |