Revision 12802ec0 libavcodec/vc1dec.c

View differences:

libavcodec/vc1dec.c
160 160

  
161 161
/** @} */ //Bitplane group
162 162

  
163
static void vc1_loop_filter_iblk(MpegEncContext *s, int pq)
163
static void vc1_loop_filter_iblk(VC1Context *v, int pq)
164 164
{
165
    MpegEncContext *s = &v->s;
165 166
    int j;
166 167
    if (!s->first_slice_line) {
167
        s->dsp.vc1_v_loop_filter16(s->dest[0], s->linesize, pq);
168
        v->vc1dsp.vc1_v_loop_filter16(s->dest[0], s->linesize, pq);
168 169
        if (s->mb_x)
169
            s->dsp.vc1_h_loop_filter16(s->dest[0] - 16*s->linesize, s->linesize, pq);
170
        s->dsp.vc1_h_loop_filter16(s->dest[0] - 16*s->linesize+8, s->linesize, pq);
170
            v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16*s->linesize, s->linesize, pq);
171
        v->vc1dsp.vc1_h_loop_filter16(s->dest[0] - 16*s->linesize+8, s->linesize, pq);
171 172
        for(j = 0; j < 2; j++){
172
            s->dsp.vc1_v_loop_filter8(s->dest[j+1], s->uvlinesize, pq);
173
            v->vc1dsp.vc1_v_loop_filter8(s->dest[j+1], s->uvlinesize, pq);
173 174
            if (s->mb_x)
174
                s->dsp.vc1_h_loop_filter8(s->dest[j+1]-8*s->uvlinesize, s->uvlinesize, pq);
175
                v->vc1dsp.vc1_h_loop_filter8(s->dest[j+1]-8*s->uvlinesize, s->uvlinesize, pq);
175 176
        }
176 177
    }
177
    s->dsp.vc1_v_loop_filter16(s->dest[0] + 8*s->linesize, s->linesize, pq);
178
    v->vc1dsp.vc1_v_loop_filter16(s->dest[0] + 8*s->linesize, s->linesize, pq);
178 179

  
179 180
    if (s->mb_y == s->mb_height-1) {
180 181
        if (s->mb_x) {
181
            s->dsp.vc1_h_loop_filter16(s->dest[0], s->linesize, pq);
182
            s->dsp.vc1_h_loop_filter8(s->dest[1], s->uvlinesize, pq);
183
            s->dsp.vc1_h_loop_filter8(s->dest[2], s->uvlinesize, pq);
182
            v->vc1dsp.vc1_h_loop_filter16(s->dest[0], s->linesize, pq);
183
            v->vc1dsp.vc1_h_loop_filter8(s->dest[1], s->uvlinesize, pq);
184
            v->vc1dsp.vc1_h_loop_filter8(s->dest[2], s->uvlinesize, pq);
184 185
        }
185
        s->dsp.vc1_h_loop_filter16(s->dest[0] + 8, s->linesize, pq);
186
        v->vc1dsp.vc1_h_loop_filter16(s->dest[0] + 8, s->linesize, pq);
186 187
    }
187 188
}
188 189

  
......
342 343

  
343 344
    if(s->mspel) {
344 345
        dxy = ((my & 3) << 2) | (mx & 3);
345
        dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0]    , srcY    , s->linesize, v->rnd);
346
        dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8, srcY + 8, s->linesize, v->rnd);
346
        v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0]    , srcY    , s->linesize, v->rnd);
347
        v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8, srcY + 8, s->linesize, v->rnd);
347 348
        srcY += s->linesize * 8;
348
        dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize    , srcY    , s->linesize, v->rnd);
349
        dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd);
349
        v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize    , srcY    , s->linesize, v->rnd);
350
        v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd);
350 351
    } else { // hpel mc - always used for luma
351 352
        dxy = (my & 2) | ((mx & 2) >> 1);
352 353

  
......
364 365
        dsp->put_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
365 366
        dsp->put_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
366 367
    }else{
367
        dsp->put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
368
        dsp->put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
368
        v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
369
        v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
369 370
    }
370 371
}
371 372

  
......
433 434

  
434 435
    if(s->mspel) {
435 436
        dxy = ((my & 3) << 2) | (mx & 3);
436
        dsp->put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off, srcY, s->linesize, v->rnd);
437
        v->vc1dsp.put_vc1_mspel_pixels_tab[dxy](s->dest[0] + off, srcY, s->linesize, v->rnd);
