Mercurial > libavcodec.hg
changeset 10665:6cebfebeb18f libavcodec
Fix RGB LJPEG encoding.
author | michael |
---|---|
date | Thu, 10 Dec 2009 18:07:35 +0000 |
parents | f56b8a9be9e1 |
children | 7127645ee791 |
files | mpegvideo_enc.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo_enc.c Wed Dec 09 14:05:39 2009 +0000 +++ b/mpegvideo_enc.c Thu Dec 10 18:07:35 2009 +0000 @@ -531,12 +531,18 @@ case CODEC_ID_MJPEG: s->out_format = FMT_MJPEG; s->intra_only = 1; /* force intra only for jpeg */ + if(avctx->codec->id == CODEC_ID_MJPEG){ s->mjpeg_vsample[0] = 2; s->mjpeg_vsample[1] = 2>>chroma_v_shift; s->mjpeg_vsample[2] = 2>>chroma_v_shift; s->mjpeg_hsample[0] = 2; s->mjpeg_hsample[1] = 2>>chroma_h_shift; s->mjpeg_hsample[2] = 2>>chroma_h_shift; + }else{ + s->mjpeg_vsample[0] = s->mjpeg_hsample[0] = + s->mjpeg_vsample[1] = s->mjpeg_hsample[1] = + s->mjpeg_vsample[2] = s->mjpeg_hsample[2] = 1; + } if (!(CONFIG_MJPEG_ENCODER || CONFIG_LJPEG_ENCODER) || ff_mjpeg_encode_init(s) < 0) return -1;