Mercurial > libavcodec.hg
comparison msmpeg4.c @ 2615:0d88e3f89379 libavcodec
avoid UPDATE_CACHE() in GET_RL_VLC() if not needed
author | michael |
---|---|
date | Mon, 18 Apr 2005 20:07:48 +0000 |
parents | 81a9f883a17a |
children | 511e3afc43e1 |
comparison
equal
deleted
inserted
replaced
2614:5e24800ab329 | 2615:0d88e3f89379 |
---|---|
1729 } | 1729 } |
1730 { | 1730 { |
1731 OPEN_READER(re, &s->gb); | 1731 OPEN_READER(re, &s->gb); |
1732 for(;;) { | 1732 for(;;) { |
1733 UPDATE_CACHE(re, &s->gb); | 1733 UPDATE_CACHE(re, &s->gb); |
1734 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2); | 1734 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 0); |
1735 if (level==0) { | 1735 if (level==0) { |
1736 int cache; | 1736 int cache; |
1737 cache= GET_CACHE(re, &s->gb); | 1737 cache= GET_CACHE(re, &s->gb); |
1738 /* escape */ | 1738 /* escape */ |
1739 if (s->msmpeg4_version==1 || (cache&0x80000000)==0) { | 1739 if (s->msmpeg4_version==1 || (cache&0x80000000)==0) { |
1827 LAST_SKIP_BITS(re, &s->gb, 2); | 1827 LAST_SKIP_BITS(re, &s->gb, 2); |
1828 UPDATE_CACHE(re, &s->gb); | 1828 UPDATE_CACHE(re, &s->gb); |
1829 #else | 1829 #else |
1830 SKIP_BITS(re, &s->gb, 2); | 1830 SKIP_BITS(re, &s->gb, 2); |
1831 #endif | 1831 #endif |
1832 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2); | 1832 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1); |
1833 i+= run + rl->max_run[run>>7][level/qmul] + run_diff; //FIXME opt indexing | 1833 i+= run + rl->max_run[run>>7][level/qmul] + run_diff; //FIXME opt indexing |
1834 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); | 1834 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); |
1835 LAST_SKIP_BITS(re, &s->gb, 1); | 1835 LAST_SKIP_BITS(re, &s->gb, 1); |
1836 #ifdef ERROR_DETAILS | 1836 #ifdef ERROR_DETAILS |
1837 if(run==66) | 1837 if(run==66) |
1846 LAST_SKIP_BITS(re, &s->gb, 1); | 1846 LAST_SKIP_BITS(re, &s->gb, 1); |
1847 UPDATE_CACHE(re, &s->gb); | 1847 UPDATE_CACHE(re, &s->gb); |
1848 #else | 1848 #else |
1849 SKIP_BITS(re, &s->gb, 1); | 1849 SKIP_BITS(re, &s->gb, 1); |
1850 #endif | 1850 #endif |
1851 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2); | 1851 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1); |
1852 i+= run; | 1852 i+= run; |
1853 level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing | 1853 level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing |
1854 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); | 1854 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); |
1855 LAST_SKIP_BITS(re, &s->gb, 1); | 1855 LAST_SKIP_BITS(re, &s->gb, 1); |
1856 #ifdef ERROR_DETAILS | 1856 #ifdef ERROR_DETAILS |