From 1e7943c3151d7c27416c88249900af56919bc1db Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 22 Jun 2012 16:13:15 +0200 Subject: [PATCH] snow: yuv410 support Signed-off-by: Michael Niedermayer --- libavcodec/snowdec.c | 2 ++ libavcodec/snowenc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/snowdec.c b/libavcodec/snowdec.c index 4a34cf8d14..405166c5fe 100644 --- a/libavcodec/snowdec.c +++ b/libavcodec/snowdec.c @@ -295,6 +295,8 @@ static int decode_header(SnowContext *s){ s->avctx->pix_fmt= PIX_FMT_YUV420P; }else if(s->chroma_h_shift == 0 && s->chroma_v_shift==0){ s->avctx->pix_fmt= PIX_FMT_YUV444P; + }else if(s->chroma_h_shift == 2 && s->chroma_v_shift==2){ + s->avctx->pix_fmt= PIX_FMT_YUV410P; } else { av_log(s, AV_LOG_ERROR, "unsupported color subsample mode %d %d\n", s->chroma_h_shift, s->chroma_v_shift); s->chroma_h_shift = s->chroma_v_shift = 1; diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index 363ce5cb27..f1ebc2f87f 100644 --- a/libavcodec/snowenc.c +++ b/libavcodec/snowenc.c @@ -220,7 +220,7 @@ static av_cold int encode_init(AVCodecContext *avctx) case PIX_FMT_YUV420P: // case PIX_FMT_GRAY8: // case PIX_FMT_YUV411P: -// case PIX_FMT_YUV410P: + case PIX_FMT_YUV410P: s->colorspace_type= 0; break; /* case PIX_FMT_RGB32: