diff libavcodec/cell/h264_tables.h @ 2:897f711a7157

rearrange to work with autoconf
author Nina Engelhardt <nengel@mailbox.tu-berlin.de>
date Tue, 25 Sep 2012 15:55:33 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/libavcodec/cell/h264_tables.h	Tue Sep 25 15:55:33 2012 +0200
     1.3 @@ -0,0 +1,83 @@
     1.4 +#ifndef H264_TABLES_H
     1.5 +#define H264_TABLES_H
     1.6 +
     1.7 +#define MAX_NEG_CROP       1024
     1.8 +
     1.9 +extern uint8_t ff_cropTbl[256+2 *MAX_NEG_CROP];
    1.10 +extern int block_offset[16+4+4];
    1.11 +
    1.12 +static const uint8_t scan8[16 + 2*4]={
    1.13 +	4+1*8, 5+1*8, 4+2*8, 5+2*8,
    1.14 +	6+1*8, 7+1*8, 6+2*8, 7+2*8,
    1.15 +	4+3*8, 5+3*8, 4+4*8, 5+4*8,
    1.16 +	6+3*8, 7+3*8, 6+4*8, 7+4*8,
    1.17 +	1+1*8, 2+1*8,
    1.18 +	1+2*8, 2+2*8,
    1.19 +	1+4*8, 2+4*8,
    1.20 +	1+5*8, 2+5*8,
    1.21 +};
    1.22 +
    1.23 +static const uint8_t ff_zigzag_direct[64] = {
    1.24 +    0,   1,  8, 16,  9,  2,  3, 10,
    1.25 +    17, 24, 32, 25, 18, 11,  4,  5,
    1.26 +    12, 19, 26, 33, 40, 48, 41, 34,
    1.27 +    27, 20, 13,  6,  7, 14, 21, 28,
    1.28 +    35, 42, 49, 56, 57, 50, 43, 36,
    1.29 +    29, 22, 15, 23, 30, 37, 44, 51,
    1.30 +    58, 59, 52, 45, 38, 31, 39, 46,
    1.31 +    53, 60, 61, 54, 47, 55, 62, 63
    1.32 +};
    1.33 +
    1.34 +static const uint8_t zigzag_scan[16]={
    1.35 + 0+0*4, 1+0*4, 0+1*4, 0+2*4,
    1.36 + 1+1*4, 2+0*4, 3+0*4, 2+1*4,
    1.37 + 1+2*4, 0+3*4, 1+3*4, 2+2*4,
    1.38 + 3+1*4, 3+2*4, 2+3*4, 3+3*4,
    1.39 +};
    1.40 +
    1.41 +static const uint8_t luma_dc_zigzag_scan[16]={
    1.42 + 0*16 + 0*64, 1*16 + 0*64, 2*16 + 0*64, 0*16 + 2*64,
    1.43 + 3*16 + 0*64, 0*16 + 1*64, 1*16 + 1*64, 2*16 + 1*64,
    1.44 + 1*16 + 2*64, 2*16 + 2*64, 3*16 + 2*64, 0*16 + 3*64,
    1.45 + 3*16 + 1*64, 1*16 + 3*64, 2*16 + 3*64, 3*16 + 3*64,
    1.46 +};
    1.47 +
    1.48 +static const uint8_t chroma_dc_scan[4]={
    1.49 + (0+0*2)*16, (1+0*2)*16,
    1.50 + (0+1*2)*16, (1+1*2)*16,  //FIXME
    1.51 +};
    1.52 +
    1.53 +static const uint8_t rem6[52]={
    1.54 +0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
    1.55 +};
    1.56 +
    1.57 +static const uint8_t div6[52]={
    1.58 +0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8,
    1.59 +};
    1.60 +
    1.61 +static const uint8_t dequant4_coeff_init[6][3]={
    1.62 +  {10,13,16},
    1.63 +  {11,14,18},
    1.64 +  {13,16,20},
    1.65 +  {14,18,23},
    1.66 +  {16,20,25},
    1.67 +  {18,23,29},
    1.68 +};
    1.69 +
    1.70 +static const uint8_t dequant8_coeff_init_scan[16] = {
    1.71 +  0,3,4,3, 3,1,5,1, 4,5,2,5, 3,1,5,1
    1.72 +};
    1.73 +static const uint8_t dequant8_coeff_init[6][6]={
    1.74 +  {20,18,32,19,25,24},
    1.75 +  {22,19,35,21,28,26},
    1.76 +  {26,23,42,24,33,31},
    1.77 +  {28,25,45,26,35,33},
    1.78 +  {32,28,51,30,40,38},
    1.79 +  {36,32,58,34,46,43},
    1.80 +};
    1.81 +
    1.82 +
    1.83 +void init_block_offset(int linesize, int uvlinesize);
    1.84 +void ff_cropTbl_init();
    1.85 +
    1.86 +#endif