Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2013-03-04 03:47:11 +0400
committerMartin Storsjö <martin@martin.st>2013-04-08 13:38:33 +0400
commitd2ec6ea6c6c0276aaf0063c5a7290f8e11fcdb06 (patch)
tree89cfd43f007e671dfdce9bcd1c6d9c4c6de213d4 /libavcodec/dsputil.c
parent9e0f14f16cfc9456a691655fda7d01090bffe47e (diff)
lavc: Move ff_cropTbl and ff_zigzag_direct from dsputil to mathtables
These are widely used throughout libavcodec, nothing dsputil-specific. Change ff_cropTbl to a statically initialized table, to avoid initializing it with a function call. Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r--libavcodec/dsputil.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 35494a3e2f..f91432c451 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -41,7 +41,6 @@
#include "mpegvideo.h"
#include "config.h"
-uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, };
uint32_t ff_squareTbl[512] = {0, };
#define BIT_DEPTH 9
@@ -59,17 +58,6 @@ uint32_t ff_squareTbl[512] = {0, };
#define pb_7f (~0UL/255 * 0x7f)
#define pb_80 (~0UL/255 * 0x80)
-const uint8_t ff_zigzag_direct[64] = {
- 0, 1, 8, 16, 9, 2, 3, 10,
- 17, 24, 32, 25, 18, 11, 4, 5,
- 12, 19, 26, 33, 40, 48, 41, 34,
- 27, 20, 13, 6, 7, 14, 21, 28,
- 35, 42, 49, 56, 57, 50, 43, 36,
- 29, 22, 15, 23, 30, 37, 44, 51,
- 58, 59, 52, 45, 38, 31, 39, 46,
- 53, 60, 61, 54, 47, 55, 62, 63
-};
-
/* Specific zigzag scan for 248 idct. NOTE that unlike the
specification, we interleave the fields */
const uint8_t ff_zigzag248_direct[64] = {
@@ -2498,12 +2486,6 @@ av_cold void ff_dsputil_static_init(void)
{
int i;
- for(i=0;i<256;i++) ff_cropTbl[i + MAX_NEG_CROP] = i;
- for(i=0;i<MAX_NEG_CROP;i++) {
- ff_cropTbl[i] = 0;
- ff_cropTbl[i + MAX_NEG_CROP + 256] = 255;
- }
-
for(i=0;i<512;i++) {
ff_squareTbl[i] = (i - 256) * (i - 256);
}