437 438
    } else { // hpel mc - always used for luma
438 439
        dxy = (my & 2) | ((mx & 2) >> 1);
439 440
        if(!v->rnd)
......
583 584
        dsp->put_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
584 585
        dsp->put_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
585 586
    }else{
586
        dsp->put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
587
        dsp->put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
587
        v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
588
        v->vc1dsp.put_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
588 589
    }
589 590
}
590 591

  
......
906 907

  
907 908
    if(s->mspel) {
908 909
        dxy = ((my & 3) << 2) | (mx & 3);
909
        dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0]    , srcY    , s->linesize, v->rnd);
910
        dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8, srcY + 8, s->linesize, v->rnd);
910
        v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0]    , srcY    , s->linesize, v->rnd);
911
        v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8, srcY + 8, s->linesize, v->rnd);
911 912
        srcY += s->linesize * 8;
912
        dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize    , srcY    , s->linesize, v->rnd);
913
        dsp->avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd);
913
        v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize    , srcY    , s->linesize, v->rnd);
914
        v->vc1dsp.avg_vc1_mspel_pixels_tab[dxy](s->dest[0] + 8 * s->linesize + 8, srcY + 8, s->linesize, v->rnd);
914 915
    } else { // hpel mc
915 916
        dxy = (my & 2) | ((mx & 2) >> 1);
916 917

  
......
928 929
        dsp->avg_h264_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
929 930
        dsp->avg_h264_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
930 931
    }else{
931
        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
932
        dsp->avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
932
        v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[1], srcU, s->uvlinesize, 8, uvmx, uvmy);
933
        v->vc1dsp.avg_no_rnd_vc1_chroma_pixels_tab[0](s->dest[2], srcV, s->uvlinesize, 8, uvmx, uvmy);
933 934
    }
934 935
}
935 936

  
......
2039 2040
        }
2040 2041
        if(!skip_block){
2041 2042
            if(i==1)
2042
                s->dsp.vc1_inv_trans_8x8_dc(dst, linesize, block);
2043
                v->vc1dsp.vc1_inv_trans_8x8_dc(dst, linesize, block);
2043 2044
            else{
2044
                s->dsp.vc1_inv_trans_8x8(block);
2045
                v->vc1dsp.vc1_inv_trans_8x8(block);
2045 2046
                s->dsp.add_pixels_clamped(block, dst, linesize);
2046 2047
            }
2047 2048
            if(apply_filter && cbp_top  & 0xC)
2048
                s->dsp.vc1_v_loop_filter8(dst, linesize, v->pq);
2049
                v->vc1dsp.vc1_v_loop_filter8(dst, linesize, v->pq);
2049 2050
            if(apply_filter && cbp_left & 0xA)
2050
                s->dsp.vc1_h_loop_filter8(dst, linesize, v->pq);
2051
                v->vc1dsp.vc1_h_loop_filter8(dst, linesize, v->pq);
2051 2052
        }
2052 2053
        break;
2053 2054
    case TT_4X4:
......
2068 2069
            }
2069 2070
            if(!(subblkpat & (1 << (3 - j))) && !skip_block){
2070 2071
                if(i==1)
2071
                    s->dsp.vc1_inv_trans_4x4_dc(dst + (j&1)*4 + (j&2)*2*linesize, linesize, block + off);
2072
                    v->vc1dsp.vc1_inv_trans_4x4_dc(dst + (j&1)*4 + (j&2)*2*linesize, linesize, block + off);
2072 2073
                else
2073
                    s->dsp.vc1_inv_trans_4x4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, block + off);
2074
                    v->vc1dsp.vc1_inv_trans_4x4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, block + off);
2074 2075
                if(apply_filter && (j&2 ? pat & (1<<(j-2)) : (cbp_top & (1 << (j + 2)))))
2075
                    s->dsp.vc1_v_loop_filter4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, v->pq);
2076
                    v->vc1dsp.vc1_v_loop_filter4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, v->pq);
2076 2077
                if(apply_filter && (j&1 ? pat & (1<<(j-1)) : (cbp_left & (1 << (j + 1)))))
2077
                    s->dsp.vc1_h_loop_filter4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, v->pq);
2078
                    v->vc1dsp.vc1_h_loop_filter4(dst + (j&1)*4 + (j&2)*2*linesize, linesize, v->pq);
2078 2079
            }
2079 2080
        }
2080 2081
        break;
......
2096 2097
            }
