aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2012-03-06 23:16:40 +0000
committerMichael Niedermayer <michaelni@gmx.at>2012-03-07 05:11:40 +0100
commit1eabd71c2bed13648643433249386f4b965b5c14 (patch)
tree1828e4f03875784d6d0cf199c6bc76e629ff2441 /libavcodec/ffv1.c
parent65491fa3d5f92cf548ad3b458abd3faabb5f3dc7 (diff)
downloadffmpeg-1eabd71c2bed13648643433249386f4b965b5c14.tar.gz
ffv1: PIX_FMT_YUV444P10 support
Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1.c')
-rw-r--r--libavcodec/ffv1.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
index 39c6154a64..fb9b03041b 100644
--- a/libavcodec/ffv1.c
+++ b/libavcodec/ffv1.c
@@ -882,6 +882,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
case PIX_FMT_YUV420P9:
if (!avctx->bits_per_raw_sample)
s->bits_per_raw_sample = 9;
+ case PIX_FMT_YUV444P10:
case PIX_FMT_YUV420P10:
case PIX_FMT_YUV422P10:
s->packed_at_lsb = 1;
@@ -1649,10 +1650,11 @@ static int read_header(FFV1Context *f){
return -1;
}
}else if(f->avctx->bits_per_raw_sample==10) {
+ f->packed_at_lsb=1;
switch(16*f->chroma_h_shift + f->chroma_v_shift){
- case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P16; break;
- case 0x10: f->avctx->pix_fmt= PIX_FMT_YUV422P10; f->packed_at_lsb=1; break;
- case 0x11: f->avctx->pix_fmt= PIX_FMT_YUV420P10; f->packed_at_lsb=1; break;
+ case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P10; break;
+ case 0x10: f->avctx->pix_fmt= PIX_FMT_YUV422P10; break;
+ case 0x11: f->avctx->pix_fmt= PIX_FMT_YUV420P10; break;
default:
av_log(f->avctx, AV_LOG_ERROR, "format not supported\n");
return -1;
@@ -1861,7 +1863,7 @@ AVCodec ff_ffv1_encoder = {
.encode2 = encode_frame,
.close = common_end,
.capabilities = CODEC_CAP_SLICE_THREADS,
- .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUVA420P, PIX_FMT_YUV444P, PIX_FMT_YUVA444P, PIX_FMT_YUV440P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_0RGB32, PIX_FMT_RGB32, PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, PIX_FMT_YUV444P16, PIX_FMT_YUV444P9, PIX_FMT_YUV422P9, PIX_FMT_YUV420P9, PIX_FMT_YUV420P10, PIX_FMT_YUV422P10, PIX_FMT_GRAY16, PIX_FMT_GRAY8, PIX_FMT_NONE},
+ .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUVA420P, PIX_FMT_YUV444P, PIX_FMT_YUVA444P, PIX_FMT_YUV440P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_0RGB32, PIX_FMT_RGB32, PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, PIX_FMT_YUV444P16, PIX_FMT_YUV444P9, PIX_FMT_YUV422P9, PIX_FMT_YUV420P9, PIX_FMT_YUV420P10, PIX_FMT_YUV422P10, PIX_FMT_YUV444P10, PIX_FMT_GRAY16, PIX_FMT_GRAY8, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"),
};
#endif