Revision 6a786b15 libavcodec/vc1dec.c
libavcodec/vc1dec.c  

2009  2009 
if(i==1) 
2010  2010 
v>vc1dsp.vc1_inv_trans_8x8_dc(dst, linesize, block); 
2011  2011 
else{ 
2012 
v>vc1dsp.vc1_inv_trans_8x8(block); 

2013 
s>dsp.add_pixels_clamped(block, dst, linesize); 

2012 
v>vc1dsp.vc1_inv_trans_8x8_add(dst, linesize, block); 

2014  2013 
} 
2015  2014 
if(apply_filter && cbp_top & 0xC) 
2016  2015 
v>vc1dsp.vc1_v_loop_filter8(dst, linesize, v>pq); 
...  ...  
2117  2116 
{ 
2118  2117 
MpegEncContext *s = &v>s; 
2119  2118 
GetBitContext *gb = &s>gb; 
2120 
int i, j;


2119 
int i; 

2121  2120 
int mb_pos = s>mb_x + s>mb_y * s>mb_stride; 
2122  2121 
int cbp; /* cbp decoding stuff */ 
2123  2122 
int mqdiff, mquant; /* MB quantization */ 
...  ...  
2149  2148 
{ 
2150  2149 
if (!skipped) 
2151  2150 
{ 
2151 
vc1_idct_func idct8x8_fn; 

2152  
2152  2153 
GET_MVDATA(dmv_x, dmv_y); 
2153  2154  
2154  2155 
if (s>mb_intra) { 
...  ...  
2183  2184 
VC1_TTMB_VLC_BITS, 2); 
2184  2185 
if(!s>mb_intra) vc1_mc_1mv(v, 0); 
2185  2186 
dst_idx = 0; 
2187 
idct8x8_fn = v>vc1dsp.vc1_inv_trans_8x8_put_signed[!!v>rangeredfrm]; 

2186  2188 
for (i=0; i<6; i++) 
2187  2189 
{ 
2188  2190 
s>dc_val[0][s>block_index[i]] = 0; 
...  ...  
2200  2202  
2201  2203 
vc1_decode_intra_block(v, s>block[i], i, val, mquant, (i&4)?v>codingset2:v>codingset); 
2202  2204 
if((i>3) && (s>flags & CODEC_FLAG_GRAY)) continue; 
2203 
v>vc1dsp.vc1_inv_trans_8x8(s>block[i]);


2204 
if(v>rangeredfrm) for(j = 0; j < 64; j++) s>block[i][j] <<= 1;


2205 
s>dsp.put_signed_pixels_clamped(s>block[i], s>dest[dst_idx] + off, i & 4 ? s>uvlinesize : s>linesize);


2205 
idct8x8_fn(s>dest[dst_idx] + off,


2206 
i & 4 ? s>uvlinesize : s>linesize,


2207 
s>block[i]);


2206  2208 
if(v>pq >= 9 && v>overlap) { 
2207  2209 
if(v>c_avail) 
2208  2210 
v>vc1dsp.vc1_h_overlap(s>dest[dst_idx] + off, i & 4 ? s>uvlinesize : s>linesize); 
...  ...  
2267  2269 
{ 
2268  2270 
int intra_count = 0, coded_inter = 0; 
2269  2271 
int is_intra[6], is_coded[6]; 
2272 
vc1_idct_func idct8x8_fn; 

2270  2273 
/* Get CBPCY */ 
2271  2274 
cbp = get_vlc2(&v>s.gb, v>cbpcy_vlc>table, VC1_CBPCY_P_VLC_BITS, 2); 
2272  2275 
for (i=0; i<6; i++) 
...  ...  
2316  2319 
} 
2317  2320 
if (!v>ttmbf && coded_inter) 
2318  2321 
ttmb = get_vlc2(gb, ff_vc1_ttmb_vlc[v>tt_index].table, VC1_TTMB_VLC_BITS, 2); 
2322 
idct8x8_fn = v>vc1dsp.vc1_inv_trans_8x8_put_signed[!!v>rangeredfrm]; 

2319  2323 
for (i=0; i<6; i++) 
2320  2324 
{ 
2321  2325 
dst_idx += i >> 2; 
...  ...  
2331  2335  
2332  2336 
vc1_decode_intra_block(v, s>block[i], i, is_coded[i], mquant, (i&4)?v>codingset2:v>codingset); 
2333  2337 
if((i>3) && (s>flags & CODEC_FLAG_GRAY)) continue; 
2334 
v>vc1dsp.vc1_inv_trans_8x8(s>block[i]);


2335 
if(v>rangeredfrm) for(j = 0; j < 64; j++) s>block[i][j] <<= 1;


2336 
s>dsp.put_signed_pixels_clamped(s>block[i], s>dest[dst_idx] + off, (i&4)?s>uvlinesize:s>linesize);


2338 
idct8x8_fn(s>dest[dst_idx] + off,


2339 
(i&4)?s>uvlinesize:s>linesize,


2340 
s>block[i]);


2337  2341 
if(v>pq >= 9 && v>overlap) { 
2338  2342 
if(v>c_avail) 
2339  2343 
v>vc1dsp.vc1_h_overlap(s>dest[dst_idx] + off, i & 4 ? s>uvlinesize : s>linesize); 
...  ...  
2409  2413 
{ 
2410  2414 
MpegEncContext *s = &v>s; 
2411  2415 
GetBitContext *gb = &s>gb; 
2412 
int i, j;


2416 
int i; 

2413  2417 
int mb_pos = s>mb_x + s>mb_y * s>mb_stride; 
2414  2418 
int cbp = 0; /* cbp decoding stuff */ 
2415  2419 
int mqdiff, mquant; /* MB quantization */ 
...  ...  
2422  2426 
int skipped, direct; 
2423  2427 
int dmv_x[2], dmv_y[2]; 
2424  2428 
int bmvtype = BMV_TYPE_BACKWARD; 
2429 
vc1_idct_func idct8x8_fn; 

2425  2430  
2426  2431 
mquant = v>pq; /* Loosy initialization */ 
2427  2432 
s>mb_intra = 0; 
...  ...  
2519  2524 
} 
2520  2525 
} 
2521  2526 
dst_idx = 0; 
2527 
idct8x8_fn = v>vc1dsp.vc1_inv_trans_8x8_put_signed[!!v>rangeredfrm]; 

2522  2528 
for (i=0; i<6; i++) 
2523  2529 
{ 
2524  2530 
s>dc_val[0][s>block_index[i]] = 0; 
...  ...  
2536  2542  
2537  2543 
vc1_decode_intra_block(v, s>block[i], i, val, mquant, (i&4)?v>codingset2:v>codingset); 
2538  2544 
if((i>3) && (s>flags & CODEC_FLAG_GRAY)) continue; 
2539 
v>vc1dsp.vc1_inv_trans_8x8(s>block[i]);


2540 
if(v>rangeredfrm) for(j = 0; j < 64; j++) s>block[i][j] <<= 1;


2541 
s>dsp.put_signed_pixels_clamped(s>block[i], s>dest[dst_idx] + off, i & 4 ? s>uvlinesize : s>linesize);


2545 
idct8x8_fn(s>dest[dst_idx] + off,


2546 
i & 4 ? s>uvlinesize : s>linesize,


2547 
s>block[i]);


2542  2548 
} else if(val) { 
2543  2549 
vc1_decode_p_block(v, s>block[i], i, mquant, ttmb, first_block, s>dest[dst_idx] + off, (i&4)?s>uvlinesize:s>linesize, (i&4) && (s>flags & CODEC_FLAG_GRAY), 0, 0, 0); 
2544  2550 
if(!v>ttmbf && ttmb < 8) ttmb = 1; 
...  ...  
2551  2557 
*/ 
2552  2558 
static void vc1_decode_i_blocks(VC1Context *v) 
2553  2559 
{ 
2554 
int k, j;


2560 
int k; 

2555  2561 
MpegEncContext *s = &v>s; 
2556  2562 
int cbp, val; 
2557  2563 
uint8_t *coded_val; 
2558  2564 
int mb_pos; 
2565 
vc1_idct_func idct8x8_fn; 

2559  2566  
2560  2567 
/* select codingmode used for VLC tables selection */ 
2561  2568 
switch(v>y_ac_table_index){ 
...  ...  
2590  2597 
s>mb_x = s>mb_y = 0; 
2591  2598 
s>mb_intra = 1; 
2592  2599 
s>first_slice_line = 1; 
2600 
if(v>pq >= 9 && v>overlap) { 

2601 
idct8x8_fn = v>vc1dsp.vc1_inv_trans_8x8_put_signed[!!v>rangeredfrm]; 

2602 
} else 

2603 
idct8x8_fn = v>vc1dsp.vc1_inv_trans_8x8_put[!!v>rangeredfrm]; 

2593  2604 
for(s>mb_y = 0; s>mb_y < s>mb_height; s>mb_y++) { 
2594  2605 
s>mb_x = 0; 
2595  2606 
ff_init_block_index(s); 
...  ...  
2626  2637 
vc1_decode_i_block(v, s>block[k], k, val, (k<4)? v>codingset : v>codingset2); 
2627  2638  
2628  2639 
if (k > 3 && (s>flags & CODEC_FLAG_GRAY)) continue; 
2629 
v>vc1dsp.vc1_inv_trans_8x8(s>block[k]); 

2630 
if(v>pq >= 9 && v>overlap) { 

2631 
if (v>rangeredfrm) for(j = 0; j < 64; j++) s>block[k][j] <<= 1; 

2632 
s>dsp.put_signed_pixels_clamped(s>block[k], dst[k], k & 4 ? s>uvlinesize : s>linesize); 

2633 
} else { 

2634 
if (v>rangeredfrm) for(j = 0; j < 64; j++) s>block[k][j] = (s>block[k][j]  64) << 1; 

2635 
s>dsp.put_pixels_clamped(s>block[k], dst[k], k & 4 ? s>uvlinesize : s>linesize); 

2636 
} 

2640 
idct8x8_fn(dst[k], 

2641 
k & 4 ? s>uvlinesize : s>linesize, 

2642 
s>block[k]); 

2637  2643 
} 
2638  2644  
2639  2645 
if(v>pq >= 9 && v>overlap) { 
...  ...  
2691  2697 
int mqdiff; 
2692  2698 
int overlap; 
2693  2699 
GetBitContext *gb = &s>gb; 
2700 
vc1_idct_func idct8x8_fn; 

2694  2701  
2695  2702 
/* select codingmode used for VLC tables selection */ 
2696  2703 
switch(v>y_ac_table_index){ 
...  ...  
2721  2728 
s>mb_x = s>mb_y = 0; 
2722  2729 
s>mb_intra = 1; 
2723  2730 
s>first_slice_line = 1; 
2731 
idct8x8_fn = v>vc1dsp.vc1_inv_trans_8x8_put_signed[0]; 

2724  2732 
for(s>mb_y = 0; s>mb_y < s>mb_height; s>mb_y++) { 
2725  2733 
s>mb_x = 0; 
2726  2734 
ff_init_block_index(s); 
...  ...  
2777  2785 
vc1_decode_i_block_adv(v, s>block[k], k, val, (k<4)? v>codingset : v>codingset2, mquant); 
2778  2786  
2779  2787 
if (k > 3 && (s>flags & CODEC_FLAG_GRAY)) continue; 
2780 
v>vc1dsp.vc1_inv_trans_8x8(s>block[k]);


2781 
s>dsp.put_signed_pixels_clamped(s>block[k], dst[k],


2782 
k & 4 ? s>uvlinesize : s>linesize);


2788 
idct8x8_fn(dst[k],


2789 
k & 4 ? s>uvlinesize : s>linesize,


2790 
s>block[k]);


2783  2791 
} 
2784  2792  
2785  2793 
if(overlap) { 
Also available in: Unified diff