aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorJérôme Martinez <jerome@mediaarea.net>2018-03-07 11:19:03 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2018-03-10 17:55:50 +0100
commitb6fc09cdb4c4e5e4974ca35159f459174b9a9be5 (patch)
treed1dd81ddd7e60d530246eb1dae468a6ff12ab5ef /libavcodec/ffv1enc.c
parentea6973a5733ce1a6b6359357fd5c1722c2774dce (diff)
downloadffmpeg-b6fc09cdb4c4e5e4974ca35159f459174b9a9be5.tar.gz
avcodec/ffv1: support of more pix_fmt
Without direct support of such pix_fmt, content is padded to 16-bit and it is not possible to know that the source file was with a smaller bit depth so framemd5 is different Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 2e999b0986..dd4d7429f5 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -558,6 +558,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->plane_count = 3;
switch(avctx->pix_fmt) {
+ case AV_PIX_FMT_GRAY9:
case AV_PIX_FMT_YUV444P9:
case AV_PIX_FMT_YUV422P9:
case AV_PIX_FMT_YUV420P9:
@@ -568,6 +569,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->bits_per_raw_sample = 9;
case AV_PIX_FMT_GRAY10:
case AV_PIX_FMT_YUV444P10:
+ case AV_PIX_FMT_YUV440P10:
case AV_PIX_FMT_YUV420P10:
case AV_PIX_FMT_YUV422P10:
case AV_PIX_FMT_YUVA444P10:
@@ -577,11 +579,17 @@ FF_ENABLE_DEPRECATION_WARNINGS
s->bits_per_raw_sample = 10;
case AV_PIX_FMT_GRAY12:
case AV_PIX_FMT_YUV444P12:
+ case AV_PIX_FMT_YUV440P12:
case AV_PIX_FMT_YUV420P12:
case AV_PIX_FMT_YUV422P12:
- s->packed_at_lsb = 1;
if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
s->bits_per_raw_sample = 12;
+ case AV_PIX_FMT_YUV444P14:
+ case AV_PIX_FMT_YUV420P14:
+ case AV_PIX_FMT_YUV422P14:
+ if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
+ s->bits_per_raw_sample = 14;
+ s->packed_at_lsb = 1;
case AV_PIX_FMT_GRAY16:
case AV_PIX_FMT_YUV444P16:
case AV_PIX_FMT_YUV422P16:
@@ -1330,6 +1338,9 @@ AVCodec ff_ffv1_encoder = {
AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12,
AV_PIX_FMT_GBRP16, AV_PIX_FMT_RGB48,
AV_PIX_FMT_GBRAP16, AV_PIX_FMT_RGBA64,
+ AV_PIX_FMT_GRAY9,
+ AV_PIX_FMT_YUV420P14, AV_PIX_FMT_YUV422P14, AV_PIX_FMT_YUV444P14,
+ AV_PIX_FMT_YUV440P10, AV_PIX_FMT_YUV440P12,
AV_PIX_FMT_NONE
},