Commit 5de64bb3 authored by Jan Ekström's avatar Jan Ekström Committed by Anton Khirnov

utvideoenc: Add support for the new BT.709 FourCCs for YCbCr

With cli usage the decoder might have not set the colorspace during
encoder init, manual colorspace override might be needed in such
cases.
Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent de203abd
...@@ -83,6 +83,9 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) ...@@ -83,6 +83,9 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
c->planes = 3; c->planes = 3;
if (avctx->colorspace == AVCOL_SPC_BT709)
avctx->codec_tag = MKTAG('U', 'L', 'H', '0');
else
avctx->codec_tag = MKTAG('U', 'L', 'Y', '0'); avctx->codec_tag = MKTAG('U', 'L', 'Y', '0');
original_format = UTVIDEO_420; original_format = UTVIDEO_420;
break; break;
...@@ -93,6 +96,9 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) ...@@ -93,6 +96,9 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
c->planes = 3; c->planes = 3;
if (avctx->colorspace == AVCOL_SPC_BT709)
avctx->codec_tag = MKTAG('U', 'L', 'H', '2');
else
avctx->codec_tag = MKTAG('U', 'L', 'Y', '2'); avctx->codec_tag = MKTAG('U', 'L', 'Y', '2');
original_format = UTVIDEO_422; original_format = UTVIDEO_422;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment