Mercurial > libavcodec.hg
comparison mpegvideo_enc.c @ 8218:03054192daac libavcodec
Move aanscales tables to their own file; fixes compilation without encoders.
based on a patch by David Geldreich, david.geldreich free fr
author | diego |
---|---|
date | Wed, 26 Nov 2008 13:38:13 +0000 |
parents | f88ab1c3e333 |
children | 596677256482 |
comparison
equal
deleted
inserted
replaced
8217:f88ab1c3e333 | 8218:03054192daac |
---|---|
33 #include "mpegvideo_common.h" | 33 #include "mpegvideo_common.h" |
34 #include "mjpegenc.h" | 34 #include "mjpegenc.h" |
35 #include "msmpeg4.h" | 35 #include "msmpeg4.h" |
36 #include "h263.h" | 36 #include "h263.h" |
37 #include "faandct.h" | 37 #include "faandct.h" |
38 #include "aandcttab.h" | |
38 #include <limits.h> | 39 #include <limits.h> |
39 | 40 |
40 //#undef NDEBUG | 41 //#undef NDEBUG |
41 //#include <assert.h> | 42 //#include <assert.h> |
42 | 43 |
46 | 47 |
47 /* enable all paranoid tests for rounding, overflows, etc... */ | 48 /* enable all paranoid tests for rounding, overflows, etc... */ |
48 //#define PARANOID | 49 //#define PARANOID |
49 | 50 |
50 //#define DEBUG | 51 //#define DEBUG |
51 | |
52 static const uint16_t ff_aanscales[64] = { | |
53 /* precomputed values scaled up by 14 bits */ | |
54 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, | |
55 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, | |
56 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, | |
57 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, | |
58 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, | |
59 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, | |
60 8867 , 12299, 11585, 10426, 8867, 6967, 4799, 2446, | |
61 4520 , 6270, 5906, 5315, 4520, 3552, 2446, 1247 | |
62 }; | |
63 | |
64 const uint16_t ff_inv_aanscales[64] = { | |
65 4096, 2953, 3135, 3483, 4096, 5213, 7568, 14846, | |
66 2953, 2129, 2260, 2511, 2953, 3759, 5457, 10703, | |
67 3135, 2260, 2399, 2666, 3135, 3990, 5793, 11363, | |
68 3483, 2511, 2666, 2962, 3483, 4433, 6436, 12625, | |
69 4096, 2953, 3135, 3483, 4096, 5213, 7568, 14846, | |
70 5213, 3759, 3990, 4433, 5213, 6635, 9633, 18895, | |
71 7568, 5457, 5793, 6436, 7568, 9633, 13985, 27432, | |
72 14846, 10703, 11363, 12625, 14846, 18895, 27432, 53809, | |
73 }; | |
74 | 52 |
75 static uint8_t default_mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; | 53 static uint8_t default_mv_penalty[MAX_FCODE+1][MAX_MV*2+1]; |
76 static uint8_t default_fcode_tab[MAX_MV*2+1]; | 54 static uint8_t default_fcode_tab[MAX_MV*2+1]; |
77 | 55 |
78 void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t (*qmat16)[2][64], | 56 void ff_convert_matrix(DSPContext *dsp, int (*qmat)[64], uint16_t (*qmat16)[2][64], |