snow: yuv410 support
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Jun 2012 14:13:15 +0000 (16:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 22 Jun 2012 15:23:09 +0000 (17:23 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/snowdec.c
libavcodec/snowenc.c

index 4a34cf8d14ef98ac024a8904d335a49f1c62707f..405166c5fe85de09d9acc559ddf4919d071b57db 100644 (file)
@@ -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;
index 363ce5cb27d308c2afeb7ad1b31a2fa94538f6f0..f1ebc2f87fc2640ad69540c473ed8df788a8ff22 100644 (file)
@@ -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: