comparison h263.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 c22ad129a91b
children 511e3afc43e1
comparison
equal deleted inserted replaced
2614:5e24800ab329 2615:0d88e3f89379
4795 } 4795 }
4796 { 4796 {
4797 OPEN_READER(re, &s->gb); 4797 OPEN_READER(re, &s->gb);
4798 for(;;) { 4798 for(;;) {
4799 UPDATE_CACHE(re, &s->gb); 4799 UPDATE_CACHE(re, &s->gb);
4800 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2); 4800 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 0);
4801 if (level==0) { 4801 if (level==0) {
4802 /* escape */ 4802 /* escape */
4803 if(rvlc){ 4803 if(rvlc){
4804 if(SHOW_UBITS(re, &s->gb, 1)==0){ 4804 if(SHOW_UBITS(re, &s->gb, 1)==0){
4805 av_log(s->avctx, AV_LOG_ERROR, "1. marker bit missing in rvlc esc\n"); 4805 av_log(s->avctx, AV_LOG_ERROR, "1. marker bit missing in rvlc esc\n");
4906 LAST_SKIP_BITS(re, &s->gb, 2); 4906 LAST_SKIP_BITS(re, &s->gb, 2);
4907 UPDATE_CACHE(re, &s->gb); 4907 UPDATE_CACHE(re, &s->gb);
4908 #else 4908 #else
4909 SKIP_BITS(re, &s->gb, 2); 4909 SKIP_BITS(re, &s->gb, 2);
4910 #endif 4910 #endif
4911 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2); 4911 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
4912 i+= run + rl->max_run[run>>7][level/qmul] +1; //FIXME opt indexing 4912 i+= run + rl->max_run[run>>7][level/qmul] +1; //FIXME opt indexing
4913 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); 4913 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
4914 LAST_SKIP_BITS(re, &s->gb, 1); 4914 LAST_SKIP_BITS(re, &s->gb, 1);
4915 } 4915 }
4916 } else { 4916 } else {
4919 LAST_SKIP_BITS(re, &s->gb, 1); 4919 LAST_SKIP_BITS(re, &s->gb, 1);
4920 UPDATE_CACHE(re, &s->gb); 4920 UPDATE_CACHE(re, &s->gb);
4921 #else 4921 #else
4922 SKIP_BITS(re, &s->gb, 1); 4922 SKIP_BITS(re, &s->gb, 1);
4923 #endif 4923 #endif
4924 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2); 4924 GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
4925 i+= run; 4925 i+= run;
4926 level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing 4926 level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing
4927 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1); 4927 level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
4928 LAST_SKIP_BITS(re, &s->gb, 1); 4928 LAST_SKIP_BITS(re, &s->gb, 1);
4929 } 4929 }