summaryrefslogtreecommitdiff
path: root/libavcodec/mpcdata.h
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-03-10 14:28:08 -0800
committerRonald S. Bultje <rsbultje@gmail.com>2012-03-10 14:28:08 -0800
commitd7eabd50425a61b31e90c763a0c3e4316a725404 (patch)
tree7d19e9dd612725c7207c88fcf035d929bab236ee /libavcodec/mpcdata.h
parent442c3a8cb1785d74f8e2d7ab35b1862b7088436b (diff)
mpc: pad mpc_CC/SCF[] tables to allow for negative indices.
MPC8 allows indices of mpc_CC up to -1, and mpc_SCF up to -6, thus pad the tables by that much on the left end. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/mpcdata.h')
-rw-r--r--libavcodec/mpcdata.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavcodec/mpcdata.h b/libavcodec/mpcdata.h
index 397dad59d8..15724f3b74 100644
--- a/libavcodec/mpcdata.h
+++ b/libavcodec/mpcdata.h
@@ -22,13 +22,17 @@
#ifndef AVCODEC_MPCDATA_H
#define AVCODEC_MPCDATA_H
-static const float mpc_CC[18] = {
- 65536.0000, 21845.3333, 13107.2000, 9362.2857, 7281.7778, 4369.0667, 2114.0645,
+static const float mpc_CC[18+1] = {
+ 111.285962475327f, // 32768/2/255*sqrt(3)
+ 65536.0000 /* this value is never used */,
+ 21845.3333, 13107.2000, 9362.2857, 7281.7778, 4369.0667, 2114.0645,
1040.2539, 516.0315, 257.0039, 128.2505, 64.0626, 32.0156, 16.0039, 8.0010,
4.0002, 2.0001, 1.0000
};
-static const float mpc_SCF[128] = {
+static const float mpc_SCF[128+6] = {
+ 920.016296386718750000, 766.355773925781250000, 638.359558105468750000,
+ 531.741149902343750000, 442.930114746093750000, 368.952209472656250000,
307.330047607421875000, 255.999984741210937500, 213.243041992187500000, 177.627334594726562500,
147.960128784179687500, 123.247924804687500000, 102.663139343261718750, 85.516410827636718750,
71.233520507812500000, 59.336143493652343750, 49.425861358642578125, 41.170787811279296875,