[FFmpeg-cvslog] snowenc: set chroma subsample factors correctly for non 420

Michael Niedermayer git at videolan.org
Fri Jun 22 04:53:42 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Fri Jun 22 03:58:07 2012 +0200| [b4b7471ec473b8b2a463963e50989fd7676b4d7c] | committer: Michael Niedermayer

snowenc: set chroma subsample factors correctly for non 420

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b4b7471ec473b8b2a463963e50989fd7676b4d7c
---

 libavcodec/snowenc.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 383e653..d66eb39 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -230,9 +230,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
         av_log(avctx, AV_LOG_ERROR, "pixel format not supported\n");
         return -1;
     }
-//    avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
-    s->chroma_h_shift= 1;
-    s->chroma_v_shift= 1;
+    avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
 
     ff_set_cmp(&s->dsp, s->dsp.me_cmp, s->avctx->me_cmp);
     ff_set_cmp(&s->dsp, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp);



More information about the ffmpeg-cvslog mailing list