1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

ffv1: fix packed rgb with 1.3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-10-17 03:19:11 +02:00
parent adbb75dbd8
commit 4e2e3d943e

View File

@ -1237,7 +1237,11 @@ static int encode_slice(AVCodecContext *c, void *arg){
int x= fs->slice_x; int x= fs->slice_x;
int y= fs->slice_y; int y= fs->slice_y;
AVFrame * const p= &f->picture; AVFrame * const p= &f->picture;
const int ps= (f->bits_per_raw_sample>8)+1; const int ps= (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR)
?
(f->bits_per_raw_sample>8)+1
:
4;
if(p->key_frame) if(p->key_frame)
clear_slice_state(f, fs); clear_slice_state(f, fs);
@ -1657,7 +1661,11 @@ static int decode_slice(AVCodecContext *c, void *arg){
FFV1Context *fs= *(void**)arg; FFV1Context *fs= *(void**)arg;
FFV1Context *f= fs->avctx->priv_data; FFV1Context *f= fs->avctx->priv_data;
int width, height, x, y; int width, height, x, y;
const int ps= (c->bits_per_raw_sample>8)+1; const int ps= (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR)
?
(c->bits_per_raw_sample>8)+1
:
4;
AVFrame * const p= &f->picture; AVFrame * const p= &f->picture;
if(f->version > 2){ if(f->version > 2){