2097 2098
            if(!(subblkpat & (1 << (1 - j))) && !skip_block){
2098 2099
                if(i==1)
2099
                    s->dsp.vc1_inv_trans_8x4_dc(dst + j*4*linesize, linesize, block + off);
2100
                    v->vc1dsp.vc1_inv_trans_8x4_dc(dst + j*4*linesize, linesize, block + off);
2100 2101
                else
2101
                    s->dsp.vc1_inv_trans_8x4(dst + j*4*linesize, linesize, block + off);
2102
                    v->vc1dsp.vc1_inv_trans_8x4(dst + j*4*linesize, linesize, block + off);
2102 2103
                if(apply_filter && j ? pat & 0x3 : (cbp_top & 0xC))
2103
                    s->dsp.vc1_v_loop_filter8(dst + j*4*linesize, linesize, v->pq);
2104
                    v->vc1dsp.vc1_v_loop_filter8(dst + j*4*linesize, linesize, v->pq);
2104 2105
                if(apply_filter && cbp_left & (2 << j))
2105
                    s->dsp.vc1_h_loop_filter4(dst + j*4*linesize, linesize, v->pq);
2106
                    v->vc1dsp.vc1_h_loop_filter4(dst + j*4*linesize, linesize, v->pq);
2106 2107
            }
2107 2108
        }
2108 2109
        break;
......
2124 2125
            }
2125 2126
            if(!(subblkpat & (1 << (1 - j))) && !skip_block){
2126 2127
                if(i==1)
2127
                    s->dsp.vc1_inv_trans_4x8_dc(dst + j*4, linesize, block + off);
2128
                    v->vc1dsp.vc1_inv_trans_4x8_dc(dst + j*4, linesize, block + off);
2128 2129
                else
2129
                    s->dsp.vc1_inv_trans_4x8(dst + j*4, linesize, block + off);
2130
                    v->vc1dsp.vc1_inv_trans_4x8(dst + j*4, linesize, block + off);
2130 2131
                if(apply_filter && cbp_top & (2 << j))
2131
                    s->dsp.vc1_v_loop_filter4(dst + j*4, linesize, v->pq);
2132
                    v->vc1dsp.vc1_v_loop_filter4(dst + j*4, linesize, v->pq);
2132 2133
                if(apply_filter && j ? pat & 0x5 : (cbp_left & 0xA))
2133
                    s->dsp.vc1_h_loop_filter8(dst + j*4, linesize, v->pq);
2134
                    v->vc1dsp.vc1_h_loop_filter8(dst + j*4, linesize, v->pq);
2134 2135
            }
2135 2136
        }
2136 2137
        break;
......
2232 2233

  
2233 2234
                    vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset);
2234 2235
                    if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;
2235
                    s->dsp.vc1_inv_trans_8x8(s->block[i]);
2236
                    v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
2236 2237
                    if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;
2237 2238
                    s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2238 2239
                    if(v->pq >= 9 && v->overlap) {
2239 2240
                        if(v->c_avail)
2240
                            s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2241
                            v->vc1dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2241 2242
                        if(v->a_avail)
2242
                            s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2243
                            v->vc1dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2243 2244
                    }
2244 2245
                    if(apply_loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
2245 2246
                        int left_cbp, top_cbp;
......
2251 2252
                            top_cbp  = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
2252 2253
                        }
2253 2254
                        if(left_cbp & 0xC)
2254
                            s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2255
                            v->vc1dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2255 2256
                        if(top_cbp  & 0xA)
2256
                            s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2257
                            v->vc1dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2257 2258
                    }
2258 2259
                    block_cbp |= 0xF << (i << 2);
2259 2260
                } else if(val) {
......
2268 2269
                            top_cbp  = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
2269 2270
                        }
2270 2271
                        if(left_cbp & 0xC)
2271
                            s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2272
                            v->vc1dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2272 2273
                        if(top_cbp  & 0xA)
2273
                            s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2274
                            v->vc1dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2274 2275
                    }
2275 2276
                    pat = 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), filter, left_cbp, top_cbp);
2276 2277
                    block_cbp |= pat << (i << 2);
......
2363 2364

  
2364 2365
                    vc1_decode_intra_block(v, s->block[i], i, is_coded[i], mquant, (i&4)?v->codingset2:v->codingset);
2365 2366
                    if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;
2366
                    s->dsp.vc1_inv_trans_8x8(s->block[i]);
2367
                    v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
2367 2368
                    if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;
2368 2369
                    s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, (i&4)?s->uvlinesize:s->linesize);
