diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-08 14:30:41 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-08-12 13:49:54 +0200 |
commit | ab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch) | |
tree | 498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/third_party/ffmpeg/libavcodec/ffv1dec.c | |
parent | 4ce69f7403811819800e7c5ae1318b2647e778d1 (diff) |
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/ffv1dec.c')
-rw-r--r-- | chromium/third_party/ffmpeg/libavcodec/ffv1dec.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/ffv1dec.c b/chromium/third_party/ffmpeg/libavcodec/ffv1dec.c index 6c01ebf15f9..a0a50abed4d 100644 --- a/chromium/third_party/ffmpeg/libavcodec/ffv1dec.c +++ b/chromium/third_party/ffmpeg/libavcodec/ffv1dec.c @@ -260,7 +260,7 @@ static void decode_rgb_frame(FFV1Context *s, uint8_t *src[3], int w, int h, int if (s->slice_coding_mode != 1) { b -= offset; r -= offset; - g -= ((b + r) * s->slice_rct_y_coef) >> 2; + g -= (b * s->slice_rct_by_coef + r * s->slice_rct_ry_coef) >> 2; b += g; r += g; } @@ -334,8 +334,9 @@ static int decode_slice_header(FFV1Context *f, FFV1Context *fs) fs->slice_reset_contexts = get_rac(c, state); fs->slice_coding_mode = get_symbol(c, state, 0); if (fs->slice_coding_mode != 1) { - fs->slice_rct_y_coef = get_symbol(c, state, 0); - if (fs->slice_rct_y_coef > 2U) { + fs->slice_rct_by_coef = get_symbol(c, state, 0); + fs->slice_rct_ry_coef = get_symbol(c, state, 0); + if ((uint64_t)fs->slice_rct_by_coef + (uint64_t)fs->slice_rct_ry_coef > 4) { av_log(f->avctx, AV_LOG_ERROR, "slice_rct_y_coef out of range\n"); return AVERROR_INVALIDDATA; } @@ -379,16 +380,17 @@ static int decode_slice(AVCodecContext *c, void *arg) pdst->vlc_state = NULL; if (fssrc->ac) { - pdst->state = av_malloc(CONTEXT_SIZE * psrc->context_count); + pdst->state = av_malloc_array(CONTEXT_SIZE, psrc->context_count); memcpy(pdst->state, psrc->state, CONTEXT_SIZE * psrc->context_count); } else { - pdst->vlc_state = av_malloc(sizeof(*pdst->vlc_state) * psrc->context_count); + pdst->vlc_state = av_malloc_array(sizeof(*pdst->vlc_state), psrc->context_count); memcpy(pdst->vlc_state, psrc->vlc_state, sizeof(*pdst->vlc_state) * psrc->context_count); } } } - fs->slice_rct_y_coef = 1; + fs->slice_rct_by_coef = 1; + fs->slice_rct_ry_coef = 1; if (f->version > 2) { if (ffv1_init_slice_state(f, fs) < 0) |