Revision 91d51ee4

View differences:

libavcodec/aacdec.c
1062 1062

  
1063 1063
                            UPDATE_CACHE(re, gb);
1064 1064
                            GET_VLC(code, re, gb, vlc_tab, 8, 2);
1065
#if MIN_CACHE_BITS < 20
1066
                            UPDATE_CACHE(re, gb);
1067
#endif
1068 1065
                            cb_idx = cb_vector_idx[code];
1069 1066
                            nnz = cb_idx >> 8 & 15;
1070 1067
                            bits = SHOW_UBITS(re, gb, nnz) << (32-nnz);
......
1157 1154
                                        return -1;
1158 1155
                                    }
1159 1156

  
1160
#if MIN_CACHE_BITS < 21
1161
                                    LAST_SKIP_BITS(re, gb, b + 1);
1162
                                    UPDATE_CACHE(re, gb);
1163
#else
1164 1157
                                    SKIP_BITS(re, gb, b + 1);
1165
#endif
1166 1158
                                    b += 4;
1167 1159
                                    n = (1 << b) + SHOW_UBITS(re, gb, b);
1168 1160
                                    LAST_SKIP_BITS(re, gb, b);
libavcodec/mpeg12.c
718 718
            if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
719 719
                goto end;
720 720
        }
721
#if MIN_CACHE_BITS < 19
722
        UPDATE_CACHE(re, &s->gb);
723
#endif
724 721
        /* now quantify & encode AC coefficients */
725 722
        for(;;) {
726 723
            GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
......
760 757
            }
761 758

  
762 759
            block[j] = level;
763
#if MIN_CACHE_BITS < 19
764
            UPDATE_CACHE(re, &s->gb);
765
#endif
766 760
            if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
767 761
                break;
768
#if MIN_CACHE_BITS >= 19
769 762
            UPDATE_CACHE(re, &s->gb);
770
#endif
771 763
        }
772 764
end:
773 765
        LAST_SKIP_BITS(re, &s->gb, 2);
......
800 792
            if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
801 793
                goto end;
802 794
        }
803
#if MIN_CACHE_BITS < 19
804
        UPDATE_CACHE(re, &s->gb);
805
#endif
806 795

  
807 796
        /* now quantify & encode AC coefficients */
808 797
        for(;;) {
......
839 828
            }
840 829

  
841 830
            block[j] = level;
842
#if MIN_CACHE_BITS < 19
843
            UPDATE_CACHE(re, &s->gb);
844
#endif
845 831
            if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
846 832
                break;
847
#if MIN_CACHE_BITS >= 19
848 833
            UPDATE_CACHE(re, &s->gb);
849
#endif
850 834
        }
851 835
end:
852 836
        LAST_SKIP_BITS(re, &s->gb, 2);
......
891 875
            if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
892 876
                goto end;
893 877
        }
894
#if MIN_CACHE_BITS < 19
895
        UPDATE_CACHE(re, &s->gb);
896
#endif
897 878

  
898 879
        /* now quantify & encode AC coefficients */
899 880
        for(;;) {
......
927 908

  
928 909
            mismatch ^= level;
929 910
            block[j] = level;
930
#if MIN_CACHE_BITS < 19
931
            UPDATE_CACHE(re, &s->gb);
932
#endif
933 911
            if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
934 912
                break;
935
#if MIN_CACHE_BITS >= 19
936 913
            UPDATE_CACHE(re, &s->gb);
937
#endif
938 914
        }
939 915
end:
940 916
        LAST_SKIP_BITS(re, &s->gb, 2);
......
969 945
        if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
970 946
            goto end;
971 947
    }
972
#if MIN_CACHE_BITS < 19
973
    UPDATE_CACHE(re, &s->gb);
974
#endif
975 948

  
976 949
    /* now quantify & encode AC coefficients */
977 950
    for(;;) {
......
1000 973
        }
1001 974

  
1002 975
        block[j] = level;
1003
#if MIN_CACHE_BITS < 19
1004
        UPDATE_CACHE(re, &s->gb);
1005
#endif
1006 976
        if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
1007 977
            break;
1008
#if MIN_CACHE_BITS >=19
1009 978
        UPDATE_CACHE(re, &s->gb);
1010
#endif
1011 979
    }
1012 980
end:
1013 981
    LAST_SKIP_BITS(re, &s->gb, 2);
libavcodec/mpeg4videodec.c
1023 1023
                    if(last) i+=192;
1024 1024
                } else {
1025 1025
                    /* second escape */
1026
#if MIN_CACHE_BITS < 20
1027
                    LAST_SKIP_BITS(re, &s->gb, 2);
1028
                    UPDATE_CACHE(re, &s->gb);
1029
#else
1030 1026
                    SKIP_BITS(re, &s->gb, 2);
1031
#endif
1032 1027
                    GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
1033 1028
                    i+= run + rl->max_run[run>>7][level/qmul] +1; //FIXME opt indexing
1034 1029
                    level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
......
1036 1031
                }
1037 1032
            } else {
1038 1033
                /* first escape */
1039
#if MIN_CACHE_BITS < 19
1040
                LAST_SKIP_BITS(re, &s->gb, 1);
1041
                UPDATE_CACHE(re, &s->gb);
1042
#else
1043 1034
                SKIP_BITS(re, &s->gb, 1);
1044
#endif
1045 1035
                GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
1046 1036
                i+= run;
1047 1037
                level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing
libavcodec/msmpeg4.c
1797 1797
#endif
1798 1798
                } else {
1799 1799
                    /* second escape */
1800
#if MIN_CACHE_BITS < 23
1801
                    LAST_SKIP_BITS(re, &s->gb, 2);
1802
                    UPDATE_CACHE(re, &s->gb);
1803
#else
1804 1800
                    SKIP_BITS(re, &s->gb, 2);
1805
#endif
1806 1801
                    GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
1807 1802
                    i+= run + rl->max_run[run>>7][level/qmul] + run_diff; //FIXME opt indexing
1808 1803
                    level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
......
1816 1811
                }
1817 1812
            } else {
1818 1813
                /* first escape */
1819
#if MIN_CACHE_BITS < 22
1820
                LAST_SKIP_BITS(re, &s->gb, 1);
1821
                UPDATE_CACHE(re, &s->gb);
1822
#else
1823 1814
                SKIP_BITS(re, &s->gb, 1);
1824
#endif
1825 1815
                GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
1826 1816
                i+= run;
1827 1817
                level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing

Also available in: Unified diff