summaryrefslogtreecommitdiff
path: root/libavcodec/vc1data.h
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2006-09-09 11:21:56 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2006-09-09 11:21:56 +0000
commit1dc1ce643e141e78c7a10d98c51f3c9f01802e81 (patch)
treea104fc72f44510e7835c16a042f9b439ce2fc718 /libavcodec/vc1data.h
parent0288a7474b89fe388440f766de20a5cad66cd805 (diff)
downloadffmpeg-1dc1ce643e141e78c7a10d98c51f3c9f01802e81.tar.gz
Proper support for B/BI frames
Originally committed as revision 6207 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/vc1data.h')
-rw-r--r--libavcodec/vc1data.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/vc1data.h b/libavcodec/vc1data.h
index 9f9e21b4a4..bffa7b83b3 100644
--- a/libavcodec/vc1data.h
+++ b/libavcodec/vc1data.h
@@ -6,6 +6,7 @@
#ifndef VC1DATA_H
#define VC1DATA_H
+#if 0 //original bfraction from vc9data.h, not conforming to standard
/* Denominator used for vc1_bfraction_lut */
#define B_FRACTION_DEN 840
@@ -19,6 +20,22 @@ const int16_t vc1_bfraction_lut[23] = {
525 /*5/8*/, 735 /*7/8*/,
-1 /*inv.*/, 0 /*BI fm*/
};
+#else
+/* Denominator used for vc1_bfraction_lut */
+#define B_FRACTION_DEN 256
+
+/* pre-computed scales for all bfractions and base=256 */
+const int16_t vc1_bfraction_lut[23] = {
+ 128 /*1/2*/, 85 /*1/3*/, 170 /*2/3*/, 64 /*1/4*/,
+ 192 /*3/4*/, 51 /*1/5*/, 102 /*2/5*/,
+ 153 /*3/5*/, 204 /*4/5*/, 43 /*1/6*/, 215 /*5/6*/,
+ 37 /*1/7*/, 74 /*2/7*/, 111 /*3/7*/, 148 /*4/7*/,
+ 185 /*5/7*/, 222 /*6/7*/, 32 /*1/8*/, 96 /*3/8*/,
+ 160 /*5/8*/, 224 /*7/8*/,
+ -1 /*inv.*/, 0 /*BI fm*/
+};
+#endif
+
const uint8_t vc1_bfraction_bits[23] = {
3, 3, 3, 3,
3, 3, 3,