Revision aac8b769

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);
libavcodec/h264data.h
547 547
    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
548 548
    18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
549 549
};
550
static const uint8_t tc0_table[52*3][3] = {
551
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
552
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
553
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
554
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
555
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
556
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
557
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
558
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
559
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
560
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
561
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
562
    { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 1 },
563
    { 0, 0, 1 }, { 0, 0, 1 }, { 0, 0, 1 }, { 0, 1, 1 }, { 0, 1, 1 }, { 1, 1, 1 },
564
    { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 1 }, { 1, 1, 2 }, { 1, 1, 2 }, { 1, 1, 2 },
565
    { 1, 1, 2 }, { 1, 2, 3 }, { 1, 2, 3 }, { 2, 2, 3 }, { 2, 2, 4 }, { 2, 3, 4 },
566
    { 2, 3, 4 }, { 3, 3, 5 }, { 3, 4, 6 }, { 3, 4, 6 }, { 4, 5, 7 }, { 4, 5, 8 },
567
    { 4, 6, 9 }, { 5, 7,10 }, { 6, 8,11 }, { 6, 8,13 }, { 7,10,14 }, { 8,11,16 },
568
    { 9,12,18 }, {10,13,20 }, {11,15,23 }, {13,17,25 },
569
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
570
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
571
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
572
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
573
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
574
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
575
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
576
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
577
    {13,17,25 }, {13,17,25 }, {13,17,25 }, {13,17,25 },
550
static const uint8_t tc0_table[52*3][4] = {
551
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
552
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
553
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
554
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
555
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
556
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
557
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
558
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
559
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
560
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
561
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 },
562
    {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 0 }, {-1, 0, 0, 1 },
563
    {-1, 0, 0, 1 }, {-1, 0, 0, 1 }, {-1, 0, 0, 1 }, {-1, 0, 1, 1 }, {-1, 0, 1, 1 }, {-1, 1, 1, 1 },
564
    {-1, 1, 1, 1 }, {-1, 1, 1, 1 }, {-1, 1, 1, 1 }, {-1, 1, 1, 2 }, {-1, 1, 1, 2 }, {-1, 1, 1, 2 },
565
    {-1, 1, 1, 2 }, {-1, 1, 2, 3 }, {-1, 1, 2, 3 }, {-1, 2, 2, 3 }, {-1, 2, 2, 4 }, {-1, 2, 3, 4 },
566
    {-1, 2, 3, 4 }, {-1, 3, 3, 5 }, {-1, 3, 4, 6 }, {-1, 3, 4, 6 }, {-1, 4, 5, 7 }, {-1, 4, 5, 8 },
567
    {-1, 4, 6, 9 }, {-1, 5, 7,10 }, {-1, 6, 8,11 }, {-1, 6, 8,13 }, {-1, 7,10,14 }, {-1, 8,11,16 },
568
    {-1, 9,12,18 }, {-1,10,13,20 }, {-1,11,15,23 }, {-1,13,17,25 },
569
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
570
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
571
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
572
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
573
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
574
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
575
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
576
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
577
    {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 }, {-1,13,17,25 },
578 578
};
579 579

  
580 580
/* Cabac pre state table */

Also available in: Unified diff