mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-19 22:10:34 +00:00
ffv1: fix plane_count at version 1.4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8ec6188263
commit
c387c45e83
@ -499,7 +499,7 @@ static int read_extra_header(FFV1Context *f)
|
||||
f->chroma_h_shift = get_symbol(c, state, 0);
|
||||
f->chroma_v_shift = get_symbol(c, state, 0);
|
||||
f->transparency = get_rac(c, state);
|
||||
f->plane_count = 2 + f->transparency;
|
||||
f->plane_count = 1 + (f->chroma_planes || f->version<4) + f->transparency;
|
||||
f->num_h_slices = 1 + get_symbol(c, state, 0);
|
||||
f->num_v_slices = 1 + get_symbol(c, state, 0);
|
||||
|
||||
|
@ -797,6 +797,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
|
||||
if (!s->transparency)
|
||||
s->plane_count = 2;
|
||||
if (!s->chroma_planes && s->version > 3)
|
||||
s->plane_count--;
|
||||
|
||||
avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_h_shift, &s->chroma_v_shift);
|
||||
s->picture_number = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user