17
17
* You should have received a copy of the GNU Lesser General Public
18
18
* License along with FFmpeg; if not, write to the Free Software
19
19
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
27
26
* @author Michael Niedermayer <michaelni@gmx.at>
33
#define DIAG_DOWN_LEFT_PRED 3
34
#define DIAG_DOWN_RIGHT_PRED 4
35
#define VERT_RIGHT_PRED 5
36
#define HOR_DOWN_PRED 6
37
#define VERT_LEFT_PRED 7
40
#define LEFT_DC_PRED 9
41
#define TOP_DC_PRED 10
42
#define DC_128_PRED 11
47
#define VERT_PRED8x8 2
48
#define PLANE_PRED8x8 3
50
#define LEFT_DC_PRED8x8 4
51
#define TOP_DC_PRED8x8 5
52
#define DC_128_PRED8x8 6
29
#ifndef FFMPEG_H264DATA_H
30
#define FFMPEG_H264DATA_H
33
#include "mpegvideo.h"
54
37
#define EXTENDED_SAR 255
91
77
static const uint8_t golomb_to_pict_type[5]=
92
{P_TYPE, B_TYPE, I_TYPE, SP_TYPE, SI_TYPE};
78
{FF_P_TYPE, FF_B_TYPE, FF_I_TYPE, FF_SP_TYPE, FF_SI_TYPE};
94
80
static const uint8_t pict_type_to_golomb[7]=
95
81
{-1, 2, 0, 1, -1, 4, 3};
550
static const int dequant8_coeff_init_scan[16] = {
536
static const uint8_t dequant8_coeff_init_scan[16] = {
551
537
0,3,4,3, 3,1,5,1, 4,5,2,5, 3,1,5,1
553
static const int dequant8_coeff_init[6][6]={
539
static const uint8_t dequant8_coeff_init[6][6]={
554
540
{20,18,32,19,25,24},
555
541
{22,19,35,21,28,26},
556
542
{26,23,42,24,33,31},
620
606
/* Deblocking filter (p153) */
621
static const int alpha_table[52*3] = {
607
static const uint8_t alpha_table[52*3] = {
622
608
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
623
609
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
624
610
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
634
620
255,255,255,255,255,255,255,255,255,255,255,255,255,
635
621
255,255,255,255,255,255,255,255,255,255,255,255,255,
637
static const int beta_table[52*3] = {
623
static const uint8_t beta_table[52*3] = {
638
624
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
639
625
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
640
626
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
650
636
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
651
637
18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18,
653
static const int tc0_table[52*3][3] = {
639
static const uint8_t tc0_table[52*3][3] = {
654
640
{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
655
641
{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
656
642
{ 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 }, { 0, 0, 0 },
683
669
/* Cabac pre state table */
685
static const int cabac_context_init_I[460][2] =
671
static const int8_t cabac_context_init_I[460][2] =
688
674
{ 20, -15 }, { 2, 54 }, { 3, 74 }, { 20, -15 },
851
837
{ 29, 9 }, { 35, 20 }, { 29, 36 }, { 14, 67 }
854
static const int cabac_context_init_PB[3][460][2] =
840
static const int8_t cabac_context_init_PB[3][460][2] =
856
842
/* i_cabac_init_idc == 0 */
1321
1307
{ 31, 12 }, { 37, 23 }, { 31, 38 }, { 20, 64 },
1311
#endif /* FFMPEG_H264DATA_H */