x264_mc_copy_w16_neon,
};
-static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
-static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
+static const uint8_t hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
+static const uint8_t hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
static void mc_luma_neon( uint8_t *dst, int i_dst_stride,
uint8_t *src[4], int i_src_stride,
}
}
-static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
-static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
+static const uint8_t hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
+static const uint8_t hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
static void mc_luma( uint8_t *dst, int i_dst_stride,
uint8_t *src[4], int i_src_stride,
uint8_t *dst, int i_dst, int i_height );
-static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
-static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
+static const uint8_t hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
+static const uint8_t hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
static inline int x264_tapfilter( uint8_t *pix, int i_pix_next )
#define SHIFT(x,s) ((s)<=0 ? (x)<<-(s) : ((x)+(1<<((s)-1)))>>(s))
#define DIV(n,d) (((n) + ((d)>>1)) / (d))
-static const int dequant4_scale[6][3] =
+static const uint8_t dequant4_scale[6][3] =
{
{ 10, 13, 16 },
{ 11, 14, 18 },
{ 16, 20, 25 },
{ 18, 23, 29 }
};
-static const int quant4_scale[6][3] =
+static const uint16_t quant4_scale[6][3] =
{
{ 13107, 8066, 5243 },
{ 11916, 7490, 4660 },
{ 7282, 4559, 2893 },
};
-static const int quant8_scan[16] =
+static const uint8_t quant8_scan[16] =
{
0,3,4,3, 3,1,5,1, 4,5,2,5, 3,1,5,1
};
-static const int dequant8_scale[6][6] =
+static const uint8_t dequant8_scale[6][6] =
{
{ 20, 18, 32, 19, 25, 24 },
{ 22, 19, 35, 21, 28, 26 },
{ 32, 28, 51, 30, 40, 38 },
{ 36, 32, 58, 34, 46, 43 },
};
-static const int quant8_scale[6][6] =
+static const uint16_t quant8_scale[6][6] =
{
{ 13107, 11428, 20972, 12222, 16777, 15481 },
{ 11916, 10826, 19174, 11058, 14980, 14290 },
}
}
-static const int hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
-static const int hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
+static const uint8_t hpel_ref0[16] = {0,1,1,1,0,1,1,1,2,3,3,3,0,1,1,1};
+static const uint8_t hpel_ref1[16] = {0,0,0,0,2,2,3,2,2,2,3,2,2,2,3,2};
#define MC_LUMA(name,instr1,instr2)\
static void mc_luma_##name( uint8_t *dst, int i_dst_stride,\
/* Slices used and PSNR */
for( int i = 0; i < 5; i++ )
{
- static const int slice_order[] = { SLICE_TYPE_I, SLICE_TYPE_SI, SLICE_TYPE_P, SLICE_TYPE_SP, SLICE_TYPE_B };
- static const char *slice_name[] = { "P", "B", "I", "SP", "SI" };
+ static const uint8_t slice_order[] = { SLICE_TYPE_I, SLICE_TYPE_SI, SLICE_TYPE_P, SLICE_TYPE_SP, SLICE_TYPE_B };
+ static const char * const slice_name[] = { "P", "B", "I", "SP", "SI" };
int i_slice = slice_order[i];
if( h->stat.i_frame_count[i_slice] > 0 )
int i = 1;
do
{
- static const int hex4[16][2] = {
+ static const int8_t hex4[16][2] = {
{ 0,-4}, { 0, 4}, {-2,-3}, { 2,-3},
{-4,-2}, { 4,-2}, {-4,-1}, { 4,-1},
{-4, 0}, { 4, 0}, {-4, 1}, { 4, 1},
if( sps->vui.b_aspect_ratio_info_present )
{
int i;
- static const struct { int w, h; int sar; } sar[] =
+ static const struct { uint8_t w, h, sar; } sar[] =
{
{ 1, 1, 1 }, { 12, 11, 2 }, { 10, 11, 3 }, { 16, 11, 4 },
{ 40, 33, 5 }, { 24, 11, 6 }, { 20, 11, 7 }, { 32, 11, 8 },
{ 80, 33, 9 }, { 18, 11, 10}, { 15, 11, 11}, { 64, 33, 12},
- { 160,99, 13}, { 0, 0, -1 }
+ { 160,99, 13}, { 0, 0, 255 }
};
- for( i = 0; sar[i].sar != -1; i++ )
+ for( i = 0; sar[i].sar != 255; i++ )
{
if( sar[i].w == sps->vui.i_sar_width &&
sar[i].h == sps->vui.i_sar_height )
break;
}
- if( sar[i].sar != -1 )
+ bs_write( s, 8, sar[i].sar );
+ if( sar[i].sar == 255 ) /* aspect_ratio_idc (extended) */
{
- bs_write( s, 8, sar[i].sar );
- }
- else
- {
- bs_write( s, 8, 255); /* aspect_ratio_idc (extended) */
bs_write( s, 16, sps->vui.i_sar_width );
bs_write( s, 16, sps->vui.i_sar_height );
}