#include <string.h>
#include "common.h"
-#include "macroblock.h"
-
-static const uint8_t block_idx_x[16] =
-{
- 0, 1, 0, 1, 2, 3, 2, 3, 0, 1, 0, 1, 2, 3, 2, 3
-};
-static const uint8_t block_idx_y[16] =
-{
- 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3
-};
-static const uint8_t block_idx_xy[4][4] =
-{
- { 0, 2, 8, 10},
- { 1, 3, 9, 11},
- { 4, 6, 12, 14},
- { 5, 7, 13, 15}
-};
static const int dequant_mf[6][4][4] =
{
{ {18, 23, 18, 23}, {23, 29, 23, 29}, {18, 23, 18, 23}, {23, 29, 23, 29} }
};
-static const int dequant8_mf[6][8][8] =
-{
- {
- {20, 19, 25, 19, 20, 19, 25, 19},
- {19, 18, 24, 18, 19, 18, 24, 18},
- {25, 24, 32, 24, 25, 24, 32, 24},
- {19, 18, 24, 18, 19, 18, 24, 18},
- {20, 19, 25, 19, 20, 19, 25, 19},
- {19, 18, 24, 18, 19, 18, 24, 18},
- {25, 24, 32, 24, 25, 24, 32, 24},
- {19, 18, 24, 18, 19, 18, 24, 18}
- }, {
- {22, 21, 28, 21, 22, 21, 28, 21},
- {21, 19, 26, 19, 21, 19, 26, 19},
- {28, 26, 35, 26, 28, 26, 35, 26},
- {21, 19, 26, 19, 21, 19, 26, 19},
- {22, 21, 28, 21, 22, 21, 28, 21},
- {21, 19, 26, 19, 21, 19, 26, 19},
- {28, 26, 35, 26, 28, 26, 35, 26},
- {21, 19, 26, 19, 21, 19, 26, 19}
- }, {
- {26, 24, 33, 24, 26, 24, 33, 24},
- {24, 23, 31, 23, 24, 23, 31, 23},
- {33, 31, 42, 31, 33, 31, 42, 31},
- {24, 23, 31, 23, 24, 23, 31, 23},
- {26, 24, 33, 24, 26, 24, 33, 24},
- {24, 23, 31, 23, 24, 23, 31, 23},
- {33, 31, 42, 31, 33, 31, 42, 31},
- {24, 23, 31, 23, 24, 23, 31, 23}
- }, {
- {28, 26, 35, 26, 28, 26, 35, 26},
- {26, 25, 33, 25, 26, 25, 33, 25},
- {35, 33, 45, 33, 35, 33, 45, 33},
- {26, 25, 33, 25, 26, 25, 33, 25},
- {28, 26, 35, 26, 28, 26, 35, 26},
- {26, 25, 33, 25, 26, 25, 33, 25},
- {35, 33, 45, 33, 35, 33, 45, 33},
- {26, 25, 33, 25, 26, 25, 33, 25}
- }, {
- {32, 30, 40, 30, 32, 30, 40, 30},
- {30, 28, 38, 28, 30, 28, 38, 28},
- {40, 38, 51, 38, 40, 38, 51, 38},
- {30, 28, 38, 28, 30, 28, 38, 28},
- {32, 30, 40, 30, 32, 30, 40, 30},
- {30, 28, 38, 28, 30, 28, 38, 28},
- {40, 38, 51, 38, 40, 38, 51, 38},
- {30, 28, 38, 28, 30, 28, 38, 28}
- }, {
- {36, 34, 46, 34, 36, 34, 46, 34},
- {34, 32, 43, 32, 34, 32, 43, 32},
- {46, 43, 58, 43, 46, 43, 58, 43},
- {34, 32, 43, 32, 34, 32, 43, 32},
- {36, 34, 46, 34, 36, 34, 46, 34},
- {34, 32, 43, 32, 34, 32, 43, 32},
- {46, 43, 58, 43, 46, 43, 58, 43},
- {34, 32, 43, 32, 34, 32, 43, 32}
- }
-};
-
int x264_mb_predict_intra4x4_mode( x264_t *h, int idx )
{
const int ma = h->mb.cache.intra4x4_pred_mode[x264_scan8[idx] - 1];
58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63
};
+static const uint8_t block_idx_x[16] =
+{
+ 0, 1, 0, 1, 2, 3, 2, 3, 0, 1, 0, 1, 2, 3, 2, 3
+};
+static const uint8_t block_idx_y[16] =
+{
+ 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3
+};
+static const uint8_t block_idx_xy[4][4] =
+{
+ { 0, 2, 8, 10 },
+ { 1, 3, 9, 11 },
+ { 4, 6, 12, 14 },
+ { 5, 7, 13, 15 }
+};
+
+static const int i_chroma_qp_table[52] =
+{
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
+ 29, 30, 31, 32, 32, 33, 34, 34, 35, 35,
+ 36, 36, 37, 37, 37, 38, 38, 38, 39, 39,
+ 39, 39
+};
+
void x264_macroblock_cache_init( x264_t *h );
void x264_macroblock_slice_init( x264_t *h );
#include "macroblock.h"
-static const uint8_t block_idx_x[16] =
-{
- 0, 1, 0, 1, 2, 3, 2, 3, 0, 1, 0, 1, 2, 3, 2, 3
-};
-static const uint8_t block_idx_y[16] =
-{
- 0, 0, 1, 1, 0, 0, 1, 1, 2, 2, 3, 3, 2, 2, 3, 3
-};
-static const uint8_t block_idx_xy[4][4] =
-{
- { 0, 2, 8, 10 },
- { 1, 3, 9, 11 },
- { 4, 6, 12, 14 },
- { 5, 7, 13, 15 }
-};
-
/* def_quant4_mf only for probe_skip; actual encoding uses matrices from set.c */
/* FIXME this seems to make better decisions with cqm=jvt, but could screw up
* with general custom matrices. */
{ 7282, 4559, 7282, 4559 }, { 4559, 2893, 4559, 2893 } }
};
-static const int i_chroma_qp_table[52] =
-{
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
- 29, 30, 31, 32, 32, 33, 34, 34, 35, 35,
- 36, 36, 37, 37, 37, 38, 38, 38, 39, 39,
- 39, 39
-};
-
/****************************************************************************
* Scan and Quant functions
****************************************************************************/