mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Fix RGB LJPEG encoding.
Originally committed as revision 20788 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
65214b621f
commit
e0b176adff
@ -531,12 +531,18 @@ av_cold int MPV_encode_init(AVCodecContext *avctx)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user