2369 2370
                    if(v->pq >= 9 && v->overlap) {
2370 2371
                        if(v->c_avail)
2371
                            s->dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2372
                            v->vc1dsp.vc1_h_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2372 2373
                        if(v->a_avail)
2373
                            s->dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2374
                            v->vc1dsp.vc1_v_overlap(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2374 2375
                    }
2375 2376
                    if(v->s.loop_filter && s->mb_x && s->mb_x != (s->mb_width - 1) && s->mb_y && s->mb_y != (s->mb_height - 1)){
2376 2377
                        int left_cbp, top_cbp;
......
2382 2383
                            top_cbp  = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
2383 2384
                        }
2384 2385
                        if(left_cbp & 0xC)
2385
                            s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2386
                            v->vc1dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2386 2387
                        if(top_cbp  & 0xA)
2387
                            s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2388
                            v->vc1dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2388 2389
                    }
2389 2390
                    block_cbp |= 0xF << (i << 2);
2390 2391
                } else if(is_coded[i]) {
......
2399 2400
                            top_cbp  = (i & 2) ? (cbp >> ((i-2)*4)) : (v->cbp[s->mb_x - s->mb_stride] >> ((i+2)*4));
2400 2401
                        }
2401 2402
                        if(left_cbp & 0xC)
2402
                            s->dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2403
                            v->vc1dsp.vc1_v_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2403 2404
                        if(top_cbp  & 0xA)
2404
                            s->dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2405
                            v->vc1dsp.vc1_h_loop_filter8(s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize, v->pq);
2405 2406
                    }
2406 2407
                    pat = 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), filter, left_cbp, top_cbp);
2407 2408
                    block_cbp |= pat << (i << 2);
......
2568 2569

  
2569 2570
            vc1_decode_intra_block(v, s->block[i], i, val, mquant, (i&4)?v->codingset2:v->codingset);
2570 2571
            if((i>3) && (s->flags & CODEC_FLAG_GRAY)) continue;
2571
            s->dsp.vc1_inv_trans_8x8(s->block[i]);
2572
            v->vc1dsp.vc1_inv_trans_8x8(s->block[i]);
2572 2573
            if(v->rangeredfrm) for(j = 0; j < 64; j++) s->block[i][j] <<= 1;
2573 2574
            s->dsp.put_signed_pixels_clamped(s->block[i], s->dest[dst_idx] + off, i & 4 ? s->uvlinesize : s->linesize);
2574 2575
        } else if(val) {
......
2650 2651

  
2651 2652
                vc1_decode_i_block(v, s->block[k], k, val, (k<4)? v->codingset : v->codingset2);
2652 2653

  
2653
                s->dsp.vc1_inv_trans_8x8(s->block[k]);
2654
                v->vc1dsp.vc1_inv_trans_8x8(s->block[k]);
2654 2655
                if(v->pq >= 9 && v->overlap) {
2655 2656
                    for(j = 0; j < 64; j++) s->block[k][j] += 128;
2656 2657
                }
......
2659 2660
            vc1_put_block(v, s->block);
2660 2661
            if(v->pq >= 9 && v->overlap) {
2661 2662
                if(s->mb_x) {
2662
                    s->dsp.vc1_h_overlap(s->dest[0], s->linesize);
2663
                    s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2663
                    v->vc1dsp.vc1_h_overlap(s->dest[0], s->linesize);
2664
                    v->vc1dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2664 2665
                    if(!(s->flags & CODEC_FLAG_GRAY)) {
2665
                        s->dsp.vc1_h_overlap(s->dest[1], s->uvlinesize);
2666
                        s->dsp.vc1_h_overlap(s->dest[2], s->uvlinesize);
2666
                        v->vc1dsp.vc1_h_overlap(s->dest[1], s->uvlinesize);
2667
                        v->vc1dsp.vc1_h_overlap(s->dest[2], s->uvlinesize);
2667 2668
                    }
2668 2669
                }
2669
                s->dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize);
2670
                s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2670
                v->vc1dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize);
2671
                v->vc1dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2671 2672
                if(!s->first_slice_line) {
2672
                    s->dsp.vc1_v_overlap(s->dest[0], s->linesize);
2673
                    s->dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize);
2673
                    v->vc1dsp.vc1_v_overlap(s->dest[0], s->linesize);
2674
                    v->vc1dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize);
2674 2675
                    if(!(s->flags & CODEC_FLAG_GRAY)) {
2675
                        s->dsp.vc1_v_overlap(s->dest[1], s->uvlinesize);
2676
                        s->dsp.vc1_v_overlap(s->dest[2], s->uvlinesize);
2676
                        v->vc1dsp.vc1_v_overlap(s->dest[1], s->uvlinesize);
2677
                        v->vc1dsp.vc1_v_overlap(s->dest[2], s->uvlinesize);
2677 2678
                    }
2678 2679
                }
