diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-21 04:25:30 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-21 04:25:30 +0200 |
commit | 05f228b0a01e8b97ba73a15c1eccb6b0a9060633 (patch) | |
tree | 97af2800f8278f07344fb15279f5a6fb28e684fb | |
parent | b6267901c466c482b2f1af3578b0a6d88265d144 (diff) | |
download | ffmpeg-05f228b0a01e8b97ba73a15c1eccb6b0a9060633.tar.gz |
ffv1: fix gray
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/ffv1.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index 0894f5f3a7..0dedc0d589 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -1296,11 +1296,7 @@ static int encode_slice(AVCodecContext *c, void *arg) int x = fs->slice_x; int y = fs->slice_y; AVFrame *const p = &f->picture; - const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR) - ? - (f->bits_per_raw_sample>8)+1 - : - 4; + const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step_minus1 + 1; if (p->key_frame) clear_slice_state(f, fs); @@ -1735,11 +1731,7 @@ static int decode_slice(AVCodecContext *c, void *arg) FFV1Context *fs = *(void **)arg; FFV1Context *f = fs->avctx->priv_data; int width, height, x, y; - const int ps = (av_pix_fmt_desc_get(c->pix_fmt)->flags & PIX_FMT_PLANAR) - ? - (c->bits_per_raw_sample>8)+1 - : - 4; + const int ps = av_pix_fmt_desc_get(c->pix_fmt)->comp[0].step_minus1 + 1; AVFrame * const p = &f->picture; if (f->version > 2) { |