mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-22 05:40:27 +00:00
Do not convert AV_PIX_FMT_* to AV_PIX_FMT_NONE
This partially corrects commit f83230c2 which converts the pix format to
0 if not found (old FFMPEG) whereas on some places non-0 is expected
(see previous commit).
This commit is contained in:
@@ -102,16 +102,10 @@ extern "C" {
|
||||
#define AVCodecID CodecID
|
||||
#endif
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT <= AV_VERSION_INT(51, 63, 100) // FFMPEG commit e9757066e11
|
||||
#define AV_PIX_FMT_GBRP12LE PIX_FMT_NONE
|
||||
#elif LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51, 74, 100)
|
||||
#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(51, 74, 100)
|
||||
#define AV_PIX_FMT_GBRP12LE PIX_FMT_GBRP12LE
|
||||
#endif
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 15, 100) // FFMPEG commit c2869b4640f
|
||||
#define AV_PIX_FMT_P010LE AV_PIX_FMT_NONE
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @todo
|
||||
* Is this stuff still needed?
|
||||
@@ -218,7 +212,9 @@ static const struct {
|
||||
{ v210, AV_PIX_FMT_YUV420P10LE, v210_to_yuv420p10le },
|
||||
{ v210, AV_PIX_FMT_YUV422P10LE, v210_to_yuv422p10le },
|
||||
{ v210, AV_PIX_FMT_YUV444P10LE, v210_to_yuv444p10le },
|
||||
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 15, 100) // FFMPEG commit c2869b4640f
|
||||
{ v210, AV_PIX_FMT_P010LE, v210_to_p010le },
|
||||
#endif
|
||||
{ UYVY, AV_PIX_FMT_YUV422P, uyvy_to_yuv422p },
|
||||
{ UYVY, AV_PIX_FMT_YUVJ422P, uyvy_to_yuv422p },
|
||||
{ UYVY, AV_PIX_FMT_YUV420P, uyvy_to_yuv420p },
|
||||
@@ -232,7 +228,9 @@ static const struct {
|
||||
{ R10k, AV_PIX_FMT_BGR0, r10k_to_bgr0 },
|
||||
{ R10k, AV_PIX_FMT_GBRP10LE, r10k_to_gbrp10le },
|
||||
{ R10k, AV_PIX_FMT_YUV422P10LE, r10k_to_yuv422p10le },
|
||||
#if LIBAVUTIL_VERSION_INT <= AV_VERSION_INT(51, 63, 100) // FFMPEG commit e9757066e11
|
||||
{ R12L, AV_PIX_FMT_GBRP12LE, r12l_to_gbrp12le },
|
||||
#endif
|
||||
};
|
||||
|
||||
typedef void av_to_uv_convert(char * __restrict dst_buffer, AVFrame * __restrict in_frame, int width, int height, int pitch, int * __restrict rgb_shift);
|
||||
@@ -296,8 +294,10 @@ static const struct {
|
||||
{AV_PIX_FMT_YUV444P10LE, v210, yuv444p10le_to_v210, true},
|
||||
{AV_PIX_FMT_YUV444P10LE, UYVY, yuv444p10le_to_uyvy, false},
|
||||
{AV_PIX_FMT_YUV444P10LE, RGB, yuv444p10le_to_rgb24, false},
|
||||
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 15, 100) // FFMPEG commit c2869b4640f
|
||||
{AV_PIX_FMT_P010LE, v210, p010le_to_v210, true},
|
||||
{AV_PIX_FMT_P010LE, UYVY, p010le_to_uyvy, true},
|
||||
#endif
|
||||
// 8-bit YUV
|
||||
{AV_PIX_FMT_YUV420P, v210, yuv420p_to_v210, false},
|
||||
{AV_PIX_FMT_YUV420P, UYVY, yuv420p_to_uyvy, true},
|
||||
@@ -329,9 +329,11 @@ static const struct {
|
||||
{AV_PIX_FMT_GBRP10LE, R10k, gbrp10le_to_r10k, true},
|
||||
{AV_PIX_FMT_GBRP10LE, RGB, gbrp10le_to_rgb, false},
|
||||
{AV_PIX_FMT_GBRP10LE, RGBA, gbrp10le_to_rgba, false},
|
||||
#if LIBAVUTIL_VERSION_INT <= AV_VERSION_INT(51, 63, 100) // FFMPEG commit e9757066e11
|
||||
{AV_PIX_FMT_GBRP12LE, R12L, gbrp12le_to_r12l, true},
|
||||
{AV_PIX_FMT_GBRP12LE, RGB, gbrp12le_to_rgb, false},
|
||||
{AV_PIX_FMT_GBRP12LE, RGBA, gbrp12le_to_rgba, false},
|
||||
#endif
|
||||
{AV_PIX_FMT_RGB48LE, RG48, memcpy_data, true},
|
||||
{AV_PIX_FMT_RGB48LE, R12L, rgb48le_to_r12l, false},
|
||||
{AV_PIX_FMT_RGB48LE, RGBA, rgb48le_to_rgba, false},
|
||||
|
||||
Reference in New Issue
Block a user