[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec mpeg12.c, 1.229, 1.230 h263.c, 1.273, 1.274 msmpeg4.c, 1.84, 1.85 bitstream.h, 1.149, 1.150 mdec.c, 1.13, 1.14
Michael Niedermayer CVS
michael
Mon Apr 18 22:07:50 CEST 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv10159
Modified Files:
mpeg12.c h263.c msmpeg4.c bitstream.h mdec.c
Log Message:
avoid UPDATE_CACHE() in GET_RL_VLC() if not needed
Index: mpeg12.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mpeg12.c,v
retrieving revision 1.229
retrieving revision 1.230
diff -u -d -r1.229 -r1.230
--- mpeg12.c 4 Apr 2005 11:25:44 -0000 1.229
+++ mpeg12.c 18 Apr 2005 20:07:48 -0000 1.230
@@ -1507,7 +1507,7 @@
/* now quantify & encode AC coefs */
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
if(level == 127){
break;
@@ -1583,7 +1583,7 @@
/* now quantify & encode AC coefs */
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
if(level == 127){
break;
@@ -1656,7 +1656,7 @@
/* now quantify & encode AC coefs */
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
if(level == 127){
break;
@@ -1737,7 +1737,7 @@
/* now quantify & encode AC coefs */
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
if(level == 127){
break;
@@ -1805,7 +1805,7 @@
/* now quantify & encode AC coefs */
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
if(level == 127){
break;
@@ -1879,7 +1879,7 @@
/* now quantify & encode AC coefs */
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
if(level == 127){
break;
Index: h263.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/h263.c,v
retrieving revision 1.273
retrieving revision 1.274
diff -u -d -r1.273 -r1.274
--- h263.c 23 Mar 2005 11:39:38 -0000 1.273
+++ h263.c 18 Apr 2005 20:07:48 -0000 1.274
@@ -4797,7 +4797,7 @@
OPEN_READER(re, &s->gb);
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 0);
if (level==0) {
/* escape */
if(rvlc){
@@ -4908,7 +4908,7 @@
#else
SKIP_BITS(re, &s->gb, 2);
#endif
- GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
i+= run + rl->max_run[run>>7][level/qmul] +1; //FIXME opt indexing
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
LAST_SKIP_BITS(re, &s->gb, 1);
@@ -4921,7 +4921,7 @@
#else
SKIP_BITS(re, &s->gb, 1);
#endif
- GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
i+= run;
level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
Index: msmpeg4.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/msmpeg4.c,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -d -r1.84 -r1.85
--- msmpeg4.c 30 Jan 2005 16:34:57 -0000 1.84
+++ msmpeg4.c 18 Apr 2005 20:07:48 -0000 1.85
@@ -1731,7 +1731,7 @@
OPEN_READER(re, &s->gb);
for(;;) {
UPDATE_CACHE(re, &s->gb);
- GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 0);
if (level==0) {
int cache;
cache= GET_CACHE(re, &s->gb);
@@ -1829,7 +1829,7 @@
#else
SKIP_BITS(re, &s->gb, 2);
#endif
- GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
i+= run + rl->max_run[run>>7][level/qmul] + run_diff; //FIXME opt indexing
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
LAST_SKIP_BITS(re, &s->gb, 1);
@@ -1848,7 +1848,7 @@
#else
SKIP_BITS(re, &s->gb, 1);
#endif
- GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &s->gb, rl_vlc, TEX_VLC_BITS, 2, 1);
i+= run;
level = level + rl->max_level[run>>7][(run-1)&63] * qmul;//FIXME opt indexing
level = (level ^ SHOW_SBITS(re, &s->gb, 1)) - SHOW_SBITS(re, &s->gb, 1);
Index: bitstream.h
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/bitstream.h,v
retrieving revision 1.149
retrieving revision 1.150
diff -u -d -r1.149 -r1.150
--- bitstream.h 18 Apr 2005 12:08:16 -0000 1.149
+++ bitstream.h 18 Apr 2005 20:07:48 -0000 1.150
@@ -727,7 +727,7 @@
SKIP_BITS(name, gb, n)\
}
-#define GET_RL_VLC(level, run, name, gb, table, bits, max_depth)\
+#define GET_RL_VLC(level, run, name, gb, table, bits, max_depth, need_update)\
{\
int n, index, nb_bits;\
\
@@ -736,8 +736,10 @@
n = table[index].len;\
\
if(max_depth > 1 && n < 0){\
- LAST_SKIP_BITS(name, gb, bits)\
- UPDATE_CACHE(name, gb)\
+ SKIP_BITS(name, gb, bits)\
+ if(need_update){\
+ UPDATE_CACHE(name, gb)\
+ }\
\
nb_bits = -n;\
\
Index: mdec.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/mdec.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- mdec.c 23 Jan 2005 18:09:06 -0000 1.13
+++ mdec.c 18 Apr 2005 20:07:48 -0000 1.14
@@ -81,7 +81,7 @@
/* now quantify & encode AC coefs */
for(;;) {
UPDATE_CACHE(re, &a->gb);
- GET_RL_VLC(level, run, re, &a->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2);
+ GET_RL_VLC(level, run, re, &a->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
if(level == 127){
break;
More information about the ffmpeg-cvslog
mailing list