[FFmpeg-cvslog] r9890 - trunk/libavcodec/mpeg12.c
michael
subversion
Sat Aug 4 13:01:11 CEST 2007
Author: michael
Date: Sat Aug 4 13:01:11 2007
New Revision: 9890
Log:
make mpeg1/2 decoder work ith the libmpeg2 style bitstream reader
Modified:
trunk/libavcodec/mpeg12.c
Modified: trunk/libavcodec/mpeg12.c
==============================================================================
--- trunk/libavcodec/mpeg12.c (original)
+++ trunk/libavcodec/mpeg12.c Sat Aug 4 13:01:11 2007
@@ -737,7 +737,9 @@ static inline int mpeg1_decode_block_int
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
goto end;
}
-
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
/* now quantify & encode AC coefs */
for(;;) {
GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
@@ -777,9 +779,14 @@ static inline int mpeg1_decode_block_int
}
block[j] = level;
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
break;
+#if MIN_CACHE_BITS >= 19
UPDATE_CACHE(re, &s->gb);
+#endif
}
end:
LAST_SKIP_BITS(re, &s->gb, 2);
@@ -812,6 +819,9 @@ static inline int mpeg1_fast_decode_bloc
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
goto end;
}
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
/* now quantify & encode AC coefs */
for(;;) {
@@ -848,9 +858,14 @@ static inline int mpeg1_fast_decode_bloc
}
block[j] = level;
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
break;
+#if MIN_CACHE_BITS >= 19
UPDATE_CACHE(re, &s->gb);
+#endif
}
end:
LAST_SKIP_BITS(re, &s->gb, 2);
@@ -895,6 +910,9 @@ static inline int mpeg2_decode_block_non
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
goto end;
}
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
/* now quantify & encode AC coefs */
for(;;) {
@@ -928,9 +946,14 @@ static inline int mpeg2_decode_block_non
mismatch ^= level;
block[j] = level;
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
break;
+#if MIN_CACHE_BITS >= 19
UPDATE_CACHE(re, &s->gb);
+#endif
}
end:
LAST_SKIP_BITS(re, &s->gb, 2);
@@ -965,6 +988,9 @@ static inline int mpeg2_fast_decode_bloc
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
goto end;
}
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
/* now quantify & encode AC coefs */
for(;;) {
@@ -993,9 +1019,14 @@ static inline int mpeg2_fast_decode_bloc
}
block[j] = level;
+#if MIN_CACHE_BITS < 19
+ UPDATE_CACHE(re, &s->gb);
+#endif
if(((int32_t)GET_CACHE(re, &s->gb)) <= (int32_t)0xBFFFFFFF)
break;
+#if MIN_CACHE_BITS >=19
UPDATE_CACHE(re, &s->gb);
+#endif
}
end:
LAST_SKIP_BITS(re, &s->gb, 2);
More information about the ffmpeg-cvslog
mailing list