Revision 18b6a69c libavcodec/vc1.c

View differences:

libavcodec/vc1.c
280 280

  
281 281
static int decode_sequence_header_adv(VC1Context *v, GetBitContext *gb);
282 282

  
283
static void simple_idct_put_rangered(uint8_t *dest, int line_size, DCTELEM *block)
284
{
285
    int i;
286
    ff_simple_idct(block);
287
    for (i = 0; i < 64; i++) block[i] = (block[i] - 64) << 1;
288
    ff_put_pixels_clamped_c(block, dest, line_size);
289
}
290

  
291
static void simple_idct_put_signed(uint8_t *dest, int line_size, DCTELEM *block)
292
{
293
    ff_simple_idct(block);
294
    ff_put_signed_pixels_clamped_c(block, dest, line_size);
295
}
296

  
297
static void simple_idct_put_signed_rangered(uint8_t *dest, int line_size, DCTELEM *block)
298
{
299
    int i;
300
    ff_simple_idct(block);
301
    for (i = 0; i < 64; i++) block[i] <<= 1;
302
    ff_put_signed_pixels_clamped_c(block, dest, line_size);
303
}
304

  
305 283
/**
306 284
 * Decode Simple/Main Profiles sequence header
307 285
 * @see Figure 7-8, p16-17
......
359 337
    v->res_fasttx = get_bits1(gb);
360 338
    if (!v->res_fasttx)
361 339
    {
362
        v->vc1dsp.vc1_inv_trans_8x8_add = ff_simple_idct_add;
363
        v->vc1dsp.vc1_inv_trans_8x8_put[0] = ff_simple_idct_put;
364
        v->vc1dsp.vc1_inv_trans_8x8_put[1] = simple_idct_put_rangered;
365
        v->vc1dsp.vc1_inv_trans_8x8_put_signed[0] = simple_idct_put_signed;
366
        v->vc1dsp.vc1_inv_trans_8x8_put_signed[1] = simple_idct_put_signed_rangered;
340
        v->vc1dsp.vc1_inv_trans_8x8 = ff_simple_idct;
367 341
        v->vc1dsp.vc1_inv_trans_8x4 = ff_simple_idct84_add;
368 342
        v->vc1dsp.vc1_inv_trans_4x8 = ff_simple_idct48_add;
369 343
        v->vc1dsp.vc1_inv_trans_4x4 = ff_simple_idct44_add;

Also available in: Unified diff