2679
                s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2680
                s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2680
                v->vc1dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2681
                v->vc1dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2681 2682
            }
2682
            if(v->s.loop_filter) vc1_loop_filter_iblk(s, v->pq);
2683
            if(v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq);
2683 2684

  
2684 2685
            if(get_bits_count(&s->gb) > v->bits) {
2685 2686
                ff_er_add_slice(s, 0, 0, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END));
......
2790 2791

  
2791 2792
                vc1_decode_i_block_adv(v, s->block[k], k, val, (k<4)? v->codingset : v->codingset2, mquant);
2792 2793

  
2793
                s->dsp.vc1_inv_trans_8x8(s->block[k]);
2794
                v->vc1dsp.vc1_inv_trans_8x8(s->block[k]);
2794 2795
                for(j = 0; j < 64; j++) s->block[k][j] += 128;
2795 2796
            }
2796 2797

  
2797 2798
            vc1_put_block(v, s->block);
2798 2799
            if(overlap) {
2799 2800
                if(s->mb_x) {
2800
                    s->dsp.vc1_h_overlap(s->dest[0], s->linesize);
2801
                    s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2801
                    v->vc1dsp.vc1_h_overlap(s->dest[0], s->linesize);
2802
                    v->vc1dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2802 2803
                    if(!(s->flags & CODEC_FLAG_GRAY)) {
2803
                        s->dsp.vc1_h_overlap(s->dest[1], s->uvlinesize);
2804
                        s->dsp.vc1_h_overlap(s->dest[2], s->uvlinesize);
2804
                        v->vc1dsp.vc1_h_overlap(s->dest[1], s->uvlinesize);
2805
                        v->vc1dsp.vc1_h_overlap(s->dest[2], s->uvlinesize);
2805 2806
                    }
2806 2807
                }
2807
                s->dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize);
2808
                s->dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2808
                v->vc1dsp.vc1_h_overlap(s->dest[0] + 8, s->linesize);
2809
                v->vc1dsp.vc1_h_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2809 2810
                if(!s->first_slice_line) {
2810
                    s->dsp.vc1_v_overlap(s->dest[0], s->linesize);
2811
                    s->dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize);
2811
                    v->vc1dsp.vc1_v_overlap(s->dest[0], s->linesize);
2812
                    v->vc1dsp.vc1_v_overlap(s->dest[0] + 8, s->linesize);
2812 2813
                    if(!(s->flags & CODEC_FLAG_GRAY)) {
2813
                        s->dsp.vc1_v_overlap(s->dest[1], s->uvlinesize);
2814
                        s->dsp.vc1_v_overlap(s->dest[2], s->uvlinesize);
2814
                        v->vc1dsp.vc1_v_overlap(s->dest[1], s->uvlinesize);
2815
                        v->vc1dsp.vc1_v_overlap(s->dest[2], s->uvlinesize);
2815 2816
                    }
2816 2817
                }
2817
                s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2818
                s->dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2818
                v->vc1dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize, s->linesize);
2819
                v->vc1dsp.vc1_v_overlap(s->dest[0] + 8 * s->linesize + 8, s->linesize);
2819 2820
            }
2820
            if(v->s.loop_filter) vc1_loop_filter_iblk(s, v->pq);
2821
            if(v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq);
2821 2822

  
2822 2823
            if(get_bits_count(&s->gb) > v->bits) {
2823 2824
                ff_er_add_slice(s, 0, 0, s->mb_x, s->mb_y, (AC_END|DC_END|MV_END));
......
2929 2930
                av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i at %ix%i\n", get_bits_count(&s->gb), v->bits,s->mb_x,s->mb_y);
2930 2931
                return;
2931 2932
            }
2932
            if(v->s.loop_filter) vc1_loop_filter_iblk(s, v->pq);
2933
            if(v->s.loop_filter) vc1_loop_filter_iblk(v, v->pq);
2933 2934
        }
2934 2935
        if (!v->s.loop_filter)
2935 2936
            ff_draw_horiz_band(s, s->mb_y * 16, 16);
......
3023 3024
    if(ff_msmpeg4_decode_init(avctx) < 0)
3024 3025
        return -1;
3025 3026
    if (vc1_init_common(v) < 0) return -1;
3027
    ff_vc1dsp_init(&v->vc1dsp);
3026 3028
    for (i = 0; i < 64;  i++) {
3027 3029
#define transpose(x) ((x>>3) | ((x&7)<<3))
3028 3030
        v->zz_8x8[0][i] = transpose(wmv1_scantable[0][i]);

Also available in: Unified diff