Revision aac8b769 libavcodec/h264.c

View differences:

libavcodec/h264.c
5848 5848

  
5849 5849
    if( bS[0] < 4 ) {
5850 5850
        int8_t tc[4];
5851
        for(i=0; i<4; i++)
5852
            tc[i] = bS[i] ? (tc0_table+52)[index_a][bS[i] - 1] : -1;
5851
        tc[0] = (tc0_table+52)[index_a][bS[0]];
5852
        tc[1] = (tc0_table+52)[index_a][bS[1]];
5853
        tc[2] = (tc0_table+52)[index_a][bS[2]];
5854
        tc[3] = (tc0_table+52)[index_a][bS[3]];
5853 5855
        h->s.dsp.h264_h_loop_filter_luma(pix, stride, alpha, beta, tc);
5854 5856
    } else {
5855 5857
        h->s.dsp.h264_h_loop_filter_luma_intra(pix, stride, alpha, beta);
......
5863 5865

  
5864 5866
    if( bS[0] < 4 ) {
5865 5867
        int8_t tc[4];
5866
        for(i=0; i<4; i++)
5867
            tc[i] = bS[i] ? (tc0_table+52)[index_a][bS[i] - 1] + 1 : 0;
5868
        tc[0] = (tc0_table+52)[index_a][bS[0]]+1;
5869
        tc[1] = (tc0_table+52)[index_a][bS[1]]+1;
5870
        tc[2] = (tc0_table+52)[index_a][bS[2]]+1;
5871
        tc[3] = (tc0_table+52)[index_a][bS[3]]+1;
5868 5872
        h->s.dsp.h264_h_loop_filter_chroma(pix, stride, alpha, beta, tc);
5869 5873
    } else {
5870 5874
        h->s.dsp.h264_h_loop_filter_chroma_intra(pix, stride, alpha, beta);
......
5895 5899
        beta  = (beta_table+52)[qp[qp_index] + h->slice_beta_offset];
5896 5900

  
5897 5901
        if( bS[bS_index] < 4 ) {
5898
            const int tc0 = (tc0_table+52)[index_a][bS[bS_index] - 1];
5902
            const int tc0 = (tc0_table+52)[index_a][bS[bS_index]];
5899 5903
            const int p0 = pix[-1];
5900 5904
            const int p1 = pix[-2];
5901 5905
            const int p2 = pix[-3];
......
5989 5993
        beta  = (beta_table+52)[qp[qp_index] + h->slice_beta_offset];
5990 5994

  
5991 5995
        if( bS[bS_index] < 4 ) {
5992
            const int tc = (tc0_table+52)[index_a][bS[bS_index] - 1] + 1;
5996
            const int tc = (tc0_table+52)[index_a][bS[bS_index]] + 1;
5993 5997
            const int p0 = pix[-1];
5994 5998
            const int p1 = pix[-2];
5995 5999
            const int q0 = pix[0];
......
6031 6035

  
6032 6036
    if( bS[0] < 4 ) {
6033 6037
        int8_t tc[4];
6034
        for(i=0; i<4; i++)
6035
            tc[i] = bS[i] ? (tc0_table+52)[index_a][bS[i] - 1] : -1;
6038
        tc[0] = (tc0_table+52)[index_a][bS[0]];
6039
        tc[1] = (tc0_table+52)[index_a][bS[1]];
6040
        tc[2] = (tc0_table+52)[index_a][bS[2]];
6041
        tc[3] = (tc0_table+52)[index_a][bS[3]];
6036 6042
        h->s.dsp.h264_v_loop_filter_luma(pix, stride, alpha, beta, tc);
6037 6043
    } else {
6038 6044
        h->s.dsp.h264_v_loop_filter_luma_intra(pix, stride, alpha, beta);
......
6047 6053

  
6048 6054
    if( bS[0] < 4 ) {
6049 6055
        int8_t tc[4];
6050
        for(i=0; i<4; i++)
6051
            tc[i] = bS[i] ? (tc0_table+52)[index_a][bS[i] - 1] + 1 : 0;
6056
        tc[0] = (tc0_table+52)[index_a][bS[0]]+1;
6057
        tc[1] = (tc0_table+52)[index_a][bS[1]]+1;
6058
        tc[2] = (tc0_table+52)[index_a][bS[2]]+1;
6059
        tc[3] = (tc0_table+52)[index_a][bS[3]]+1;
6052 6060
        h->s.dsp.h264_v_loop_filter_chroma(pix, stride, alpha, beta, tc);
6053 6061
    } else {
6054 6062
        h->s.dsp.h264_v_loop_filter_chroma_intra(pix, stride, alpha, beta);

Also available in: Unified diff