From 7c25ffe070c286874a8c3513f7504b90e1626b0c Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Mon, 25 Jan 2016 12:56:11 -0500 Subject: mpeg1: Make intra-block decoding independent of MpegEncContext This allows untangling the eatqi decoder from the MPEG-1 decoder. Signed-off-by: Vittorio Giovara Signed-off-by: Diego Biurrun --- libavcodec/eatqi.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'libavcodec/eatqi.c') diff --git a/libavcodec/eatqi.c b/libavcodec/eatqi.c index f5dcb53692..59bba9748f 100644 --- a/libavcodec/eatqi.c +++ b/libavcodec/eatqi.c @@ -66,9 +66,14 @@ static int tqi_decode_mb(MpegEncContext *s, int16_t (*block)[64]) { int n; s->bdsp.clear_blocks(block[0]); - for (n=0; n<6; n++) - if (ff_mpeg1_decode_block_intra(s, block[n], n) < 0) + for (n = 0; n < 6; n++) { + int ret = ff_mpeg1_decode_block_intra(&s->gb, + s->intra_matrix, + s->intra_scantable.permutated, + s->last_dc, block[n], n, 1); + if (ret < 0) return -1; + } return 0; } -- cgit v1.2.3