Mercurial > libavcodec.hg
comparison mimic.c @ 6654:603c780be9ff libavcodec
Do not pass dct_block to vlc_decode_block().
The function uses dct_block from the context anyways.
author | ramiro |
---|---|
date | Sat, 19 Apr 2008 13:03:12 +0000 |
parents | 4421d9c976d0 |
children | 1c76797e2216 |
comparison
equal
deleted
inserted
replaced
6653:4421d9c976d0 | 6654:603c780be9ff |
---|---|
155 -75, 75, -74, 74, -73, 73, -72, 72, | 155 -75, 75, -74, 74, -73, 73, -72, 72, |
156 -71, 71, -70, 70, -69, 69, -68, 68, | 156 -71, 71, -70, 70, -69, 69, -68, 68, |
157 -67, 67, -66, 66, -65, 65, -64, 64, }, | 157 -67, 67, -66, 66, -65, 65, -64, 64, }, |
158 }; | 158 }; |
159 | 159 |
160 static int vlc_decode_block(MimicContext *ctx, DCTELEM *block, int num_coeffs, | 160 static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale) |
161 int qscale) | 161 { |
162 { | 162 DCTELEM *block = ctx->dct_block; |
163 unsigned int pos; | 163 unsigned int pos; |
164 | 164 |
165 memset(block, 0, 64 * sizeof(DCTELEM)); | 165 memset(block, 0, 64 * sizeof(DCTELEM)); |
166 | 166 |
167 block[0] = get_bits(&ctx->gb, 8) << 3; | 167 block[0] = get_bits(&ctx->gb, 8) << 3; |
225 /* Luma planes may use a backreference from the 15 last | 225 /* Luma planes may use a backreference from the 15 last |
226 * frames preceding the previous. (get_bits1 == 1) | 226 * frames preceding the previous. (get_bits1 == 1) |
227 * Chroma planes don't use backreferences. */ | 227 * Chroma planes don't use backreferences. */ |
228 if(is_chroma || is_iframe || !get_bits1(&ctx->gb)) { | 228 if(is_chroma || is_iframe || !get_bits1(&ctx->gb)) { |
229 | 229 |
230 if(!vlc_decode_block(ctx, ctx->dct_block, | 230 if(!vlc_decode_block(ctx, num_coeffs, qscale)) |
231 num_coeffs, qscale)) | |
232 return 0; | 231 return 0; |
233 ctx->dsp.idct_put(dst, stride, ctx->dct_block); | 232 ctx->dsp.idct_put(dst, stride, ctx->dct_block); |
234 } else { | 233 } else { |
235 unsigned int backref = get_bits(&ctx->gb, 4); | 234 unsigned int backref = get_bits(&ctx->gb, 4); |
236 int index = (ctx->cur_index+backref)&15; | 235 int index = (ctx->cur_index+backref)&15; |