From a2dc61c7a6075b5c3d34f3c7b8a9298109854035 Mon Sep 17 00:00:00 2001 From: clang-format Date: Mon, 9 May 2016 23:23:47 -0700 Subject: [PATCH] apply clang-format .c files were missed in the previous change Change-Id: I9d22cd83e1f87472bfb09e6a38284396b2fcd860 --- aom_dsp/fastssim.c | 4 +- aom_dsp/psnr.c | 28 +- aom_dsp/psnrhvs.c | 99 +- aom_dsp/ssim.c | 5 +- aomenc.c | 5 +- av1/av1_cx_iface.c | 20 +- av1/av1_dx_iface.c | 6 +- av1/common/arm/neon/iht4x4_add_neon.c | 2 +- av1/common/arm/neon/iht8x8_add_neon.c | 2 +- av1/common/av1_fwd_txfm.c | 20 +- av1/common/av1_inv_txfm.c | 48 +- av1/common/blockd.c | 14 +- av1/common/clpf.c | 6 +- av1/common/dering.c | 78 +- av1/common/entropy.c | 8 +- av1/common/entropymode.c | 304 +++---- av1/common/entropymv.c | 9 +- av1/common/frame_buffers.c | 2 +- av1/common/idct.c | 67 +- av1/common/loopfilter.c | 32 +- av1/common/mips/dspr2/itrans16_dspr2.c | 2 +- av1/common/mips/dspr2/itrans4_dspr2.c | 2 +- av1/common/mips/dspr2/itrans8_dspr2.c | 2 +- av1/common/mips/msa/idct16x16_msa.c | 2 +- av1/common/mips/msa/idct4x4_msa.c | 2 +- av1/common/mips/msa/idct8x8_msa.c | 2 +- av1/common/mvref_common.c | 258 +++--- av1/common/od_dering.c | 202 +++-- av1/common/odintrin.c | 854 +++++++++++------- av1/common/pred_common.c | 4 +- av1/common/quant_common.c | 453 +++------- av1/common/reconinter.c | 30 +- av1/common/reconintra.c | 18 +- av1/common/scale.c | 6 +- av1/common/scan.c | 6 +- av1/common/seg_common.c | 4 +- av1/common/thread_common.c | 26 +- av1/common/tile_common.c | 2 +- av1/common/x86/av1_fwd_txfm_sse2.c | 4 +- av1/common/x86/av1_inv_txfm_sse2.c | 24 +- av1/common/x86/idct_intrin_sse2.c | 6 +- av1/decoder/decodeframe.c | 69 +- av1/decoder/decodemv.c | 103 +-- av1/decoder/decoder.c | 16 +- av1/decoder/detokenize.c | 6 +- av1/decoder/dthread.c | 4 +- av1/encoder/aq_complexity.c | 2 +- av1/encoder/aq_cyclicrefresh.c | 35 +- av1/encoder/aq_variance.c | 2 +- av1/encoder/arm/neon/dct_neon.c | 18 +- av1/encoder/arm/neon/error_neon.c | 2 +- av1/encoder/arm/neon/quantize_neon.c | 12 +- av1/encoder/bitstream.c | 85 +- av1/encoder/blockiness.c | 4 +- av1/encoder/dct.c | 36 +- av1/encoder/encodeframe.c | 79 +- av1/encoder/encodemb.c | 257 ++---- av1/encoder/encodemv.c | 25 +- av1/encoder/encoder.c | 110 +-- av1/encoder/extend.c | 6 +- av1/encoder/firstpass.c | 15 +- av1/encoder/lookahead.c | 22 +- av1/encoder/mbgraph.c | 6 +- av1/encoder/mcomp.c | 146 ++- av1/encoder/mips/msa/error_msa.c | 4 +- av1/encoder/mips/msa/fdct16x16_msa.c | 2 +- av1/encoder/mips/msa/fdct4x4_msa.c | 4 +- av1/encoder/mips/msa/fdct8x8_msa.c | 2 +- av1/encoder/mips/msa/temporal_filter_msa.c | 10 +- av1/encoder/pickdering.c | 95 +- av1/encoder/picklpf.c | 8 +- av1/encoder/quantize.c | 76 +- av1/encoder/ratectrl.c | 54 +- av1/encoder/rd.c | 70 +- av1/encoder/rdopt.c | 328 ++++--- av1/encoder/resize.c | 92 +- av1/encoder/segmentation.c | 10 +- av1/encoder/speed_features.c | 3 +- av1/encoder/subexp.c | 12 +- av1/encoder/temporal_filter.c | 72 +- av1/encoder/tokenize.c | 48 +- av1/encoder/treewriter.c | 6 +- av1/encoder/x86/dct_sse2.c | 20 +- av1/encoder/x86/error_intrin_avx2.c | 2 +- .../x86/highbd_block_error_intrin_sse2.c | 4 +- av1/encoder/x86/quantize_sse2.c | 12 +- 86 files changed, 2215 insertions(+), 2447 deletions(-) diff --git a/aom_dsp/fastssim.c b/aom_dsp/fastssim.c index 1b93c311a..444440dde 100644 --- a/aom_dsp/fastssim.c +++ b/aom_dsp/fastssim.c @@ -418,8 +418,8 @@ static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) { We drop the finest scale and renormalize the rest to sum to 1.*/ static const double FS_WEIGHTS[FS_NLEVELS] = { - 0.2989654541015625, 0.3141326904296875, 0.2473602294921875, - 0.1395416259765625}; + 0.2989654541015625, 0.3141326904296875, 0.2473602294921875, 0.1395416259765625 +}; static double fs_average(fs_ctx *_ctx, int _l) { double *ssim; diff --git a/aom_dsp/psnr.c b/aom_dsp/psnr.c index 937886371..79de8c95e 100644 --- a/aom_dsp/psnr.c +++ b/aom_dsp/psnr.c @@ -201,13 +201,13 @@ int64_t aom_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a, void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr, uint32_t bit_depth, uint32_t in_bit_depth) { - const int widths[3] = {a->y_crop_width, a->uv_crop_width, a->uv_crop_width}; - const int heights[3] = {a->y_crop_height, a->uv_crop_height, - a->uv_crop_height}; - const uint8_t *a_planes[3] = {a->y_buffer, a->u_buffer, a->v_buffer}; - const int a_strides[3] = {a->y_stride, a->uv_stride, a->uv_stride}; - const uint8_t *b_planes[3] = {b->y_buffer, b->u_buffer, b->v_buffer}; - const int b_strides[3] = {b->y_stride, b->uv_stride, b->uv_stride}; + const int widths[3] = { a->y_crop_width, a->uv_crop_width, a->uv_crop_width }; + const int heights[3] = { a->y_crop_height, a->uv_crop_height, + a->uv_crop_height }; + const uint8_t *a_planes[3] = { a->y_buffer, a->u_buffer, a->v_buffer }; + const int a_strides[3] = { a->y_stride, a->uv_stride, a->uv_stride }; + const uint8_t *b_planes[3] = { b->y_buffer, b->u_buffer, b->v_buffer }; + const int b_strides[3] = { b->y_stride, b->uv_stride, b->uv_stride }; int i; uint64_t total_sse = 0; uint32_t total_samples = 0; @@ -249,13 +249,13 @@ void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, void aom_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr) { static const double peak = 255.0; - const int widths[3] = {a->y_crop_width, a->uv_crop_width, a->uv_crop_width}; - const int heights[3] = {a->y_crop_height, a->uv_crop_height, - a->uv_crop_height}; - const uint8_t *a_planes[3] = {a->y_buffer, a->u_buffer, a->v_buffer}; - const int a_strides[3] = {a->y_stride, a->uv_stride, a->uv_stride}; - const uint8_t *b_planes[3] = {b->y_buffer, b->u_buffer, b->v_buffer}; - const int b_strides[3] = {b->y_stride, b->uv_stride, b->uv_stride}; + const int widths[3] = { a->y_crop_width, a->uv_crop_width, a->uv_crop_width }; + const int heights[3] = { a->y_crop_height, a->uv_crop_height, + a->uv_crop_height }; + const uint8_t *a_planes[3] = { a->y_buffer, a->u_buffer, a->v_buffer }; + const int a_strides[3] = { a->y_stride, a->uv_stride, a->uv_stride }; + const uint8_t *b_planes[3] = { b->y_buffer, b->u_buffer, b->v_buffer }; + const int b_strides[3] = { b->y_stride, b->uv_stride, b->uv_stride }; int i; uint64_t total_sse = 0; uint32_t total_samples = 0; diff --git a/aom_dsp/psnrhvs.c b/aom_dsp/psnrhvs.c index 03c9a35f2..1c7fa69e3 100644 --- a/aom_dsp/psnrhvs.c +++ b/aom_dsp/psnrhvs.c @@ -54,56 +54,59 @@ static void hbd_od_bin_fdct8x8(tran_low_t *y, int ystride, const int16_t *x, * transparency. This is not the JPEG based matrix from the paper, this one gives a slightly higher MOS agreement.*/ static const double csf_y[8][8] = { - {1.6193873005, 2.2901594831, 2.08509755623, 1.48366094411, 1.00227514334, - 0.678296995242, 0.466224900598, 0.3265091542}, - {2.2901594831, 1.94321815382, 2.04793073064, 1.68731108984, 1.2305666963, - 0.868920337363, 0.61280991668, 0.436405793551}, - {2.08509755623, 2.04793073064, 1.34329019223, 1.09205635862, 0.875748795257, - 0.670882927016, 0.501731932449, 0.372504254596}, - {1.48366094411, 1.68731108984, 1.09205635862, 0.772819797575, - 0.605636379554, 0.48309405692, 0.380429446972, 0.295774038565}, - {1.00227514334, 1.2305666963, 0.875748795257, 0.605636379554, - 0.448996256676, 0.352889268808, 0.283006984131, 0.226951348204}, - {0.678296995242, 0.868920337363, 0.670882927016, 0.48309405692, - 0.352889268808, 0.27032073436, 0.215017739696, 0.17408067321}, - {0.466224900598, 0.61280991668, 0.501731932449, 0.380429446972, - 0.283006984131, 0.215017739696, 0.168869545842, 0.136153931001}, - {0.3265091542, 0.436405793551, 0.372504254596, 0.295774038565, - 0.226951348204, 0.17408067321, 0.136153931001, 0.109083846276}}; + { 1.6193873005, 2.2901594831, 2.08509755623, 1.48366094411, 1.00227514334, + 0.678296995242, 0.466224900598, 0.3265091542 }, + { 2.2901594831, 1.94321815382, 2.04793073064, 1.68731108984, 1.2305666963, + 0.868920337363, 0.61280991668, 0.436405793551 }, + { 2.08509755623, 2.04793073064, 1.34329019223, 1.09205635862, 0.875748795257, + 0.670882927016, 0.501731932449, 0.372504254596 }, + { 1.48366094411, 1.68731108984, 1.09205635862, 0.772819797575, 0.605636379554, + 0.48309405692, 0.380429446972, 0.295774038565 }, + { 1.00227514334, 1.2305666963, 0.875748795257, 0.605636379554, 0.448996256676, + 0.352889268808, 0.283006984131, 0.226951348204 }, + { 0.678296995242, 0.868920337363, 0.670882927016, 0.48309405692, + 0.352889268808, 0.27032073436, 0.215017739696, 0.17408067321 }, + { 0.466224900598, 0.61280991668, 0.501731932449, 0.380429446972, + 0.283006984131, 0.215017739696, 0.168869545842, 0.136153931001 }, + { 0.3265091542, 0.436405793551, 0.372504254596, 0.295774038565, + 0.226951348204, 0.17408067321, 0.136153931001, 0.109083846276 } +}; static const double csf_cb420[8][8] = { - {1.91113096927, 2.46074210438, 1.18284184739, 1.14982565193, 1.05017074788, - 0.898018824055, 0.74725392039, 0.615105596242}, - {2.46074210438, 1.58529308355, 1.21363250036, 1.38190029285, 1.33100189972, - 1.17428548929, 0.996404342439, 0.830890433625}, - {1.18284184739, 1.21363250036, 0.978712413627, 1.02624506078, 1.03145147362, - 0.960060382087, 0.849823426169, 0.731221236837}, - {1.14982565193, 1.38190029285, 1.02624506078, 0.861317501629, - 0.801821139099, 0.751437590932, 0.685398513368, 0.608694761374}, - {1.05017074788, 1.33100189972, 1.03145147362, 0.801821139099, - 0.676555426187, 0.605503172737, 0.55002013668, 0.495804539034}, - {0.898018824055, 1.17428548929, 0.960060382087, 0.751437590932, - 0.605503172737, 0.514674450957, 0.454353482512, 0.407050308965}, - {0.74725392039, 0.996404342439, 0.849823426169, 0.685398513368, - 0.55002013668, 0.454353482512, 0.389234902883, 0.342353999733}, - {0.615105596242, 0.830890433625, 0.731221236837, 0.608694761374, - 0.495804539034, 0.407050308965, 0.342353999733, 0.295530605237}}; + { 1.91113096927, 2.46074210438, 1.18284184739, 1.14982565193, 1.05017074788, + 0.898018824055, 0.74725392039, 0.615105596242 }, + { 2.46074210438, 1.58529308355, 1.21363250036, 1.38190029285, 1.33100189972, + 1.17428548929, 0.996404342439, 0.830890433625 }, + { 1.18284184739, 1.21363250036, 0.978712413627, 1.02624506078, 1.03145147362, + 0.960060382087, 0.849823426169, 0.731221236837 }, + { 1.14982565193, 1.38190029285, 1.02624506078, 0.861317501629, 0.801821139099, + 0.751437590932, 0.685398513368, 0.608694761374 }, + { 1.05017074788, 1.33100189972, 1.03145147362, 0.801821139099, 0.676555426187, + 0.605503172737, 0.55002013668, 0.495804539034 }, + { 0.898018824055, 1.17428548929, 0.960060382087, 0.751437590932, + 0.605503172737, 0.514674450957, 0.454353482512, 0.407050308965 }, + { 0.74725392039, 0.996404342439, 0.849823426169, 0.685398513368, + 0.55002013668, 0.454353482512, 0.389234902883, 0.342353999733 }, + { 0.615105596242, 0.830890433625, 0.731221236837, 0.608694761374, + 0.495804539034, 0.407050308965, 0.342353999733, 0.295530605237 } +}; static const double csf_cr420[8][8] = { - {2.03871978502, 2.62502345193, 1.26180942886, 1.11019789803, 1.01397751469, - 0.867069376285, 0.721500455585, 0.593906509971}, - {2.62502345193, 1.69112867013, 1.17180569821, 1.3342742857, 1.28513006198, - 1.13381474809, 0.962064122248, 0.802254508198}, - {1.26180942886, 1.17180569821, 0.944981930573, 0.990876405848, - 0.995903384143, 0.926972725286, 0.820534991409, 0.706020324706}, - {1.11019789803, 1.3342742857, 0.990876405848, 0.831632933426, 0.77418706195, - 0.725539939514, 0.661776842059, 0.587716619023}, - {1.01397751469, 1.28513006198, 0.995903384143, 0.77418706195, - 0.653238524286, 0.584635025748, 0.531064164893, 0.478717061273}, - {0.867069376285, 1.13381474809, 0.926972725286, 0.725539939514, - 0.584635025748, 0.496936637883, 0.438694579826, 0.393021669543}, - {0.721500455585, 0.962064122248, 0.820534991409, 0.661776842059, - 0.531064164893, 0.438694579826, 0.375820256136, 0.330555063063}, - {0.593906509971, 0.802254508198, 0.706020324706, 0.587716619023, - 0.478717061273, 0.393021669543, 0.330555063063, 0.285345396658}}; + { 2.03871978502, 2.62502345193, 1.26180942886, 1.11019789803, 1.01397751469, + 0.867069376285, 0.721500455585, 0.593906509971 }, + { 2.62502345193, 1.69112867013, 1.17180569821, 1.3342742857, 1.28513006198, + 1.13381474809, 0.962064122248, 0.802254508198 }, + { 1.26180942886, 1.17180569821, 0.944981930573, 0.990876405848, + 0.995903384143, 0.926972725286, 0.820534991409, 0.706020324706 }, + { 1.11019789803, 1.3342742857, 0.990876405848, 0.831632933426, 0.77418706195, + 0.725539939514, 0.661776842059, 0.587716619023 }, + { 1.01397751469, 1.28513006198, 0.995903384143, 0.77418706195, 0.653238524286, + 0.584635025748, 0.531064164893, 0.478717061273 }, + { 0.867069376285, 1.13381474809, 0.926972725286, 0.725539939514, + 0.584635025748, 0.496936637883, 0.438694579826, 0.393021669543 }, + { 0.721500455585, 0.962064122248, 0.820534991409, 0.661776842059, + 0.531064164893, 0.438694579826, 0.375820256136, 0.330555063063 }, + { 0.593906509971, 0.802254508198, 0.706020324706, 0.587716619023, + 0.478717061273, 0.393021669543, 0.330555063063, 0.285345396658 } +}; static double convert_score_db(double _score, double _weight, int bit_depth) { int16_t pix_max = 255; diff --git a/aom_dsp/ssim.c b/aom_dsp/ssim.c index f28050d32..9c6e23873 100644 --- a/aom_dsp/ssim.c +++ b/aom_dsp/ssim.c @@ -64,8 +64,8 @@ void aom_highbd_ssim_parms_8x8_c(const uint16_t *s, int sp, const uint16_t *r, } #endif // CONFIG_AOM_HIGHBITDEPTH -static const int64_t cc1 = 26634; // (64^2*(.01*255)^2 -static const int64_t cc2 = 239708; // (64^2*(.03*255)^2 +static const int64_t cc1 = 26634; // (64^2*(.01*255)^2 +static const int64_t cc2 = 239708; // (64^2*(.03*255)^2 static const int64_t cc1_10 = 428658; // (64^2*(.01*1023)^2 static const int64_t cc2_10 = 3857925; // (64^2*(.03*1023)^2 static const int64_t cc1_12 = 6868593; // (64^2*(.01*4095)^2 @@ -187,7 +187,6 @@ double aom_calc_ssim(const YV12_BUFFER_CONFIG *source, return ssimv; } - // traditional ssim as per: http://en.wikipedia.org/wiki/Structural_similarity // // Re working out the math -> diff --git a/aomenc.c b/aomenc.c index bcda3d5c1..8b59e6239 100644 --- a/aomenc.c +++ b/aomenc.c @@ -369,7 +369,7 @@ static const arg_def_t lossless = #if CONFIG_AOM_QM static const arg_def_t enable_qm = ARG_DEF(NULL, "enable_qm", 1, - "Enable quantisation matrices (0: false (default), 1: true)"); + "Enable quantisation matrices (0: false (default), 1: true)"); static const arg_def_t qm_min = ARG_DEF( NULL, "qm_min", 1, "Min quant matrix flatness (0..15), default is 8"); static const arg_def_t qm_max = ARG_DEF( @@ -1857,8 +1857,7 @@ int main(int argc, const char **argv_) { if (!input.filename) usage_exit(); /* Decide if other chroma subsamplings than 4:2:0 are supported */ - if (global.codec->fourcc == AV1_FOURCC) - input.only_i420 = 0; + if (global.codec->fourcc == AV1_FOURCC) input.only_i420 = 0; for (pass = global.pass ? global.pass - 1 : 0; pass < global.passes; pass++) { int frames_in = 0, seen_frames = 0; diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c index 14c27aa3d..6c0008a19 100644 --- a/av1/av1_cx_iface.c +++ b/av1/av1_cx_iface.c @@ -651,7 +651,7 @@ static aom_codec_err_t ctrl_set_lossless(aom_codec_alg_priv_t *ctx, #if CONFIG_AOM_QM static aom_codec_err_t ctrl_set_enable_qm(aom_codec_alg_priv_t *ctx, - va_list args) { + va_list args) { struct av1_extracfg extra_cfg = ctx->extra_cfg; extra_cfg.enable_qm = CAST(AV1E_SET_ENABLE_QM, args); return update_extra_cfg(ctx, &extra_cfg); @@ -972,7 +972,7 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx, // Store the original flags in to the frame buffer. Will extract the // key frame flag when we actually encode this frame. if (av1_receive_raw_frame(cpi, flags | ctx->next_frame_flags, &sd, - dst_time_stamp, dst_end_time_stamp)) { + dst_time_stamp, dst_end_time_stamp)) { res = update_error_state(ctx, &cpi->common.error); } ctx->next_frame_flags = 0; @@ -999,8 +999,8 @@ static aom_codec_err_t encoder_encode(aom_codec_alg_priv_t *ctx, while (cx_data_sz >= ctx->cx_data_sz / 2 && -1 != av1_get_compressed_data(cpi, &lib_flags, &size, cx_data, - &dst_time_stamp, &dst_end_time_stamp, - !img)) { + &dst_time_stamp, &dst_end_time_stamp, + !img)) { if (size) { aom_codec_cx_pkt_t pkt; @@ -1094,8 +1094,8 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx, YV12_BUFFER_CONFIG sd; image2yuvconfig(&frame->img, &sd); - av1_set_reference_enc(ctx->cpi, - ref_frame_to_av1_reframe(frame->frame_type), &sd); + av1_set_reference_enc(ctx->cpi, ref_frame_to_av1_reframe(frame->frame_type), + &sd); return AOM_CODEC_OK; } else { return AOM_CODEC_INVALID_PARAM; @@ -1111,7 +1111,7 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx, image2yuvconfig(&frame->img, &sd); av1_copy_reference_enc(ctx->cpi, - ref_frame_to_av1_reframe(frame->frame_type), &sd); + ref_frame_to_av1_reframe(frame->frame_type), &sd); return AOM_CODEC_OK; } else { return AOM_CODEC_INVALID_PARAM; @@ -1166,7 +1166,7 @@ static aom_codec_err_t ctrl_set_active_map(aom_codec_alg_priv_t *ctx, if (map) { if (!av1_set_active_map(ctx->cpi, map->active_map, (int)map->rows, - (int)map->cols)) + (int)map->cols)) return AOM_CODEC_OK; else return AOM_CODEC_INVALID_PARAM; @@ -1181,7 +1181,7 @@ static aom_codec_err_t ctrl_get_active_map(aom_codec_alg_priv_t *ctx, if (map) { if (!av1_get_active_map(ctx->cpi, map->active_map, (int)map->rows, - (int)map->cols)) + (int)map->cols)) return AOM_CODEC_OK; else return AOM_CODEC_INVALID_PARAM; @@ -1197,7 +1197,7 @@ static aom_codec_err_t ctrl_set_scale_mode(aom_codec_alg_priv_t *ctx, if (mode) { const int res = av1_set_internal_size(ctx->cpi, (AOM_SCALING)mode->h_scaling_mode, - (AOM_SCALING)mode->v_scaling_mode); + (AOM_SCALING)mode->v_scaling_mode); return (res == 0) ? AOM_CODEC_OK : AOM_CODEC_INVALID_PARAM; } else { return AOM_CODEC_INVALID_PARAM; diff --git a/av1/av1_dx_iface.c b/av1/av1_dx_iface.c index a10288fc5..47fa97fa3 100644 --- a/av1/av1_dx_iface.c +++ b/av1/av1_dx_iface.c @@ -574,7 +574,7 @@ static aom_codec_err_t decoder_decode(aom_codec_alg_priv_t *ctx, } res = av1_parse_superframe_index(data, data_sz, frame_sizes, &frame_count, - ctx->decrypt_cb, ctx->decrypt_state); + ctx->decrypt_cb, ctx->decrypt_state); if (res != AOM_CODEC_OK) return res; if (ctx->frame_parallel_decode) { @@ -778,7 +778,7 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx, FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; image2yuvconfig(&frame->img, &sd); return av1_set_reference_dec(&frame_worker_data->pbi->common, - (AOM_REFFRAME)frame->frame_type, &sd); + (AOM_REFFRAME)frame->frame_type, &sd); } else { return AOM_CODEC_INVALID_PARAM; } @@ -801,7 +801,7 @@ static aom_codec_err_t ctrl_copy_reference(aom_codec_alg_priv_t *ctx, FrameWorkerData *const frame_worker_data = (FrameWorkerData *)worker->data1; image2yuvconfig(&frame->img, &sd); return av1_copy_reference_dec(frame_worker_data->pbi, - (AOM_REFFRAME)frame->frame_type, &sd); + (AOM_REFFRAME)frame->frame_type, &sd); } else { return AOM_CODEC_INVALID_PARAM; } diff --git a/av1/common/arm/neon/iht4x4_add_neon.c b/av1/common/arm/neon/iht4x4_add_neon.c index f228f3aee..baa786f28 100644 --- a/av1/common/arm/neon/iht4x4_add_neon.c +++ b/av1/common/arm/neon/iht4x4_add_neon.c @@ -141,7 +141,7 @@ static INLINE void IADST4x4_1D(int16x4_t *d3s16, int16x4_t *d4s16, } void av1_iht4x4_16_add_neon(const tran_low_t *input, uint8_t *dest, - int dest_stride, int tx_type) { + int dest_stride, int tx_type) { uint8x8_t d26u8, d27u8; int16x4_t d0s16, d1s16, d2s16, d3s16, d4s16, d5s16; uint32x2_t d26u32, d27u32; diff --git a/av1/common/arm/neon/iht8x8_add_neon.c b/av1/common/arm/neon/iht8x8_add_neon.c index 457b8299d..15deabe57 100644 --- a/av1/common/arm/neon/iht8x8_add_neon.c +++ b/av1/common/arm/neon/iht8x8_add_neon.c @@ -473,7 +473,7 @@ static INLINE void IADST8X8_1D(int16x8_t *q8s16, int16x8_t *q9s16, } void av1_iht8x8_64_add_neon(const tran_low_t *input, uint8_t *dest, - int dest_stride, int tx_type) { + int dest_stride, int tx_type) { int i; uint8_t *d1, *d2; uint8x8_t d0u8, d1u8, d2u8, d3u8; diff --git a/av1/common/av1_fwd_txfm.c b/av1/common/av1_fwd_txfm.c index 7ae3b325f..a77186aaf 100644 --- a/av1/common/av1_fwd_txfm.c +++ b/av1/common/av1_fwd_txfm.c @@ -87,8 +87,7 @@ void av1_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) { output[1] = 0; } -void av1_fdct8x8_c(const int16_t *input, tran_low_t *final_output, - int stride) { +void av1_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) { int i, j; tran_low_t intermediate[64]; int pass; @@ -773,42 +772,41 @@ void av1_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride) { #if CONFIG_AOM_HIGHBITDEPTH void av1_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output, - int stride) { + int stride) { av1_fdct4x4_c(input, output, stride); } void av1_highbd_fdct8x8_c(const int16_t *input, tran_low_t *final_output, - int stride) { + int stride) { av1_fdct8x8_c(input, final_output, stride); } void av1_highbd_fdct8x8_1_c(const int16_t *input, tran_low_t *final_output, - int stride) { + int stride) { av1_fdct8x8_1_c(input, final_output, stride); } void av1_highbd_fdct16x16_c(const int16_t *input, tran_low_t *output, - int stride) { + int stride) { av1_fdct16x16_c(input, output, stride); } void av1_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, - int stride) { + int stride) { av1_fdct16x16_1_c(input, output, stride); } -void av1_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, - int stride) { +void av1_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) { av1_fdct32x32_c(input, out, stride); } void av1_highbd_fdct32x32_rd_c(const int16_t *input, tran_low_t *out, - int stride) { + int stride) { av1_fdct32x32_rd_c(input, out, stride); } void av1_highbd_fdct32x32_1_c(const int16_t *input, tran_low_t *out, - int stride) { + int stride) { av1_fdct32x32_1_c(input, out, stride); } #endif // CONFIG_AOM_HIGHBITDEPTH diff --git a/av1/common/av1_inv_txfm.c b/av1/common/av1_inv_txfm.c index 0a7f6b90d..6490700c5 100644 --- a/av1/common/av1_inv_txfm.c +++ b/av1/common/av1_inv_txfm.c @@ -65,8 +65,7 @@ void av1_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { } } -void av1_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest, - int dest_stride) { +void av1_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest, int dest_stride) { int i; tran_high_t a1, e1; tran_low_t tmp[4]; @@ -137,7 +136,7 @@ void av1_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) { } void av1_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest, - int dest_stride) { + int dest_stride) { int i; tran_high_t a1; tran_low_t out = WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), 8); @@ -548,7 +547,7 @@ void av1_idct16_c(const tran_low_t *input, tran_low_t *output) { } void av1_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest, - int stride) { + int stride) { tran_low_t out[16 * 16]; tran_low_t *outptr = out; int i, j; @@ -744,7 +743,7 @@ void av1_iadst16_c(const tran_low_t *input, tran_low_t *output) { } void av1_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, - int stride) { + int stride) { tran_low_t out[16 * 16] = { 0 }; tran_low_t *outptr = out; int i, j; @@ -769,8 +768,7 @@ void av1_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, } } -void av1_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, - int stride) { +void av1_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { int i, j; tran_high_t a1; tran_low_t out = WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), 8); @@ -1150,7 +1148,7 @@ void av1_idct32_c(const tran_low_t *input, tran_low_t *output) { } void av1_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, - int stride) { + int stride) { tran_low_t out[32 * 32]; tran_low_t *outptr = out; int i, j; @@ -1187,7 +1185,7 @@ void av1_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest, } void av1_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, - int stride) { + int stride) { tran_low_t out[32 * 32] = { 0 }; tran_low_t *outptr = out; int i, j; @@ -1212,8 +1210,7 @@ void av1_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest, } } -void av1_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, - int stride) { +void av1_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) { int i, j; tran_high_t a1; @@ -1229,7 +1226,7 @@ void av1_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, #if CONFIG_AOM_HIGHBITDEPTH void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { /* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds, 0.5 shifts per pixel. */ int i; @@ -1283,7 +1280,7 @@ void av1_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest8, - int dest_stride, int bd) { + int dest_stride, int bd) { int i; tran_high_t a1, e1; tran_low_t tmp[4]; @@ -1337,7 +1334,7 @@ void av1_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd) { } void av1_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[4 * 4]; tran_low_t *outptr = out; int i, j; @@ -1363,7 +1360,7 @@ void av1_highbd_idct4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct4x4_1_add_c(const tran_low_t *input, uint8_t *dest8, - int dest_stride, int bd) { + int dest_stride, int bd) { int i; tran_high_t a1; tran_low_t out = @@ -1428,7 +1425,7 @@ void av1_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd) { } void av1_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[8 * 8]; tran_low_t *outptr = out; int i, j; @@ -1454,7 +1451,7 @@ void av1_highbd_idct8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct8x8_1_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { int i, j; tran_high_t a1; tran_low_t out = @@ -1584,7 +1581,7 @@ void av1_highbd_iadst8_c(const tran_low_t *input, tran_low_t *output, int bd) { } void av1_highbd_idct8x8_10_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[8 * 8] = { 0 }; tran_low_t *outptr = out; int i, j; @@ -1776,7 +1773,7 @@ void av1_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd) { } void av1_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[16 * 16]; tran_low_t *outptr = out; int i, j; @@ -1801,8 +1798,7 @@ void av1_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, } } -void av1_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, - int bd) { +void av1_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) { tran_high_t s0, s1, s2, s3, s4, s5, s6, s7, s8; tran_high_t s9, s10, s11, s12, s13, s14, s15; @@ -1973,7 +1969,7 @@ void av1_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, } void av1_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[16 * 16] = { 0 }; tran_low_t *outptr = out; int i, j; @@ -2000,7 +1996,7 @@ void av1_highbd_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { int i, j; tran_high_t a1; tran_low_t out = @@ -2385,7 +2381,7 @@ static void highbd_idct32_c(const tran_low_t *input, tran_low_t *output, } void av1_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[32 * 32]; tran_low_t *outptr = out; int i, j; @@ -2423,7 +2419,7 @@ void av1_highbd_idct32x32_1024_add_c(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[32 * 32] = { 0 }; tran_low_t *outptr = out; int i, j; @@ -2449,7 +2445,7 @@ void av1_highbd_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { int i, j; int a1; uint16_t *dest = CONVERT_TO_SHORTPTR(dest8); diff --git a/av1/common/blockd.c b/av1/common/blockd.c index 2ebee03cb..f0963ec45 100644 --- a/av1/common/blockd.c +++ b/av1/common/blockd.c @@ -12,7 +12,7 @@ #include "av1/common/blockd.h" PREDICTION_MODE av1_left_block_mode(const MODE_INFO *cur_mi, - const MODE_INFO *left_mi, int b) { + const MODE_INFO *left_mi, int b) { if (b == 0 || b == 2) { if (!left_mi || is_inter_block(&left_mi->mbmi)) return DC_PRED; @@ -24,7 +24,7 @@ PREDICTION_MODE av1_left_block_mode(const MODE_INFO *cur_mi, } PREDICTION_MODE av1_above_block_mode(const MODE_INFO *cur_mi, - const MODE_INFO *above_mi, int b) { + const MODE_INFO *above_mi, int b) { if (b == 0 || b == 1) { if (!above_mi || is_inter_block(&above_mi->mbmi)) return DC_PRED; @@ -75,9 +75,9 @@ void av1_foreach_transformed_block_in_plane( } void av1_foreach_transformed_block(const MACROBLOCKD *const xd, - BLOCK_SIZE bsize, - foreach_transformed_block_visitor visit, - void *arg) { + BLOCK_SIZE bsize, + foreach_transformed_block_visitor visit, + void *arg) { int plane; for (plane = 0; plane < MAX_MB_PLANE; ++plane) @@ -85,8 +85,8 @@ void av1_foreach_transformed_block(const MACROBLOCKD *const xd, } void av1_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd, - BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob, - int aoff, int loff) { + BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob, + int aoff, int loff) { ENTROPY_CONTEXT *const a = pd->above_context + aoff; ENTROPY_CONTEXT *const l = pd->left_context + loff; const int tx_size_in_blocks = 1 << tx_size; diff --git a/av1/common/clpf.c b/av1/common/clpf.c index 0399e0fdf..6fa9fec35 100644 --- a/av1/common/clpf.c +++ b/av1/common/clpf.c @@ -34,8 +34,8 @@ static void clpf_block(const uint8_t *src, uint8_t *dst, int sstride, // Iterate over blocks within a superblock static void av1_clpf_sb(const YV12_BUFFER_CONFIG *frame_buffer, - const AV1_COMMON *cm, MACROBLOCKD *xd, - MODE_INFO *const *mi_8x8, int xpos, int ypos) { + const AV1_COMMON *cm, MACROBLOCKD *xd, + MODE_INFO *const *mi_8x8, int xpos, int ypos) { // Temporary buffer (to allow SIMD parallelism) uint8_t buf_unaligned[BS * BS + 15]; uint8_t *buf = (uint8_t *)(((intptr_t)buf_unaligned + 15) & ~15); @@ -95,7 +95,7 @@ static void av1_clpf_sb(const YV12_BUFFER_CONFIG *frame_buffer, // Iterate over the superblocks of an entire frame void av1_clpf_frame(const YV12_BUFFER_CONFIG *frame, const AV1_COMMON *cm, - MACROBLOCKD *xd) { + MACROBLOCKD *xd) { int x, y; for (y = 0; y < cm->mi_rows; y += MI_BLOCK_SIZE) diff --git a/av1/common/dering.c b/av1/common/dering.c index 552c29a9b..7b8d96e58 100644 --- a/av1/common/dering.c +++ b/av1/common/dering.c @@ -19,13 +19,12 @@ #include "av1/common/reconinter.h" #include "av1/common/od_dering.h" - int compute_level_from_index(int global_level, int gi) { - static const int dering_gains[DERING_REFINEMENT_LEVELS] = {0, 11, 16, 22}; + static const int dering_gains[DERING_REFINEMENT_LEVELS] = { 0, 11, 16, 22 }; int level; if (global_level == 0) return 0; - level = (global_level*dering_gains[gi] + 8) >> 4; - return clamp(level, gi, MAX_DERING_LEVEL-1); + level = (global_level * dering_gains[gi] + 8) >> 4; + return clamp(level, gi, MAX_DERING_LEVEL - 1); } int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) { @@ -39,44 +38,43 @@ int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) { for (r = 0; r < maxr; r++) { for (c = 0; c < maxc; c++) { skip = skip && - cm->mi_grid_visible[(mi_row + r)*cm->mi_stride + mi_col + c]-> - mbmi.skip; + cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c] + ->mbmi.skip; } } return skip; } void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, - MACROBLOCKD *xd, int global_level) { + MACROBLOCKD *xd, int global_level) { int r, c; int sbr, sbc; int nhsb, nvsb; od_dering_in *src[3]; unsigned char *bskip; - int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = {{0}}; + int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = { { 0 } }; int stride; int bsize[3]; int dec[3]; int pli; int coeff_shift = AOMMAX(cm->bit_depth - 8, 0); - nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; - nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; - bskip = aom_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols); + nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE; + nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE; + bskip = aom_malloc(sizeof(*bskip) * cm->mi_rows * cm->mi_cols); av1_setup_dst_planes(xd->plane, frame, 0, 0); for (pli = 0; pli < 3; pli++) { dec[pli] = xd->plane[pli].subsampling_x; bsize[pli] = 8 >> dec[pli]; } - stride = bsize[0]*cm->mi_cols; + stride = bsize[0] * cm->mi_cols; for (pli = 0; pli < 3; pli++) { - src[pli] = aom_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64); - for (r = 0; r < bsize[pli]*cm->mi_rows; ++r) { - for (c = 0; c < bsize[pli]*cm->mi_cols; ++c) { + src[pli] = aom_malloc(sizeof(*src) * cm->mi_rows * cm->mi_cols * 64); + for (r = 0; r < bsize[pli] * cm->mi_rows; ++r) { + for (c = 0; c < bsize[pli] * cm->mi_cols; ++c) { #if CONFIG_AOM_HIGHBITDEPTH if (cm->use_highbitdepth) { - src[pli][r * stride + c] = - CONVERT_TO_SHORTPTR(xd->plane[pli].dst.buf) - [r * xd->plane[pli].dst.stride + c]; + src[pli][r * stride + c] = CONVERT_TO_SHORTPTR( + xd->plane[pli].dst.buf)[r * xd->plane[pli].dst.stride + c]; } else { #endif src[pli][r * stride + c] = @@ -98,46 +96,48 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, for (sbc = 0; sbc < nhsb; sbc++) { int level; int nhb, nvb; - nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc); - nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr); + nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE * sbc); + nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE * sbr); for (pli = 0; pli < 3; pli++) { - int16_t dst[MI_BLOCK_SIZE*MI_BLOCK_SIZE*8*8]; + int16_t dst[MI_BLOCK_SIZE * MI_BLOCK_SIZE * 8 * 8]; int threshold; #if DERING_REFINEMENT level = compute_level_from_index( global_level, - cm->mi_grid_visible[MI_BLOCK_SIZE*sbr*cm->mi_stride + - MI_BLOCK_SIZE*sbc]->mbmi.dering_gain); + cm->mi_grid_visible[MI_BLOCK_SIZE * sbr * cm->mi_stride + + MI_BLOCK_SIZE * sbc] + ->mbmi.dering_gain); #else - level = global_level; + level = global_level; #endif /* FIXME: This is a temporary hack that uses more conservative deringing for chroma. */ - if (pli) level = (level*5 + 4) >> 3; - if (sb_all_skip(cm, sbr*MI_BLOCK_SIZE, sbc*MI_BLOCK_SIZE)) level = 0; + if (pli) level = (level * 5 + 4) >> 3; + if (sb_all_skip(cm, sbr * MI_BLOCK_SIZE, sbc * MI_BLOCK_SIZE)) + level = 0; threshold = level << coeff_shift; od_dering( - &OD_DERING_VTBL_C, - dst, - MI_BLOCK_SIZE*bsize[pli], - &src[pli][sbr*stride*bsize[pli]*MI_BLOCK_SIZE + - sbc*bsize[pli]*MI_BLOCK_SIZE], + &OD_DERING_VTBL_C, dst, MI_BLOCK_SIZE * bsize[pli], + &src[pli][sbr * stride * bsize[pli] * MI_BLOCK_SIZE + + sbc * bsize[pli] * MI_BLOCK_SIZE], stride, nhb, nvb, sbc, sbr, nhsb, nvsb, dec[pli], dir, pli, - &bskip[MI_BLOCK_SIZE*sbr*cm->mi_cols + MI_BLOCK_SIZE*sbc], + &bskip[MI_BLOCK_SIZE * sbr * cm->mi_cols + MI_BLOCK_SIZE * sbc], cm->mi_cols, threshold, OD_DERING_NO_CHECK_OVERLAP, coeff_shift); - for (r = 0; r < bsize[pli]*nvb; ++r) { - for (c = 0; c < bsize[pli]*nhb; ++c) { + for (r = 0; r < bsize[pli] * nvb; ++r) { + for (c = 0; c < bsize[pli] * nhb; ++c) { #if CONFIG_AOM_HIGHBITDEPTH if (cm->use_highbitdepth) { CONVERT_TO_SHORTPTR(xd->plane[pli].dst.buf) - [xd->plane[pli].dst.stride*(bsize[pli]*MI_BLOCK_SIZE*sbr + r) - + sbc*bsize[pli]*MI_BLOCK_SIZE + c] = + [xd->plane[pli].dst.stride * + (bsize[pli] * MI_BLOCK_SIZE * sbr + r) + + sbc * bsize[pli] * MI_BLOCK_SIZE + c] = dst[r * MI_BLOCK_SIZE * bsize[pli] + c]; } else { #endif - xd->plane[pli].dst.buf[xd->plane[pli].dst.stride* - (bsize[pli]*MI_BLOCK_SIZE*sbr + r) + - sbc*bsize[pli]*MI_BLOCK_SIZE + c] = + xd->plane[pli] + .dst.buf[xd->plane[pli].dst.stride * + (bsize[pli] * MI_BLOCK_SIZE * sbr + r) + + sbc * bsize[pli] * MI_BLOCK_SIZE + c] = dst[r * MI_BLOCK_SIZE * bsize[pli] + c]; #if CONFIG_AOM_HIGHBITDEPTH } diff --git a/av1/common/entropy.c b/av1/common/entropy.c index d433bfb14..7467d6e08 100644 --- a/av1/common/entropy.c +++ b/av1/common/entropy.c @@ -42,7 +42,7 @@ const aom_prob av1_cat3_prob[] = { 173, 148, 140 }; const aom_prob av1_cat4_prob[] = { 176, 155, 140, 135 }; const aom_prob av1_cat5_prob[] = { 180, 157, 141, 134, 130 }; const aom_prob av1_cat6_prob[] = { 254, 254, 254, 252, 249, 243, 230, - 196, 177, 153, 140, 133, 130, 129 }; + 196, 177, 153, 140, 133, 130, 129 }; #if CONFIG_AOM_HIGHBITDEPTH const aom_prob av1_cat1_prob_high10[] = { 159 }; const aom_prob av1_cat2_prob_high10[] = { 165, 145 }; @@ -58,8 +58,8 @@ const aom_prob av1_cat3_prob_high12[] = { 173, 148, 140 }; const aom_prob av1_cat4_prob_high12[] = { 176, 155, 140, 135 }; const aom_prob av1_cat5_prob_high12[] = { 180, 157, 141, 134, 130 }; const aom_prob av1_cat6_prob_high12[] = { 255, 255, 255, 255, 254, 254, - 254, 252, 249, 243, 230, 196, - 177, 153, 140, 133, 130, 129 }; + 254, 252, 249, 243, 230, 196, + 177, 153, 140, 133, 130, 129 }; #endif const uint8_t av1_coefband_trans_8x8plus[1024] = { @@ -111,7 +111,7 @@ const uint8_t av1_coefband_trans_4x4[16] = { }; const uint8_t av1_pt_energy_class[ENTROPY_TOKENS] = { 0, 1, 2, 3, 3, 4, - 4, 5, 5, 5, 5, 5 }; + 4, 5, 5, 5, 5, 5 }; // Model obtained from a 2-sided zero-centerd distribuition derived // from a Pareto distribution. The cdf of the distribution is: diff --git a/av1/common/entropymode.c b/av1/common/entropymode.c index 6bb2ecfd9..84f1bd451 100644 --- a/av1/common/entropymode.c +++ b/av1/common/entropymode.c @@ -14,137 +14,138 @@ #include "av1/common/onyxc_int.h" #include "av1/common/seg_common.h" -const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = - { { - // above = dc - { 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc - { 92, 45, 102, 136, 116, 180, 74, 90, 100 }, // left = v - { 73, 32, 19, 187, 222, 215, 46, 34, 100 }, // left = h - { 91, 30, 32, 116, 121, 186, 93, 86, 94 }, // left = d45 - { 72, 35, 36, 149, 68, 206, 68, 63, 105 }, // left = d135 - { 73, 31, 28, 138, 57, 124, 55, 122, 151 }, // left = d117 - { 67, 23, 21, 140, 126, 197, 40, 37, 171 }, // left = d153 - { 86, 27, 28, 128, 154, 212, 45, 43, 53 }, // left = d207 - { 74, 32, 27, 107, 86, 160, 63, 134, 102 }, // left = d63 - { 59, 67, 44, 140, 161, 202, 78, 67, 119 } // left = tm - }, - { - // above = v - { 63, 36, 126, 146, 123, 158, 60, 90, 96 }, // left = dc - { 43, 46, 168, 134, 107, 128, 69, 142, 92 }, // left = v - { 44, 29, 68, 159, 201, 177, 50, 57, 77 }, // left = h - { 58, 38, 76, 114, 97, 172, 78, 133, 92 }, // left = d45 - { 46, 41, 76, 140, 63, 184, 69, 112, 57 }, // left = d135 - { 38, 32, 85, 140, 46, 112, 54, 151, 133 }, // left = d117 - { 39, 27, 61, 131, 110, 175, 44, 75, 136 }, // left = d153 - { 52, 30, 74, 113, 130, 175, 51, 64, 58 }, // left = d207 - { 47, 35, 80, 100, 74, 143, 64, 163, 74 }, // left = d63 - { 36, 61, 116, 114, 128, 162, 80, 125, 82 } // left = tm - }, - { - // above = h - { 82, 26, 26, 171, 208, 204, 44, 32, 105 }, // left = dc - { 55, 44, 68, 166, 179, 192, 57, 57, 108 }, // left = v - { 42, 26, 11, 199, 241, 228, 23, 15, 85 }, // left = h - { 68, 42, 19, 131, 160, 199, 55, 52, 83 }, // left = d45 - { 58, 50, 25, 139, 115, 232, 39, 52, 118 }, // left = d135 - { 50, 35, 33, 153, 104, 162, 64, 59, 131 }, // left = d117 - { 44, 24, 16, 150, 177, 202, 33, 19, 156 }, // left = d153 - { 55, 27, 12, 153, 203, 218, 26, 27, 49 }, // left = d207 - { 53, 49, 21, 110, 116, 168, 59, 80, 76 }, // left = d63 - { 38, 72, 19, 168, 203, 212, 50, 50, 107 } // left = tm - }, - { - // above = d45 - { 103, 26, 36, 129, 132, 201, 83, 80, 93 }, // left = dc - { 59, 38, 83, 112, 103, 162, 98, 136, 90 }, // left = v - { 62, 30, 23, 158, 200, 207, 59, 57, 50 }, // left = h - { 67, 30, 29, 84, 86, 191, 102, 91, 59 }, // left = d45 - { 60, 32, 33, 112, 71, 220, 64, 89, 104 }, // left = d135 - { 53, 26, 34, 130, 56, 149, 84, 120, 103 }, // left = d117 - { 53, 21, 23, 133, 109, 210, 56, 77, 172 }, // left = d153 - { 77, 19, 29, 112, 142, 228, 55, 66, 36 }, // left = d207 - { 61, 29, 29, 93, 97, 165, 83, 175, 162 }, // left = d63 - { 47, 47, 43, 114, 137, 181, 100, 99, 95 } // left = tm - }, - { - // above = d135 - { 69, 23, 29, 128, 83, 199, 46, 44, 101 }, // left = dc - { 53, 40, 55, 139, 69, 183, 61, 80, 110 }, // left = v - { 40, 29, 19, 161, 180, 207, 43, 24, 91 }, // left = h - { 60, 34, 19, 105, 61, 198, 53, 64, 89 }, // left = d45 - { 52, 31, 22, 158, 40, 209, 58, 62, 89 }, // left = d135 - { 44, 31, 29, 147, 46, 158, 56, 102, 198 }, // left = d117 - { 35, 19, 12, 135, 87, 209, 41, 45, 167 }, // left = d153 - { 55, 25, 21, 118, 95, 215, 38, 39, 66 }, // left = d207 - { 51, 38, 25, 113, 58, 164, 70, 93, 97 }, // left = d63 - { 47, 54, 34, 146, 108, 203, 72, 103, 151 } // left = tm - }, - { - // above = d117 - { 64, 19, 37, 156, 66, 138, 49, 95, 133 }, // left = dc - { 46, 27, 80, 150, 55, 124, 55, 121, 135 }, // left = v - { 36, 23, 27, 165, 149, 166, 54, 64, 118 }, // left = h - { 53, 21, 36, 131, 63, 163, 60, 109, 81 }, // left = d45 - { 40, 26, 35, 154, 40, 185, 51, 97, 123 }, // left = d135 - { 35, 19, 34, 179, 19, 97, 48, 129, 124 }, // left = d117 - { 36, 20, 26, 136, 62, 164, 33, 77, 154 }, // left = d153 - { 45, 18, 32, 130, 90, 157, 40, 79, 91 }, // left = d207 - { 45, 26, 28, 129, 45, 129, 49, 147, 123 }, // left = d63 - { 38, 44, 51, 136, 74, 162, 57, 97, 121 } // left = tm - }, - { - // above = d153 - { 75, 17, 22, 136, 138, 185, 32, 34, 166 }, // left = dc - { 56, 39, 58, 133, 117, 173, 48, 53, 187 }, // left = v - { 35, 21, 12, 161, 212, 207, 20, 23, 145 }, // left = h - { 56, 29, 19, 117, 109, 181, 55, 68, 112 }, // left = d45 - { 47, 29, 17, 153, 64, 220, 59, 51, 114 }, // left = d135 - { 46, 16, 24, 136, 76, 147, 41, 64, 172 }, // left = d117 - { 34, 17, 11, 108, 152, 187, 13, 15, 209 }, // left = d153 - { 51, 24, 14, 115, 133, 209, 32, 26, 104 }, // left = d207 - { 55, 30, 18, 122, 79, 179, 44, 88, 116 }, // left = d63 - { 37, 49, 25, 129, 168, 164, 41, 54, 148 } // left = tm - }, - { - // above = d207 - { 82, 22, 32, 127, 143, 213, 39, 41, 70 }, // left = dc - { 62, 44, 61, 123, 105, 189, 48, 57, 64 }, // left = v - { 47, 25, 17, 175, 222, 220, 24, 30, 86 }, // left = h - { 68, 36, 17, 106, 102, 206, 59, 74, 74 }, // left = d45 - { 57, 39, 23, 151, 68, 216, 55, 63, 58 }, // left = d135 - { 49, 30, 35, 141, 70, 168, 82, 40, 115 }, // left = d117 - { 51, 25, 15, 136, 129, 202, 38, 35, 139 }, // left = d153 - { 68, 26, 16, 111, 141, 215, 29, 28, 28 }, // left = d207 - { 59, 39, 19, 114, 75, 180, 77, 104, 42 }, // left = d63 - { 40, 61, 26, 126, 152, 206, 61, 59, 93 } // left = tm - }, - { - // above = d63 - { 78, 23, 39, 111, 117, 170, 74, 124, 94 }, // left = dc - { 48, 34, 86, 101, 92, 146, 78, 179, 134 }, // left = v - { 47, 22, 24, 138, 187, 178, 68, 69, 59 }, // left = h - { 56, 25, 33, 105, 112, 187, 95, 177, 129 }, // left = d45 - { 48, 31, 27, 114, 63, 183, 82, 116, 56 }, // left = d135 - { 43, 28, 37, 121, 63, 123, 61, 192, 169 }, // left = d117 - { 42, 17, 24, 109, 97, 177, 56, 76, 122 }, // left = d153 - { 58, 18, 28, 105, 139, 182, 70, 92, 63 }, // left = d207 - { 46, 23, 32, 74, 86, 150, 67, 183, 88 }, // left = d63 - { 36, 38, 48, 92, 122, 165, 88, 137, 91 } // left = tm - }, - { - // above = tm - { 65, 70, 60, 155, 159, 199, 61, 60, 81 }, // left = dc - { 44, 78, 115, 132, 119, 173, 71, 112, 93 }, // left = v - { 39, 38, 21, 184, 227, 206, 42, 32, 64 }, // left = h - { 58, 47, 36, 124, 137, 193, 80, 82, 78 }, // left = d45 - { 49, 50, 35, 144, 95, 205, 63, 78, 59 }, // left = d135 - { 41, 53, 52, 148, 71, 142, 65, 128, 51 }, // left = d117 - { 40, 36, 28, 143, 143, 202, 40, 55, 137 }, // left = d153 - { 52, 34, 29, 129, 183, 227, 42, 35, 43 }, // left = d207 - { 42, 44, 44, 104, 105, 164, 64, 130, 80 }, // left = d63 - { 43, 81, 53, 140, 169, 204, 68, 84, 72 } // left = tm - } }; +const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = { + { + // above = dc + { 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc + { 92, 45, 102, 136, 116, 180, 74, 90, 100 }, // left = v + { 73, 32, 19, 187, 222, 215, 46, 34, 100 }, // left = h + { 91, 30, 32, 116, 121, 186, 93, 86, 94 }, // left = d45 + { 72, 35, 36, 149, 68, 206, 68, 63, 105 }, // left = d135 + { 73, 31, 28, 138, 57, 124, 55, 122, 151 }, // left = d117 + { 67, 23, 21, 140, 126, 197, 40, 37, 171 }, // left = d153 + { 86, 27, 28, 128, 154, 212, 45, 43, 53 }, // left = d207 + { 74, 32, 27, 107, 86, 160, 63, 134, 102 }, // left = d63 + { 59, 67, 44, 140, 161, 202, 78, 67, 119 } // left = tm + }, + { + // above = v + { 63, 36, 126, 146, 123, 158, 60, 90, 96 }, // left = dc + { 43, 46, 168, 134, 107, 128, 69, 142, 92 }, // left = v + { 44, 29, 68, 159, 201, 177, 50, 57, 77 }, // left = h + { 58, 38, 76, 114, 97, 172, 78, 133, 92 }, // left = d45 + { 46, 41, 76, 140, 63, 184, 69, 112, 57 }, // left = d135 + { 38, 32, 85, 140, 46, 112, 54, 151, 133 }, // left = d117 + { 39, 27, 61, 131, 110, 175, 44, 75, 136 }, // left = d153 + { 52, 30, 74, 113, 130, 175, 51, 64, 58 }, // left = d207 + { 47, 35, 80, 100, 74, 143, 64, 163, 74 }, // left = d63 + { 36, 61, 116, 114, 128, 162, 80, 125, 82 } // left = tm + }, + { + // above = h + { 82, 26, 26, 171, 208, 204, 44, 32, 105 }, // left = dc + { 55, 44, 68, 166, 179, 192, 57, 57, 108 }, // left = v + { 42, 26, 11, 199, 241, 228, 23, 15, 85 }, // left = h + { 68, 42, 19, 131, 160, 199, 55, 52, 83 }, // left = d45 + { 58, 50, 25, 139, 115, 232, 39, 52, 118 }, // left = d135 + { 50, 35, 33, 153, 104, 162, 64, 59, 131 }, // left = d117 + { 44, 24, 16, 150, 177, 202, 33, 19, 156 }, // left = d153 + { 55, 27, 12, 153, 203, 218, 26, 27, 49 }, // left = d207 + { 53, 49, 21, 110, 116, 168, 59, 80, 76 }, // left = d63 + { 38, 72, 19, 168, 203, 212, 50, 50, 107 } // left = tm + }, + { + // above = d45 + { 103, 26, 36, 129, 132, 201, 83, 80, 93 }, // left = dc + { 59, 38, 83, 112, 103, 162, 98, 136, 90 }, // left = v + { 62, 30, 23, 158, 200, 207, 59, 57, 50 }, // left = h + { 67, 30, 29, 84, 86, 191, 102, 91, 59 }, // left = d45 + { 60, 32, 33, 112, 71, 220, 64, 89, 104 }, // left = d135 + { 53, 26, 34, 130, 56, 149, 84, 120, 103 }, // left = d117 + { 53, 21, 23, 133, 109, 210, 56, 77, 172 }, // left = d153 + { 77, 19, 29, 112, 142, 228, 55, 66, 36 }, // left = d207 + { 61, 29, 29, 93, 97, 165, 83, 175, 162 }, // left = d63 + { 47, 47, 43, 114, 137, 181, 100, 99, 95 } // left = tm + }, + { + // above = d135 + { 69, 23, 29, 128, 83, 199, 46, 44, 101 }, // left = dc + { 53, 40, 55, 139, 69, 183, 61, 80, 110 }, // left = v + { 40, 29, 19, 161, 180, 207, 43, 24, 91 }, // left = h + { 60, 34, 19, 105, 61, 198, 53, 64, 89 }, // left = d45 + { 52, 31, 22, 158, 40, 209, 58, 62, 89 }, // left = d135 + { 44, 31, 29, 147, 46, 158, 56, 102, 198 }, // left = d117 + { 35, 19, 12, 135, 87, 209, 41, 45, 167 }, // left = d153 + { 55, 25, 21, 118, 95, 215, 38, 39, 66 }, // left = d207 + { 51, 38, 25, 113, 58, 164, 70, 93, 97 }, // left = d63 + { 47, 54, 34, 146, 108, 203, 72, 103, 151 } // left = tm + }, + { + // above = d117 + { 64, 19, 37, 156, 66, 138, 49, 95, 133 }, // left = dc + { 46, 27, 80, 150, 55, 124, 55, 121, 135 }, // left = v + { 36, 23, 27, 165, 149, 166, 54, 64, 118 }, // left = h + { 53, 21, 36, 131, 63, 163, 60, 109, 81 }, // left = d45 + { 40, 26, 35, 154, 40, 185, 51, 97, 123 }, // left = d135 + { 35, 19, 34, 179, 19, 97, 48, 129, 124 }, // left = d117 + { 36, 20, 26, 136, 62, 164, 33, 77, 154 }, // left = d153 + { 45, 18, 32, 130, 90, 157, 40, 79, 91 }, // left = d207 + { 45, 26, 28, 129, 45, 129, 49, 147, 123 }, // left = d63 + { 38, 44, 51, 136, 74, 162, 57, 97, 121 } // left = tm + }, + { + // above = d153 + { 75, 17, 22, 136, 138, 185, 32, 34, 166 }, // left = dc + { 56, 39, 58, 133, 117, 173, 48, 53, 187 }, // left = v + { 35, 21, 12, 161, 212, 207, 20, 23, 145 }, // left = h + { 56, 29, 19, 117, 109, 181, 55, 68, 112 }, // left = d45 + { 47, 29, 17, 153, 64, 220, 59, 51, 114 }, // left = d135 + { 46, 16, 24, 136, 76, 147, 41, 64, 172 }, // left = d117 + { 34, 17, 11, 108, 152, 187, 13, 15, 209 }, // left = d153 + { 51, 24, 14, 115, 133, 209, 32, 26, 104 }, // left = d207 + { 55, 30, 18, 122, 79, 179, 44, 88, 116 }, // left = d63 + { 37, 49, 25, 129, 168, 164, 41, 54, 148 } // left = tm + }, + { + // above = d207 + { 82, 22, 32, 127, 143, 213, 39, 41, 70 }, // left = dc + { 62, 44, 61, 123, 105, 189, 48, 57, 64 }, // left = v + { 47, 25, 17, 175, 222, 220, 24, 30, 86 }, // left = h + { 68, 36, 17, 106, 102, 206, 59, 74, 74 }, // left = d45 + { 57, 39, 23, 151, 68, 216, 55, 63, 58 }, // left = d135 + { 49, 30, 35, 141, 70, 168, 82, 40, 115 }, // left = d117 + { 51, 25, 15, 136, 129, 202, 38, 35, 139 }, // left = d153 + { 68, 26, 16, 111, 141, 215, 29, 28, 28 }, // left = d207 + { 59, 39, 19, 114, 75, 180, 77, 104, 42 }, // left = d63 + { 40, 61, 26, 126, 152, 206, 61, 59, 93 } // left = tm + }, + { + // above = d63 + { 78, 23, 39, 111, 117, 170, 74, 124, 94 }, // left = dc + { 48, 34, 86, 101, 92, 146, 78, 179, 134 }, // left = v + { 47, 22, 24, 138, 187, 178, 68, 69, 59 }, // left = h + { 56, 25, 33, 105, 112, 187, 95, 177, 129 }, // left = d45 + { 48, 31, 27, 114, 63, 183, 82, 116, 56 }, // left = d135 + { 43, 28, 37, 121, 63, 123, 61, 192, 169 }, // left = d117 + { 42, 17, 24, 109, 97, 177, 56, 76, 122 }, // left = d153 + { 58, 18, 28, 105, 139, 182, 70, 92, 63 }, // left = d207 + { 46, 23, 32, 74, 86, 150, 67, 183, 88 }, // left = d63 + { 36, 38, 48, 92, 122, 165, 88, 137, 91 } // left = tm + }, + { + // above = tm + { 65, 70, 60, 155, 159, 199, 61, 60, 81 }, // left = dc + { 44, 78, 115, 132, 119, 173, 71, 112, 93 }, // left = v + { 39, 38, 21, 184, 227, 206, 42, 32, 64 }, // left = h + { 58, 47, 36, 124, 137, 193, 80, 82, 78 }, // left = d45 + { 49, 50, 35, 144, 95, 205, 63, 78, 59 }, // left = d135 + { 41, 53, 52, 148, 71, 142, 65, 128, 51 }, // left = d117 + { 40, 36, 28, 143, 143, 202, 40, 55, 137 }, // left = d153 + { 52, 34, 29, 129, 183, 227, 42, 35, 43 }, // left = d207 + { 42, 44, 44, 104, 105, 164, 64, 130, 80 }, // left = d63 + { 43, 81, 53, 140, 169, 204, 68, 84, 72 } // left = tm + } +}; static const aom_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = { { 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8 @@ -192,20 +193,19 @@ static const aom_prob #if CONFIG_REF_MV static const aom_prob default_newmv_prob[NEWMV_MODE_CONTEXTS] = { - 200, 180, 150, 150, 110, 70, 60, + 200, 180, 150, 150, 110, 70, 60, }; static const aom_prob default_zeromv_prob[ZEROMV_MODE_CONTEXTS] = { - 192, 64, + 192, 64, }; static const aom_prob default_refmv_prob[REFMV_MODE_CONTEXTS] = { - 220, 220, 200, 200, 180, 128, 30, 220, 30, + 220, 220, 200, 200, 180, 128, 30, 220, 30, }; -static const aom_prob default_drl_prob[DRL_MODE_CONTEXTS] = { - 128, 160, 180, 128, 160 -}; +static const aom_prob default_drl_prob[DRL_MODE_CONTEXTS] = { 128, 160, 180, + 128, 160 }; #endif static const aom_prob @@ -264,7 +264,7 @@ static const struct tx_probs default_tx_probs = { { { 3, 136, 37 }, { { 100 }, { 66 } } }; void av1_tx_counts_to_branch_counts_32x32(const unsigned int *tx_count_32x32p, - unsigned int (*ct_32x32p)[2]) { + unsigned int (*ct_32x32p)[2]) { ct_32x32p[0][0] = tx_count_32x32p[TX_4X4]; ct_32x32p[0][1] = tx_count_32x32p[TX_8X8] + tx_count_32x32p[TX_16X16] + tx_count_32x32p[TX_32X32]; @@ -275,7 +275,7 @@ void av1_tx_counts_to_branch_counts_32x32(const unsigned int *tx_count_32x32p, } void av1_tx_counts_to_branch_counts_16x16(const unsigned int *tx_count_16x16p, - unsigned int (*ct_16x16p)[2]) { + unsigned int (*ct_16x16p)[2]) { ct_16x16p[0][0] = tx_count_16x16p[TX_4X4]; ct_16x16p[0][1] = tx_count_16x16p[TX_8X8] + tx_count_16x16p[TX_16X16]; ct_16x16p[1][0] = tx_count_16x16p[TX_8X8]; @@ -283,7 +283,7 @@ void av1_tx_counts_to_branch_counts_16x16(const unsigned int *tx_count_16x16p, } void av1_tx_counts_to_branch_counts_8x8(const unsigned int *tx_count_8x8p, - unsigned int (*ct_8x8p)[2]) { + unsigned int (*ct_8x8p)[2]) { ct_8x8p[0][0] = tx_count_8x8p[TX_4X4]; ct_8x8p[0][1] = tx_count_8x8p[TX_8X8]; } @@ -343,8 +343,8 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { av1_copy(fc->inter_ext_tx_prob, default_inter_ext_tx_prob); } -const aom_tree_index av1_switchable_interp_tree[TREE_SIZE( - SWITCHABLE_FILTERS)] = { -EIGHTTAP, 2, -EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP }; +const aom_tree_index av1_switchable_interp_tree[TREE_SIZE(SWITCHABLE_FILTERS)] = + { -EIGHTTAP, 2, -EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP }; void av1_adapt_inter_frame_probs(AV1_COMMON *cm) { int i, j; @@ -368,17 +368,17 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) { #if CONFIG_REF_MV for (i = 0; i < NEWMV_MODE_CONTEXTS; ++i) - fc->newmv_prob[i] = mode_mv_merge_probs(pre_fc->newmv_prob[i], - counts->newmv_mode[i]); + fc->newmv_prob[i] = + mode_mv_merge_probs(pre_fc->newmv_prob[i], counts->newmv_mode[i]); for (i = 0; i < ZEROMV_MODE_CONTEXTS; ++i) - fc->zeromv_prob[i] = mode_mv_merge_probs(pre_fc->zeromv_prob[i], - counts->zeromv_mode[i]); + fc->zeromv_prob[i] = + mode_mv_merge_probs(pre_fc->zeromv_prob[i], counts->zeromv_mode[i]); for (i = 0; i < REFMV_MODE_CONTEXTS; ++i) - fc->refmv_prob[i] = mode_mv_merge_probs(pre_fc->refmv_prob[i], - counts->refmv_mode[i]); + fc->refmv_prob[i] = + mode_mv_merge_probs(pre_fc->refmv_prob[i], counts->refmv_mode[i]); for (i = 0; i < DRL_MODE_CONTEXTS; ++i) - fc->drl_prob[i] = mode_mv_merge_probs(pre_fc->drl_prob[i], - counts->drl_mode[i]); + fc->drl_prob[i] = + mode_mv_merge_probs(pre_fc->drl_prob[i], counts->drl_mode[i]); #else for (i = 0; i < INTER_MODE_CONTEXTS; i++) aom_tree_merge_probs(av1_inter_mode_tree, pre_fc->inter_mode_probs[i], @@ -426,13 +426,13 @@ void av1_adapt_intra_frame_probs(AV1_COMMON *cm) { mode_mv_merge_probs(pre_fc->tx_probs.p8x8[i][j], branch_ct_8x8p[j]); av1_tx_counts_to_branch_counts_16x16(counts->tx.p16x16[i], - branch_ct_16x16p); + branch_ct_16x16p); for (j = 0; j < TX_SIZES - 2; ++j) fc->tx_probs.p16x16[i][j] = mode_mv_merge_probs( pre_fc->tx_probs.p16x16[i][j], branch_ct_16x16p[j]); av1_tx_counts_to_branch_counts_32x32(counts->tx.p32x32[i], - branch_ct_32x32p); + branch_ct_32x32p); for (j = 0; j < TX_SIZES - 1; ++j) fc->tx_probs.p32x32[i][j] = mode_mv_merge_probs( pre_fc->tx_probs.p32x32[i][j], branch_ct_32x32p[j]); diff --git a/av1/common/entropymv.c b/av1/common/entropymv.c index 5a422662e..8258cc566 100644 --- a/av1/common/entropymv.c +++ b/av1/common/entropymv.c @@ -39,7 +39,7 @@ const aom_tree_index av1_mv_class0_tree[TREE_SIZE(CLASS0_SIZE)] = { }; const aom_tree_index av1_mv_fp_tree[TREE_SIZE(MV_FP_SIZE)] = { -0, 2, -1, - 4, -2, -3 }; + 4, -2, -3 }; static const nmv_context default_nmv_context = { { 32, 64, 96 }, @@ -211,8 +211,8 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) { aom_tree_merge_probs(av1_mv_fp_tree, pre_comp->fp, c->fp, comp->fp); if (allow_hp) { - comp->class0_hp = mode_mv_merge_probs(pre_comp->class0_hp, - c->class0_hp); + comp->class0_hp = + mode_mv_merge_probs(pre_comp->class0_hp, c->class0_hp); comp->hp = mode_mv_merge_probs(pre_comp->hp, c->hp); } } @@ -256,8 +256,7 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) { void av1_init_mv_probs(AV1_COMMON *cm) { #if CONFIG_REF_MV int i; - for (i = 0; i < NMV_CONTEXTS; ++i) - cm->fc->nmvc[i] = default_nmv_context; + for (i = 0; i < NMV_CONTEXTS; ++i) cm->fc->nmvc[i] = default_nmv_context; #else cm->fc->nmvc = default_nmv_context; #endif diff --git a/av1/common/frame_buffers.c b/av1/common/frame_buffers.c index a75ac74bb..c15c13e84 100644 --- a/av1/common/frame_buffers.c +++ b/av1/common/frame_buffers.c @@ -39,7 +39,7 @@ void av1_free_internal_frame_buffers(InternalFrameBufferList *list) { } int av1_get_frame_buffer(void *cb_priv, size_t min_size, - aom_codec_frame_buffer_t *fb) { + aom_codec_frame_buffer_t *fb) { int i; InternalFrameBufferList *const int_fb_list = (InternalFrameBufferList *)cb_priv; diff --git a/av1/common/idct.c b/av1/common/idct.c index 37eb5a9cf..b96a8cf60 100644 --- a/av1/common/idct.c +++ b/av1/common/idct.c @@ -19,7 +19,7 @@ #include "aom_ports/mem.h" void av1_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride, - int tx_type) { + int tx_type) { const transform_2d IHT_4[] = { { idct4_c, idct4_c }, // DCT_DCT = 0 { iadst4_c, idct4_c }, // ADST_DCT = 1 @@ -58,7 +58,7 @@ static const transform_2d IHT_8[] = { }; void av1_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest, int stride, - int tx_type) { + int tx_type) { int i, j; tran_low_t out[8 * 8]; tran_low_t *outptr = out; @@ -91,7 +91,7 @@ static const transform_2d IHT_16[] = { }; void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, - int tx_type) { + int tx_type) { int i, j; tran_low_t out[16 * 16]; tran_low_t *outptr = out; @@ -118,7 +118,7 @@ void av1_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest, int stride, // idct void av1_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob) { + int eob) { if (eob > 1) aom_idct4x4_16_add(input, dest, stride); else @@ -126,7 +126,7 @@ void av1_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob) { + int eob) { if (eob > 1) aom_iwht4x4_16_add(input, dest, stride); else @@ -134,7 +134,7 @@ void av1_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob) { + int eob) { // If dc is 1, then input[0] is the reconstructed value, do not need // dequantization. Also, when dc is 1, dc is counted in eobs, namely eobs >=1. @@ -152,7 +152,7 @@ void av1_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_idct16x16_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob) { + int eob) { /* The calculation can be simplified if there are not many non-zero dct * coefficients. Use eobs to separate different cases. */ if (eob == 1) /* DC only DCT coefficient. */ @@ -164,7 +164,7 @@ void av1_idct16x16_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_idct32x32_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob) { + int eob) { if (eob == 1) aom_idct32x32_1_add(input, dest, stride); else if (eob <= 34) @@ -175,7 +175,7 @@ void av1_idct32x32_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride, - int eob, TX_TYPE tx_type, int lossless) { + int eob, TX_TYPE tx_type, int lossless) { if (lossless) { assert(tx_type == DCT_DCT); av1_iwht4x4_add(input, dest, stride, eob); @@ -191,7 +191,7 @@ void av1_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, int stride, } void av1_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, int stride, - int eob, TX_TYPE tx_type) { + int eob, TX_TYPE tx_type) { switch (tx_type) { case DCT_DCT: av1_idct8x8_add(input, dest, stride, eob); break; case ADST_DCT: @@ -202,7 +202,7 @@ void av1_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, int stride, } void av1_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest, int stride, - int eob, TX_TYPE tx_type) { + int eob, TX_TYPE tx_type) { switch (tx_type) { case DCT_DCT: av1_idct16x16_add(input, dest, stride, eob); break; case ADST_DCT: @@ -213,7 +213,7 @@ void av1_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest, int stride, } void av1_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest, int stride, - int eob, TX_TYPE tx_type) { + int eob, TX_TYPE tx_type) { switch (tx_type) { case DCT_DCT: av1_idct32x32_add(input, dest, stride, eob); break; case ADST_DCT: @@ -225,7 +225,7 @@ void av1_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest, int stride, #if CONFIG_AOM_HIGHBITDEPTH void av1_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int tx_type, int bd) { + int stride, int tx_type, int bd) { const highbd_transform_2d IHT_4[] = { { aom_highbd_idct4_c, aom_highbd_idct4_c }, // DCT_DCT = 0 { aom_highbd_iadst4_c, aom_highbd_idct4_c }, // ADST_DCT = 1 @@ -265,7 +265,7 @@ static const highbd_transform_2d HIGH_IHT_8[] = { }; void av1_highbd_iht8x8_64_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int tx_type, int bd) { + int stride, int tx_type, int bd) { int i, j; tran_low_t out[8 * 8]; tran_low_t *outptr = out; @@ -299,7 +299,7 @@ static const highbd_transform_2d HIGH_IHT_16[] = { }; void av1_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, - int stride, int tx_type, int bd) { + int stride, int tx_type, int bd) { int i, j; tran_low_t out[16 * 16]; tran_low_t *outptr = out; @@ -327,7 +327,7 @@ void av1_highbd_iht16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, // idct void av1_highbd_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob, int bd) { + int eob, int bd) { if (eob > 1) aom_highbd_idct4x4_16_add(input, dest, stride, bd); else @@ -335,7 +335,7 @@ void av1_highbd_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob, int bd) { + int eob, int bd) { if (eob > 1) aom_highbd_iwht4x4_16_add(input, dest, stride, bd); else @@ -343,7 +343,7 @@ void av1_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_highbd_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, - int eob, int bd) { + int eob, int bd) { // If dc is 1, then input[0] is the reconstructed value, do not need // dequantization. Also, when dc is 1, dc is counted in eobs, namely eobs >=1. @@ -362,7 +362,7 @@ void av1_highbd_idct8x8_add(const tran_low_t *input, uint8_t *dest, int stride, } void av1_highbd_idct16x16_add(const tran_low_t *input, uint8_t *dest, - int stride, int eob, int bd) { + int stride, int eob, int bd) { // The calculation can be simplified if there are not many non-zero dct // coefficients. Use eobs to separate different cases. // DC only DCT coefficient. @@ -376,7 +376,7 @@ void av1_highbd_idct16x16_add(const tran_low_t *input, uint8_t *dest, } void av1_highbd_idct32x32_add(const tran_low_t *input, uint8_t *dest, - int stride, int eob, int bd) { + int stride, int eob, int bd) { // Non-zero coeff only in upper-left 8x8 if (eob == 1) { aom_highbd_idct32x32_1_add(input, dest, stride, bd); @@ -388,16 +388,14 @@ void av1_highbd_idct32x32_add(const tran_low_t *input, uint8_t *dest, } void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, - int stride, int eob, int bd, TX_TYPE tx_type, - int lossless) { + int stride, int eob, int bd, TX_TYPE tx_type, + int lossless) { if (lossless) { assert(tx_type == DCT_DCT); av1_highbd_iwht4x4_add(input, dest, stride, eob, bd); } else { switch (tx_type) { - case DCT_DCT: - av1_highbd_idct4x4_add(input, dest, stride, eob, bd); - break; + case DCT_DCT: av1_highbd_idct4x4_add(input, dest, stride, eob, bd); break; case ADST_DCT: case DCT_ADST: case ADST_ADST: @@ -409,8 +407,7 @@ void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest, } void av1_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, - int stride, int eob, int bd, - TX_TYPE tx_type) { + int stride, int eob, int bd, TX_TYPE tx_type) { switch (tx_type) { case DCT_DCT: av1_highbd_idct8x8_add(input, dest, stride, eob, bd); break; case ADST_DCT: @@ -423,12 +420,10 @@ void av1_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest, } void av1_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest, - int stride, int eob, int bd, - TX_TYPE tx_type) { + int stride, int eob, int bd, + TX_TYPE tx_type) { switch (tx_type) { - case DCT_DCT: - av1_highbd_idct16x16_add(input, dest, stride, eob, bd); - break; + case DCT_DCT: av1_highbd_idct16x16_add(input, dest, stride, eob, bd); break; case ADST_DCT: case DCT_ADST: case ADST_ADST: @@ -439,12 +434,10 @@ void av1_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest, } void av1_highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest, - int stride, int eob, int bd, - TX_TYPE tx_type) { + int stride, int eob, int bd, + TX_TYPE tx_type) { switch (tx_type) { - case DCT_DCT: - av1_highbd_idct32x32_add(input, dest, stride, eob, bd); - break; + case DCT_DCT: av1_highbd_idct32x32_add(input, dest, stride, eob, bd); break; case ADST_DCT: case DCT_ADST: case ADST_ADST: assert(0); break; diff --git a/av1/common/loopfilter.c b/av1/common/loopfilter.c index 3a7d6519a..870f3d741 100644 --- a/av1/common/loopfilter.c +++ b/av1/common/loopfilter.c @@ -826,8 +826,8 @@ static void build_y_mask(const loop_filter_info_n *const lfi_n, // by mi_row, mi_col. // TODO(JBB): This function only works for yv12. void av1_setup_mask(AV1_COMMON *const cm, const int mi_row, const int mi_col, - MODE_INFO **mi, const int mode_info_stride, - LOOP_FILTER_MASK *lfm) { + MODE_INFO **mi, const int mode_info_stride, + LOOP_FILTER_MASK *lfm) { int idx_32, idx_16, idx_8; const loop_filter_info_n *const lfi_n = &cm->lf_info; MODE_INFO **mip = mi; @@ -1152,9 +1152,8 @@ static void highbd_filter_selectively_vert( #endif // CONFIG_AOM_HIGHBITDEPTH void av1_filter_block_plane_non420(AV1_COMMON *cm, - struct macroblockd_plane *plane, - MODE_INFO **mi_8x8, int mi_row, - int mi_col) { + struct macroblockd_plane *plane, + MODE_INFO **mi_8x8, int mi_row, int mi_col) { const int ss_x = plane->subsampling_x; const int ss_y = plane->subsampling_y; const int row_step = 1 << ss_y; @@ -1315,8 +1314,8 @@ void av1_filter_block_plane_non420(AV1_COMMON *cm, } void av1_filter_block_plane_ss00(AV1_COMMON *const cm, - struct macroblockd_plane *const plane, - int mi_row, LOOP_FILTER_MASK *lfm) { + struct macroblockd_plane *const plane, + int mi_row, LOOP_FILTER_MASK *lfm) { struct buf_2d *const dst = &plane->dst; uint8_t *const dst0 = dst->buf; int r; @@ -1406,8 +1405,8 @@ void av1_filter_block_plane_ss00(AV1_COMMON *const cm, } void av1_filter_block_plane_ss11(AV1_COMMON *const cm, - struct macroblockd_plane *const plane, - int mi_row, LOOP_FILTER_MASK *lfm) { + struct macroblockd_plane *const plane, + int mi_row, LOOP_FILTER_MASK *lfm) { struct buf_2d *const dst = &plane->dst; uint8_t *const dst0 = dst->buf; int r, c; @@ -1520,8 +1519,8 @@ void av1_filter_block_plane_ss11(AV1_COMMON *const cm, } void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm, - struct macroblockd_plane planes[MAX_MB_PLANE], - int start, int stop, int y_only) { + struct macroblockd_plane planes[MAX_MB_PLANE], + int start, int stop, int y_only) { const int num_planes = y_only ? 1 : MAX_MB_PLANE; enum lf_path path; LOOP_FILTER_MASK lfm; @@ -1558,7 +1557,7 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm, break; case LF_PATH_SLOW: av1_filter_block_plane_non420(cm, &planes[plane], mi + mi_col, - mi_row, mi_col); + mi_row, mi_col); break; } } @@ -1567,8 +1566,8 @@ void av1_loop_filter_rows(YV12_BUFFER_CONFIG *frame_buffer, AV1_COMMON *cm, } void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, - MACROBLOCKD *xd, int frame_filter_level, int y_only, - int partial_frame) { + MACROBLOCKD *xd, int frame_filter_level, int y_only, + int partial_frame) { int start_mi_row, end_mi_row, mi_rows_to_filter; if (!frame_filter_level) return; start_mi_row = 0; @@ -1585,8 +1584,7 @@ void av1_loop_filter_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, void av1_loop_filter_data_reset( LFWorkerData *lf_data, YV12_BUFFER_CONFIG *frame_buffer, - struct AV1Common *cm, - const struct macroblockd_plane planes[MAX_MB_PLANE]) { + struct AV1Common *cm, const struct macroblockd_plane planes[MAX_MB_PLANE]) { lf_data->frame_buffer = frame_buffer; lf_data->cm = cm; lf_data->start = 0; @@ -1598,6 +1596,6 @@ void av1_loop_filter_data_reset( int av1_loop_filter_worker(LFWorkerData *const lf_data, void *unused) { (void)unused; av1_loop_filter_rows(lf_data->frame_buffer, lf_data->cm, lf_data->planes, - lf_data->start, lf_data->stop, lf_data->y_only); + lf_data->start, lf_data->stop, lf_data->y_only); return 1; } diff --git a/av1/common/mips/dspr2/itrans16_dspr2.c b/av1/common/mips/dspr2/itrans16_dspr2.c index aaf3972ef..79f9338bd 100644 --- a/av1/common/mips/dspr2/itrans16_dspr2.c +++ b/av1/common/mips/dspr2/itrans16_dspr2.c @@ -23,7 +23,7 @@ #if HAVE_DSPR2 void av1_iht16x16_256_add_dspr2(const int16_t *input, uint8_t *dest, int pitch, - int tx_type) { + int tx_type) { int i, j; DECLARE_ALIGNED(32, int16_t, out[16 * 16]); int16_t *outptr = out; diff --git a/av1/common/mips/dspr2/itrans4_dspr2.c b/av1/common/mips/dspr2/itrans4_dspr2.c index a49db1fc3..0a9552376 100644 --- a/av1/common/mips/dspr2/itrans4_dspr2.c +++ b/av1/common/mips/dspr2/itrans4_dspr2.c @@ -23,7 +23,7 @@ #if HAVE_DSPR2 void av1_iht4x4_16_add_dspr2(const int16_t *input, uint8_t *dest, - int dest_stride, int tx_type) { + int dest_stride, int tx_type) { int i, j; DECLARE_ALIGNED(32, int16_t, out[4 * 4]); int16_t *outptr = out; diff --git a/av1/common/mips/dspr2/itrans8_dspr2.c b/av1/common/mips/dspr2/itrans8_dspr2.c index 1828bbcd9..8bf5b4f0e 100644 --- a/av1/common/mips/dspr2/itrans8_dspr2.c +++ b/av1/common/mips/dspr2/itrans8_dspr2.c @@ -22,7 +22,7 @@ #if HAVE_DSPR2 void av1_iht8x8_64_add_dspr2(const int16_t *input, uint8_t *dest, - int dest_stride, int tx_type) { + int dest_stride, int tx_type) { int i, j; DECLARE_ALIGNED(32, int16_t, out[8 * 8]); int16_t *outptr = out; diff --git a/av1/common/mips/msa/idct16x16_msa.c b/av1/common/mips/msa/idct16x16_msa.c index 54f384172..4bd0a1635 100644 --- a/av1/common/mips/msa/idct16x16_msa.c +++ b/av1/common/mips/msa/idct16x16_msa.c @@ -15,7 +15,7 @@ #include "aom_dsp/mips/inv_txfm_msa.h" void av1_iht16x16_256_add_msa(const int16_t *input, uint8_t *dst, - int32_t dst_stride, int32_t tx_type) { + int32_t dst_stride, int32_t tx_type) { int32_t i; DECLARE_ALIGNED(32, int16_t, out[16 * 16]); int16_t *out_ptr = &out[0]; diff --git a/av1/common/mips/msa/idct4x4_msa.c b/av1/common/mips/msa/idct4x4_msa.c index 2157caefb..8364f8dc4 100644 --- a/av1/common/mips/msa/idct4x4_msa.c +++ b/av1/common/mips/msa/idct4x4_msa.c @@ -15,7 +15,7 @@ #include "aom_dsp/mips/inv_txfm_msa.h" void av1_iht4x4_16_add_msa(const int16_t *input, uint8_t *dst, - int32_t dst_stride, int32_t tx_type) { + int32_t dst_stride, int32_t tx_type) { v8i16 in0, in1, in2, in3; /* load vector elements of 4x4 block */ diff --git a/av1/common/mips/msa/idct8x8_msa.c b/av1/common/mips/msa/idct8x8_msa.c index b901e0a2d..71117051b 100644 --- a/av1/common/mips/msa/idct8x8_msa.c +++ b/av1/common/mips/msa/idct8x8_msa.c @@ -15,7 +15,7 @@ #include "aom_dsp/mips/inv_txfm_msa.h" void av1_iht8x8_64_add_msa(const int16_t *input, uint8_t *dst, - int32_t dst_stride, int32_t tx_type) { + int32_t dst_stride, int32_t tx_type) { v8i16 in0, in1, in2, in3, in4, in5, in6, in7; /* load vector elements of 8x8 block */ diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c index 5fa1de347..b14323c0f 100644 --- a/av1/common/mvref_common.c +++ b/av1/common/mvref_common.c @@ -11,14 +11,11 @@ #include "av1/common/mvref_common.h" #if CONFIG_REF_MV -static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, - const MODE_INFO *const candidate_mi, - const MB_MODE_INFO *const candidate, - const MV_REFERENCE_FRAME rf[2], - uint8_t *refmv_count, - CANDIDATE_MV *ref_mv_stack, - const int use_hp, - int len, int block, int col) { +static uint8_t add_ref_mv_candidate( + const MACROBLOCKD *xd, const MODE_INFO *const candidate_mi, + const MB_MODE_INFO *const candidate, const MV_REFERENCE_FRAME rf[2], + uint8_t *refmv_count, CANDIDATE_MV *ref_mv_stack, const int use_hp, int len, + int block, int col) { int index = 0, ref; int newmv_count = 0; @@ -26,18 +23,14 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, // single reference frame for (ref = 0; ref < 2; ++ref) { if (candidate->ref_frame[ref] == rf[0]) { - int_mv this_refmv = - get_sub_block_mv(candidate_mi, ref, col, block); + int_mv this_refmv = get_sub_block_mv(candidate_mi, ref, col, block); lower_mv_precision(&this_refmv.as_mv, use_hp); - clamp_mv_ref(&this_refmv.as_mv, - xd->n8_w << 3, xd->n8_h << 3, xd); + clamp_mv_ref(&this_refmv.as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); for (index = 0; index < *refmv_count; ++index) - if (ref_mv_stack[index].this_mv.as_int == this_refmv.as_int) - break; + if (ref_mv_stack[index].this_mv.as_int == this_refmv.as_int) break; - if (index < *refmv_count) - ref_mv_stack[index].weight += 2 * len; + if (index < *refmv_count) ref_mv_stack[index].weight += 2 * len; // Add a new item to the list. if (index == *refmv_count) { @@ -47,24 +40,19 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, ref_mv_stack[index].weight = 2 * len; ++(*refmv_count); - if (candidate->mode == NEWMV) - ++newmv_count; + if (candidate->mode == NEWMV) ++newmv_count; } if (candidate_mi->mbmi.sb_type < BLOCK_8X8 && block >= 0) { int alt_block = 3 - block; - this_refmv = - get_sub_block_mv(candidate_mi, ref, col, alt_block); + this_refmv = get_sub_block_mv(candidate_mi, ref, col, alt_block); lower_mv_precision(&this_refmv.as_mv, use_hp); - clamp_mv_ref(&this_refmv.as_mv, - xd->n8_w << 3, xd->n8_h << 3, xd); + clamp_mv_ref(&this_refmv.as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); for (index = 0; index < *refmv_count; ++index) - if (ref_mv_stack[index].this_mv.as_int == this_refmv.as_int) - break; + if (ref_mv_stack[index].this_mv.as_int == this_refmv.as_int) break; - if (index < *refmv_count) - ref_mv_stack[index].weight += len; + if (index < *refmv_count) ref_mv_stack[index].weight += len; // Add a new item to the list. if (index == *refmv_count) { @@ -74,25 +62,20 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, ref_mv_stack[index].weight = len; ++(*refmv_count); - if (candidate->mode == NEWMV) - ++newmv_count; + if (candidate->mode == NEWMV) ++newmv_count; } } } } } else { // compound reference frame - if (candidate->ref_frame[0] == rf[0] && - candidate->ref_frame[1] == rf[1]) { - int_mv this_refmv[2] = { - get_sub_block_mv(candidate_mi, 0, col, block), - get_sub_block_mv(candidate_mi, 1, col, block) - }; + if (candidate->ref_frame[0] == rf[0] && candidate->ref_frame[1] == rf[1]) { + int_mv this_refmv[2] = { get_sub_block_mv(candidate_mi, 0, col, block), + get_sub_block_mv(candidate_mi, 1, col, block) }; for (ref = 0; ref < 2; ++ref) { lower_mv_precision(&this_refmv[ref].as_mv, use_hp); - clamp_mv_ref(&this_refmv[ref].as_mv, - xd->n8_w << 3, xd->n8_h << 3, xd); + clamp_mv_ref(&this_refmv[ref].as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); } for (index = 0; index < *refmv_count; ++index) @@ -100,8 +83,7 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, (ref_mv_stack[index].comp_mv.as_int == this_refmv[1].as_int)) break; - if (index < *refmv_count) - ref_mv_stack[index].weight += 2 * len; + if (index < *refmv_count) ref_mv_stack[index].weight += 2 * len; // Add a new item to the list. if (index == *refmv_count) { @@ -110,8 +92,7 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, ref_mv_stack[index].weight = 2 * len; ++(*refmv_count); - if (candidate->mode == NEWMV) - ++newmv_count; + if (candidate->mode == NEWMV) ++newmv_count; } if (candidate_mi->mbmi.sb_type < BLOCK_8X8 && block >= 0) { @@ -121,8 +102,8 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, for (ref = 0; ref < 2; ++ref) { lower_mv_precision(&this_refmv[ref].as_mv, use_hp); - clamp_mv_ref(&this_refmv[ref].as_mv, - xd->n8_w << 3, xd->n8_h << 3, xd); + clamp_mv_ref(&this_refmv[ref].as_mv, xd->n8_w << 3, xd->n8_h << 3, + xd); } for (index = 0; index < *refmv_count; ++index) @@ -130,8 +111,7 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, ref_mv_stack[index].comp_mv.as_int == this_refmv[1].as_int) break; - if (index < *refmv_count) - ref_mv_stack[index].weight += len; + if (index < *refmv_count) ref_mv_stack[index].weight += len; // Add a new item to the list. if (index == *refmv_count) { @@ -140,8 +120,7 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, ref_mv_stack[index].weight = len; ++(*refmv_count); - if (candidate->mode == NEWMV) - ++newmv_count; + if (candidate->mode == NEWMV) ++newmv_count; } } } @@ -151,10 +130,8 @@ static uint8_t add_ref_mv_candidate(const MACROBLOCKD *xd, static uint8_t scan_row_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, const int mi_row, const int mi_col, int block, - const MV_REFERENCE_FRAME rf[2], - int row_offset, - CANDIDATE_MV *ref_mv_stack, - uint8_t *refmv_count) { + const MV_REFERENCE_FRAME rf[2], int row_offset, + CANDIDATE_MV *ref_mv_stack, uint8_t *refmv_count) { const TileInfo *const tile = &xd->tile; int i; uint8_t newmv_count = 0; @@ -168,12 +145,11 @@ static uint8_t scan_row_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, const MODE_INFO *const candidate_mi = xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col]; const MB_MODE_INFO *const candidate_mbmi = &candidate_mi->mbmi; - const int len = AOMMIN(xd->n8_w, - num_8x8_blocks_wide_lookup[candidate_mbmi->sb_type]); - newmv_count += add_ref_mv_candidate(xd, candidate_mi, candidate_mbmi, rf, - refmv_count, ref_mv_stack, - cm->allow_high_precision_mv, len, - block, mi_pos.col); + const int len = + AOMMIN(xd->n8_w, num_8x8_blocks_wide_lookup[candidate_mbmi->sb_type]); + newmv_count += add_ref_mv_candidate( + xd, candidate_mi, candidate_mbmi, rf, refmv_count, ref_mv_stack, + cm->allow_high_precision_mv, len, block, mi_pos.col); i += len; } else { ++i; @@ -184,10 +160,8 @@ static uint8_t scan_row_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, static uint8_t scan_col_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, const int mi_row, const int mi_col, int block, - const MV_REFERENCE_FRAME rf[2], - int col_offset, - CANDIDATE_MV *ref_mv_stack, - uint8_t *refmv_count) { + const MV_REFERENCE_FRAME rf[2], int col_offset, + CANDIDATE_MV *ref_mv_stack, uint8_t *refmv_count) { const TileInfo *const tile = &xd->tile; int i; uint8_t newmv_count = 0; @@ -201,12 +175,11 @@ static uint8_t scan_col_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, const MODE_INFO *const candidate_mi = xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col]; const MB_MODE_INFO *const candidate_mbmi = &candidate_mi->mbmi; - const int len = AOMMIN(xd->n8_h, - num_8x8_blocks_high_lookup[candidate_mbmi->sb_type]); - newmv_count += add_ref_mv_candidate(xd, candidate_mi, candidate_mbmi, rf, - refmv_count, ref_mv_stack, - cm->allow_high_precision_mv, len, - block, mi_pos.col); + const int len = + AOMMIN(xd->n8_h, num_8x8_blocks_high_lookup[candidate_mbmi->sb_type]); + newmv_count += add_ref_mv_candidate( + xd, candidate_mi, candidate_mbmi, rf, refmv_count, ref_mv_stack, + cm->allow_high_precision_mv, len, block, mi_pos.col); i += len; } else { ++i; @@ -217,9 +190,8 @@ static uint8_t scan_col_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, static uint8_t scan_blk_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, const int mi_row, const int mi_col, int block, - const MV_REFERENCE_FRAME rf[2], - int row_offset, int col_offset, - CANDIDATE_MV *ref_mv_stack, + const MV_REFERENCE_FRAME rf[2], int row_offset, + int col_offset, CANDIDATE_MV *ref_mv_stack, uint8_t *refmv_count) { const TileInfo *const tile = &xd->tile; POSITION mi_pos; @@ -234,18 +206,17 @@ static uint8_t scan_blk_mbmi(const AV1_COMMON *cm, const MACROBLOCKD *xd, xd->mi[mi_pos.row * xd->mi_stride + mi_pos.col]; const MB_MODE_INFO *const candidate_mbmi = &candidate_mi->mbmi; const int len = 1; - newmv_count += add_ref_mv_candidate(xd, candidate_mi, candidate_mbmi, rf, - refmv_count, ref_mv_stack, - cm->allow_high_precision_mv, len, - block, mi_pos.col); + newmv_count += add_ref_mv_candidate( + xd, candidate_mi, candidate_mbmi, rf, refmv_count, ref_mv_stack, + cm->allow_high_precision_mv, len, block, mi_pos.col); } // Analyze a single 8x8 block motion information. return newmv_count; } -static int has_top_right(const MACROBLOCKD *xd, - int mi_row, int mi_col, int bs) { - int has_tr = !((mi_row & bs) & (bs * 2 - 1)) || - !((mi_col & bs) & (bs * 2 - 1)); +static int has_top_right(const MACROBLOCKD *xd, int mi_row, int mi_col, + int bs) { + int has_tr = + !((mi_row & bs) & (bs * 2 - 1)) || !((mi_col & bs) & (bs * 2 - 1)); // Filter out partial right-most boundaries if ((mi_col & bs) & (bs * 2 - 1)) { @@ -256,21 +227,18 @@ static int has_top_right(const MACROBLOCKD *xd, if (has_tr) if (((mi_col + xd->n8_w) & 0x07) == 0) - if ((mi_row & 0x07) > 0) - has_tr = 0; + if ((mi_row & 0x07) > 0) has_tr = 0; if (xd->n8_w < xd->n8_h) - if (!xd->is_sec_rect) - has_tr = 1; + if (!xd->is_sec_rect) has_tr = 1; if (xd->n8_w > xd->n8_h) - if (xd->is_sec_rect) - has_tr = 0; + if (xd->is_sec_rect) has_tr = 0; return has_tr; } -static void handle_sec_rect_block(const MB_MODE_INFO * const candidate, +static void handle_sec_rect_block(const MB_MODE_INFO *const candidate, uint8_t refmv_count, CANDIDATE_MV *ref_mv_stack, MV_REFERENCE_FRAME ref_frame, @@ -282,8 +250,7 @@ static void handle_sec_rect_block(const MB_MODE_INFO * const candidate, const int list_range = AOMMIN(refmv_count, MAX_MV_REF_CANDIDATES); const int_mv pred_mv = candidate->mv[rf]; for (idx = 0; idx < list_range; ++idx) - if (pred_mv.as_int == ref_mv_stack[idx].this_mv.as_int) - break; + if (pred_mv.as_int == ref_mv_stack[idx].this_mv.as_int) break; if (idx < list_range) { if (idx == 0) @@ -297,13 +264,10 @@ static void handle_sec_rect_block(const MB_MODE_INFO * const candidate, static int add_col_ref_mv(const AV1_COMMON *cm, const MV_REF *prev_frame_mvs_base, - const MACROBLOCKD *xd, - int mi_row, int mi_col, - MV_REFERENCE_FRAME ref_frame, - int blk_row, int blk_col, - uint8_t *refmv_count, - CANDIDATE_MV *ref_mv_stack, - int16_t *mode_context) { + const MACROBLOCKD *xd, int mi_row, int mi_col, + MV_REFERENCE_FRAME ref_frame, int blk_row, + int blk_col, uint8_t *refmv_count, + CANDIDATE_MV *ref_mv_stack, int16_t *mode_context) { const MV_REF *prev_frame_mvs = prev_frame_mvs_base + blk_row * cm->mi_cols + blk_col; POSITION mi_pos; @@ -320,22 +284,17 @@ static int add_col_ref_mv(const AV1_COMMON *cm, if (prev_frame_mvs->ref_frame[ref] == ref_frame) { int_mv this_refmv = prev_frame_mvs->mv[ref]; lower_mv_precision(&this_refmv.as_mv, cm->allow_high_precision_mv); - clamp_mv_ref(&this_refmv.as_mv, - xd->n8_w << 3, xd->n8_h << 3, xd); + clamp_mv_ref(&this_refmv.as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); - if (abs(this_refmv.as_mv.row) >= 16 || - abs(this_refmv.as_mv.col) >= 16) + if (abs(this_refmv.as_mv.row) >= 16 || abs(this_refmv.as_mv.col) >= 16) mode_context[ref_frame] |= (1 << ZEROMV_OFFSET); for (idx = 0; idx < *refmv_count; ++idx) - if (this_refmv.as_int == ref_mv_stack[idx].this_mv.as_int) - break; + if (this_refmv.as_int == ref_mv_stack[idx].this_mv.as_int) break; - if (idx < *refmv_count) - ref_mv_stack[idx].weight += 2; + if (idx < *refmv_count) ref_mv_stack[idx].weight += 2; - if (idx == *refmv_count && - *refmv_count < MAX_REF_MV_STACK_SIZE) { + if (idx == *refmv_count && *refmv_count < MAX_REF_MV_STACK_SIZE) { ref_mv_stack[idx].this_mv.as_int = this_refmv.as_int; ref_mv_stack[idx].pred_mv = prev_frame_mvs->pred_mv[ref]; ref_mv_stack[idx].weight = 2; @@ -351,18 +310,18 @@ static int add_col_ref_mv(const AV1_COMMON *cm, static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd, MV_REFERENCE_FRAME ref_frame, - uint8_t *refmv_count, - CANDIDATE_MV *ref_mv_stack, - int_mv *mv_ref_list, - int block, int mi_row, int mi_col, - int16_t *mode_context) { + uint8_t *refmv_count, CANDIDATE_MV *ref_mv_stack, + int_mv *mv_ref_list, int block, int mi_row, + int mi_col, int16_t *mode_context) { int idx, nearest_refmv_count = 0; uint8_t newmv_count = 0; CANDIDATE_MV tmp_mv; int len, nr_len; - const MV_REF *const prev_frame_mvs_base = cm->use_prev_frame_mvs ? - cm->prev_frame->mvs + mi_row * cm->mi_cols + mi_col : NULL; + const MV_REF *const prev_frame_mvs_base = + cm->use_prev_frame_mvs + ? cm->prev_frame->mvs + mi_row * cm->mi_cols + mi_col + : NULL; const int bs = AOMMAX(xd->n8_w, xd->n8_h); const int has_tr = has_top_right(xd, mi_row, mi_col, bs); @@ -373,16 +332,16 @@ static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd, *refmv_count = 0; // Scan the first above row mode info. - newmv_count += scan_row_mbmi(cm, xd, mi_row, mi_col, block, rf, - -1, ref_mv_stack, refmv_count); + newmv_count += scan_row_mbmi(cm, xd, mi_row, mi_col, block, rf, -1, + ref_mv_stack, refmv_count); // Scan the first left column mode info. - newmv_count += scan_col_mbmi(cm, xd, mi_row, mi_col, block, rf, - -1, ref_mv_stack, refmv_count); + newmv_count += scan_col_mbmi(cm, xd, mi_row, mi_col, block, rf, -1, + ref_mv_stack, refmv_count); // Check top-right boundary if (has_tr) - newmv_count += scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, - -1, 1, ref_mv_stack, refmv_count); + newmv_count += scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, -1, 1, + ref_mv_stack, refmv_count); nearest_refmv_count = *refmv_count; @@ -396,32 +355,28 @@ static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd, for (blk_row = 0; blk_row < xd->n8_h; ++blk_row) { for (blk_col = 0; blk_col < xd->n8_w; ++blk_col) { - coll_blk_count += add_col_ref_mv(cm, prev_frame_mvs_base, xd, - mi_row, mi_col, ref_frame, - blk_row, blk_col, - refmv_count, ref_mv_stack, - mode_context); + coll_blk_count += add_col_ref_mv( + cm, prev_frame_mvs_base, xd, mi_row, mi_col, ref_frame, blk_row, + blk_col, refmv_count, ref_mv_stack, mode_context); } } - if (coll_blk_count == 0) - mode_context[ref_frame] |= (1 << ZEROMV_OFFSET); + if (coll_blk_count == 0) mode_context[ref_frame] |= (1 << ZEROMV_OFFSET); } else { mode_context[ref_frame] |= (1 << ZEROMV_OFFSET); } // Scan the second outer area. for (idx = 2; idx <= 4; ++idx) { - scan_row_mbmi(cm, xd, mi_row, mi_col, block, rf, - -idx, ref_mv_stack, refmv_count); - scan_col_mbmi(cm, xd, mi_row, mi_col, block, rf, - -idx, ref_mv_stack, refmv_count); + scan_row_mbmi(cm, xd, mi_row, mi_col, block, rf, -idx, ref_mv_stack, + refmv_count); + scan_col_mbmi(cm, xd, mi_row, mi_col, block, rf, -idx, ref_mv_stack, + refmv_count); } switch (nearest_refmv_count) { case 0: mode_context[ref_frame] |= 0; - if (*refmv_count >= 1) - mode_context[ref_frame] |= 1; + if (*refmv_count >= 1) mode_context[ref_frame] |= 1; if (*refmv_count == 1) mode_context[ref_frame] |= (1 << REFMV_OFFSET); @@ -497,16 +452,15 @@ static void setup_ref_mv_list(const AV1_COMMON *cm, const MACROBLOCKD *xd, if (rf[1] > NONE) { for (idx = 0; idx < *refmv_count; ++idx) { - clamp_mv_ref(&ref_mv_stack[idx].this_mv.as_mv, - xd->n8_w << 3 , xd->n8_h << 3, xd); - clamp_mv_ref(&ref_mv_stack[idx].comp_mv.as_mv, - xd->n8_w << 3 , xd->n8_h << 3, xd); + clamp_mv_ref(&ref_mv_stack[idx].this_mv.as_mv, xd->n8_w << 3, + xd->n8_h << 3, xd); + clamp_mv_ref(&ref_mv_stack[idx].comp_mv.as_mv, xd->n8_w << 3, + xd->n8_h << 3, xd); } } else { for (idx = 0; idx < AOMMIN(MAX_MV_REF_CANDIDATES, *refmv_count); ++idx) { mv_ref_list[idx].as_int = ref_mv_stack[idx].this_mv.as_int; - clamp_mv_ref(&mv_ref_list[idx].as_mv, - xd->n8_w << 3, xd->n8_h << 3, xd); + clamp_mv_ref(&mv_ref_list[idx].as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); } } } @@ -666,8 +620,7 @@ Done: void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd, MODE_INFO *mi, MV_REFERENCE_FRAME ref_frame, #if CONFIG_REF_MV - uint8_t *ref_mv_count, - CANDIDATE_MV *ref_mv_stack, + uint8_t *ref_mv_count, CANDIDATE_MV *ref_mv_stack, #endif int_mv *mv_ref_list, int mi_row, int mi_col, find_mv_refs_sync sync, void *const data, @@ -683,32 +636,26 @@ void av1_find_mv_refs(const AV1_COMMON *cm, const MACROBLOCKD *xd, #endif #if CONFIG_REF_MV - setup_ref_mv_list(cm, xd, ref_frame, - ref_mv_count, ref_mv_stack, - mv_ref_list, -1, - mi_row, mi_col, mode_context); + setup_ref_mv_list(cm, xd, ref_frame, ref_mv_count, ref_mv_stack, mv_ref_list, + -1, mi_row, mi_col, mode_context); if (*ref_mv_count >= 2) { for (idx = 0; idx < AOMMIN(3, *ref_mv_count); ++idx) { - if (ref_mv_stack[idx].this_mv.as_int != 0) - all_zero = 0; + if (ref_mv_stack[idx].this_mv.as_int != 0) all_zero = 0; if (ref_frame > ALTREF_FRAME) - if (ref_mv_stack[idx].comp_mv.as_int != 0) - all_zero = 0; + if (ref_mv_stack[idx].comp_mv.as_int != 0) all_zero = 0; } } else if (ref_frame <= ALTREF_FRAME) { for (idx = 0; idx < MAX_MV_REF_CANDIDATES; ++idx) - if (mv_ref_list[idx].as_int != 0) - all_zero = 0; + if (mv_ref_list[idx].as_int != 0) all_zero = 0; } - if (all_zero) - mode_context[ref_frame] |= (1 << ALL_ZERO_FLAG_OFFSET); + if (all_zero) mode_context[ref_frame] |= (1 << ALL_ZERO_FLAG_OFFSET); #endif } void av1_find_best_ref_mvs(int allow_hp, int_mv *mvlist, int_mv *nearest_mv, - int_mv *near_mv) { + int_mv *near_mv) { int i; // Make sure all the candidates are properly clamped etc for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i) { @@ -740,12 +687,12 @@ void av1_append_sub8x8_mvs_for_idx(AV1_COMMON *cm, MACROBLOCKD *xd, int block, mi_col, NULL, NULL, NULL); #if CONFIG_REF_MV - scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, - -1, 0, ref_mv_stack, &ref_mv_count); + scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, -1, 0, ref_mv_stack, + &ref_mv_count); above_count = ref_mv_count; - scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, - 0, -1, ref_mv_stack, &ref_mv_count); + scan_blk_mbmi(cm, xd, mi_row, mi_col, block, rf, 0, -1, ref_mv_stack, + &ref_mv_count); left_count = ref_mv_count - above_count; if (above_count > 1 && left_count > 0) { @@ -756,8 +703,7 @@ void av1_append_sub8x8_mvs_for_idx(AV1_COMMON *cm, MACROBLOCKD *xd, int block, for (idx = 0; idx < AOMMIN(MAX_MV_REF_CANDIDATES, ref_mv_count); ++idx) { mv_list[idx].as_int = ref_mv_stack[idx].this_mv.as_int; - clamp_mv_ref(&mv_list[idx].as_mv, - xd->n8_w << 3, xd->n8_h << 3, xd); + clamp_mv_ref(&mv_list[idx].as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); } #endif diff --git a/av1/common/od_dering.c b/av1/common/od_dering.c index 4aa74e62e..fa5926634 100644 --- a/av1/common/od_dering.c +++ b/av1/common/od_dering.c @@ -9,7 +9,7 @@ * PATENTS file, you can obtain it at www.aomedia.org/license/patent. */ #ifdef HAVE_CONFIG_H -# include "config.h" +#include "config.h" #endif #include @@ -17,25 +17,26 @@ #include "dering.h" const od_dering_opt_vtbl OD_DERING_VTBL_C = { - {od_filter_dering_direction_4x4_c, od_filter_dering_direction_8x8_c}, - {od_filter_dering_orthogonal_4x4_c, od_filter_dering_orthogonal_8x8_c} + { od_filter_dering_direction_4x4_c, od_filter_dering_direction_8x8_c }, + { od_filter_dering_orthogonal_4x4_c, od_filter_dering_orthogonal_8x8_c } }; /* Generated from gen_filter_tables.c. */ const int OD_DIRECTION_OFFSETS_TABLE[8][3] = { - {-1*OD_FILT_BSTRIDE + 1, -2*OD_FILT_BSTRIDE + 2, -3*OD_FILT_BSTRIDE + 3 }, - { 0*OD_FILT_BSTRIDE + 1, -1*OD_FILT_BSTRIDE + 2, -1*OD_FILT_BSTRIDE + 3 }, - { 0*OD_FILT_BSTRIDE + 1, 0*OD_FILT_BSTRIDE + 2, 0*OD_FILT_BSTRIDE + 3 }, - { 0*OD_FILT_BSTRIDE + 1, 1*OD_FILT_BSTRIDE + 2, 1*OD_FILT_BSTRIDE + 3 }, - { 1*OD_FILT_BSTRIDE + 1, 2*OD_FILT_BSTRIDE + 2, 3*OD_FILT_BSTRIDE + 3 }, - { 1*OD_FILT_BSTRIDE + 0, 2*OD_FILT_BSTRIDE + 1, 3*OD_FILT_BSTRIDE + 1 }, - { 1*OD_FILT_BSTRIDE + 0, 2*OD_FILT_BSTRIDE + 0, 3*OD_FILT_BSTRIDE + 0 }, - { 1*OD_FILT_BSTRIDE + 0, 2*OD_FILT_BSTRIDE - 1, 3*OD_FILT_BSTRIDE - 1 }, + { -1 * OD_FILT_BSTRIDE + 1, -2 * OD_FILT_BSTRIDE + 2, + -3 * OD_FILT_BSTRIDE + 3 }, + { 0 * OD_FILT_BSTRIDE + 1, -1 * OD_FILT_BSTRIDE + 2, + -1 * OD_FILT_BSTRIDE + 3 }, + { 0 * OD_FILT_BSTRIDE + 1, 0 * OD_FILT_BSTRIDE + 2, 0 * OD_FILT_BSTRIDE + 3 }, + { 0 * OD_FILT_BSTRIDE + 1, 1 * OD_FILT_BSTRIDE + 2, 1 * OD_FILT_BSTRIDE + 3 }, + { 1 * OD_FILT_BSTRIDE + 1, 2 * OD_FILT_BSTRIDE + 2, 3 * OD_FILT_BSTRIDE + 3 }, + { 1 * OD_FILT_BSTRIDE + 0, 2 * OD_FILT_BSTRIDE + 1, 3 * OD_FILT_BSTRIDE + 1 }, + { 1 * OD_FILT_BSTRIDE + 0, 2 * OD_FILT_BSTRIDE + 0, 3 * OD_FILT_BSTRIDE + 0 }, + { 1 * OD_FILT_BSTRIDE + 0, 2 * OD_FILT_BSTRIDE - 1, 3 * OD_FILT_BSTRIDE - 1 }, }; -const double OD_DERING_GAIN_TABLE[OD_DERING_LEVELS] = { - 0, 0.5, 0.707, 1, 1.41, 2 -}; +const double OD_DERING_GAIN_TABLE[OD_DERING_LEVELS] = { 0, 0.5, 0.707, + 1, 1.41, 2 }; /* Detect direction. 0 means 45-degree up-right, 2 is horizontal, and so on. The search minimizes the weighted variance along all the lines in a @@ -45,56 +46,59 @@ const double OD_DERING_GAIN_TABLE[OD_DERING_LEVELS] = { that term is never computed. See Section 2, step 2, of: http://jmvalin.ca/notes/intra_paint.pdf */ static int od_dir_find8(const od_dering_in *img, int stride, int32_t *var, - int coeff_shift) { + int coeff_shift) { int i; - int32_t cost[8] = {0}; - int partial[8][15] = {{0}}; + int32_t cost[8] = { 0 }; + int partial[8][15] = { { 0 } }; int32_t best_cost = 0; int best_dir = 0; /* Instead of dividing by n between 2 and 8, we multiply by 3*5*7*8/n. The output is then 840 times larger, but we don't care for finding the max. */ - static const int div_table[] = {0, 840, 420, 280, 210, 168, 140, 120, 105}; + static const int div_table[] = { 0, 840, 420, 280, 210, 168, 140, 120, 105 }; for (i = 0; i < 8; i++) { int j; for (j = 0; j < 8; j++) { int x; /* We subtract 128 here to reduce the maximum range of the squared partial sums. */ - x = (img[i*stride + j] >> coeff_shift) - 128; + x = (img[i * stride + j] >> coeff_shift) - 128; partial[0][i + j] += x; - partial[1][i + j/2] += x; + partial[1][i + j / 2] += x; partial[2][i] += x; - partial[3][3 + i - j/2] += x; + partial[3][3 + i - j / 2] += x; partial[4][7 + i - j] += x; - partial[5][3 - i/2 + j] += x; + partial[5][3 - i / 2 + j] += x; partial[6][j] += x; - partial[7][i/2 + j] += x; + partial[7][i / 2 + j] += x; } } for (i = 0; i < 8; i++) { - cost[2] += partial[2][i]*partial[2][i]; - cost[6] += partial[6][i]*partial[6][i]; + cost[2] += partial[2][i] * partial[2][i]; + cost[6] += partial[6][i] * partial[6][i]; } cost[2] *= div_table[8]; cost[6] *= div_table[8]; for (i = 0; i < 7; i++) { - cost[0] += (partial[0][i]*partial[0][i] - + partial[0][14 - i]*partial[0][14 - i])*div_table[i + 1]; - cost[4] += (partial[4][i]*partial[4][i] - + partial[4][14 - i]*partial[4][14 - i])*div_table[i + 1]; + cost[0] += (partial[0][i] * partial[0][i] + + partial[0][14 - i] * partial[0][14 - i]) * + div_table[i + 1]; + cost[4] += (partial[4][i] * partial[4][i] + + partial[4][14 - i] * partial[4][14 - i]) * + div_table[i + 1]; } - cost[0] += partial[0][7]*partial[0][7]*div_table[8]; - cost[4] += partial[4][7]*partial[4][7]*div_table[8]; + cost[0] += partial[0][7] * partial[0][7] * div_table[8]; + cost[4] += partial[4][7] * partial[4][7] * div_table[8]; for (i = 1; i < 8; i += 2) { int j; for (j = 0; j < 4 + 1; j++) { - cost[i] += partial[i][3 + j]*partial[i][3 + j]; + cost[i] += partial[i][3 + j] * partial[i][3 + j]; } cost[i] *= div_table[8]; for (j = 0; j < 4 - 1; j++) { - cost[i] += (partial[i][j]*partial[i][j] - + partial[i][10 - j]*partial[i][10 - j])*div_table[2*j + 2]; + cost[i] += (partial[i][j] * partial[i][j] + + partial[i][10 - j] * partial[i][10 - j]) * + div_table[2 * j + 2]; } } for (i = 0; i < 8; i++) { @@ -113,57 +117,62 @@ static int od_dir_find8(const od_dering_in *img, int stride, int32_t *var, } #define OD_DERING_VERY_LARGE (30000) -#define OD_DERING_INBUF_SIZE ((OD_BSIZE_MAX + 2*OD_FILT_BORDER)*\ - (OD_BSIZE_MAX + 2*OD_FILT_BORDER)) +#define OD_DERING_INBUF_SIZE \ + ((OD_BSIZE_MAX + 2 * OD_FILT_BORDER) * (OD_BSIZE_MAX + 2 * OD_FILT_BORDER)) /* Smooth in the direction detected. */ void od_filter_dering_direction_c(int16_t *y, int ystride, const int16_t *in, - int ln, int threshold, int dir) { + int ln, int threshold, int dir) { int i; int j; int k; - static const int taps[3] = {3, 2, 1}; + static const int taps[3] = { 3, 2, 1 }; for (i = 0; i < 1 << ln; i++) { for (j = 0; j < 1 << ln; j++) { int16_t sum; int16_t xx; int16_t yy; - xx = in[i*OD_FILT_BSTRIDE + j]; - sum= 0; + xx = in[i * OD_FILT_BSTRIDE + j]; + sum = 0; for (k = 0; k < 3; k++) { int16_t p0; int16_t p1; - p0 = in[i*OD_FILT_BSTRIDE + j + OD_DIRECTION_OFFSETS_TABLE[dir][k]] - - xx; - p1 = in[i*OD_FILT_BSTRIDE + j - OD_DIRECTION_OFFSETS_TABLE[dir][k]] - - xx; - if (abs(p0) < threshold) sum += taps[k]*p0; - if (abs(p1) < threshold) sum += taps[k]*p1; + p0 = in[i * OD_FILT_BSTRIDE + j + OD_DIRECTION_OFFSETS_TABLE[dir][k]] - + xx; + p1 = in[i * OD_FILT_BSTRIDE + j - OD_DIRECTION_OFFSETS_TABLE[dir][k]] - + xx; + if (abs(p0) < threshold) sum += taps[k] * p0; + if (abs(p1) < threshold) sum += taps[k] * p1; } yy = xx + ((sum + 8) >> 4); - y[i*ystride + j] = yy; + y[i * ystride + j] = yy; } } } void od_filter_dering_direction_4x4_c(int16_t *y, int ystride, - const int16_t *in, int threshold, int dir) { + const int16_t *in, int threshold, + int dir) { od_filter_dering_direction_c(y, ystride, in, 2, threshold, dir); } void od_filter_dering_direction_8x8_c(int16_t *y, int ystride, - const int16_t *in, int threshold, int dir) { + const int16_t *in, int threshold, + int dir) { od_filter_dering_direction_c(y, ystride, in, 3, threshold, dir); } /* Smooth in the direction orthogonal to what was detected. */ void od_filter_dering_orthogonal_c(int16_t *y, int ystride, const int16_t *in, - const od_dering_in *x, int xstride, int ln, int threshold, int dir) { + const od_dering_in *x, int xstride, int ln, + int threshold, int dir) { int i; int j; int offset; - if (dir > 0 && dir < 4) offset = OD_FILT_BSTRIDE; - else offset = 1; + if (dir > 0 && dir < 4) + offset = OD_FILT_BSTRIDE; + else + offset = 1; for (i = 0; i < 1 << ln; i++) { for (j = 0; j < 1 << ln; j++) { int16_t athresh; @@ -178,32 +187,33 @@ void od_filter_dering_orthogonal_c(int16_t *y, int ystride, const int16_t *in, to be a little bit more aggressive on pure horizontal/vertical since the ringing there tends to be directional, so it doesn't get removed by the directional filtering. */ - athresh = OD_MINI(threshold, threshold/3 - + abs(in[i*OD_FILT_BSTRIDE + j] - x[i*xstride + j])); - yy = in[i*OD_FILT_BSTRIDE + j]; + athresh = OD_MINI( + threshold, threshold / 3 + + abs(in[i * OD_FILT_BSTRIDE + j] - x[i * xstride + j])); + yy = in[i * OD_FILT_BSTRIDE + j]; sum = 0; - p = in[i*OD_FILT_BSTRIDE + j + offset] - yy; + p = in[i * OD_FILT_BSTRIDE + j + offset] - yy; if (abs(p) < athresh) sum += p; - p = in[i*OD_FILT_BSTRIDE + j - offset] - yy; + p = in[i * OD_FILT_BSTRIDE + j - offset] - yy; if (abs(p) < athresh) sum += p; - p = in[i*OD_FILT_BSTRIDE + j + 2*offset] - yy; + p = in[i * OD_FILT_BSTRIDE + j + 2 * offset] - yy; if (abs(p) < athresh) sum += p; - p = in[i*OD_FILT_BSTRIDE + j - 2*offset] - yy; + p = in[i * OD_FILT_BSTRIDE + j - 2 * offset] - yy; if (abs(p) < athresh) sum += p; - y[i*ystride + j] = yy + ((3*sum + 8) >> 4); + y[i * ystride + j] = yy + ((3 * sum + 8) >> 4); } } } void od_filter_dering_orthogonal_4x4_c(int16_t *y, int ystride, - const int16_t *in, const od_dering_in *x, int xstride, int threshold, - int dir) { + const int16_t *in, const od_dering_in *x, + int xstride, int threshold, int dir) { od_filter_dering_orthogonal_c(y, ystride, in, x, xstride, 2, threshold, dir); } void od_filter_dering_orthogonal_8x8_c(int16_t *y, int ystride, - const int16_t *in, const od_dering_in *x, int xstride, int threshold, - int dir) { + const int16_t *in, const od_dering_in *x, + int xstride, int threshold, int dir) { od_filter_dering_orthogonal_c(y, ystride, in, x, xstride, 3, threshold, dir); } @@ -211,9 +221,8 @@ void od_filter_dering_orthogonal_8x8_c(int16_t *y, int ystride, to [-.5, 3]. The table is computed as: round(256*min(3, max(.5, 1.08*(sqrt(2)*2.^([0:17]+8)/256/256).^.16))) */ static const int16_t OD_THRESH_TABLE_Q8[18] = { - 128, 134, 150, 168, 188, 210, 234, 262, - 292, 327, 365, 408, 455, 509, 569, 635, - 710, 768, + 128, 134, 150, 168, 188, 210, 234, 262, 292, + 327, 365, 408, 455, 509, 569, 635, 710, 768, }; /* Compute deringing filter threshold for each 8x8 block based on the @@ -223,8 +232,9 @@ static const int16_t OD_THRESH_TABLE_Q8[18] = { contrast edge, or a non-directional texture, so we want to be careful not to blur. */ static void od_compute_thresh(int thresh[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], - int threshold, int32_t var[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], - int nhb, int nvb) { + int threshold, + int32_t var[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], + int nhb, int nvb) { int bx; int by; for (by = 0; by < nvb; by++) { @@ -232,16 +242,17 @@ static void od_compute_thresh(int thresh[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], int v1; /* We use the variance of 8x8 blocks to adjust the threshold. */ v1 = OD_MINI(32767, var[by][bx] >> 6); - thresh[by][bx] = (threshold*OD_THRESH_TABLE_Q8[OD_ILOG(v1)] + 128) >> 8; + thresh[by][bx] = (threshold * OD_THRESH_TABLE_Q8[OD_ILOG(v1)] + 128) >> 8; } } } void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride, - const od_dering_in *x, int xstride, int nhb, int nvb, int sbx, int sby, - int nhsb, int nvsb, int xdec, int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], - int pli, unsigned char *bskip, int skip_stride, int threshold, int overlap, - int coeff_shift) { + const od_dering_in *x, int xstride, int nhb, int nvb, int sbx, + int sby, int nhsb, int nvsb, int xdec, + int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS], int pli, + unsigned char *bskip, int skip_stride, int threshold, + int overlap, int coeff_shift) { int i; int j; int bx; @@ -252,28 +263,27 @@ void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride, int32_t var[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS]; int thresh[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS]; bsize = 3 - xdec; - in = inbuf + OD_FILT_BORDER*OD_FILT_BSTRIDE + OD_FILT_BORDER; + in = inbuf + OD_FILT_BORDER * OD_FILT_BSTRIDE + OD_FILT_BORDER; /* We avoid filtering the pixels for which some of the pixels to average are outside the frame. We could change the filter instead, but it would add special cases for any future vectorization. */ for (i = 0; i < OD_DERING_INBUF_SIZE; i++) inbuf[i] = OD_DERING_VERY_LARGE; - for (i = -OD_FILT_BORDER*(sby != 0); i < (nvb << bsize) - + OD_FILT_BORDER*(sby != nvsb - 1); i++) { - for (j = -OD_FILT_BORDER*(sbx != 0); j < (nhb << bsize) - + OD_FILT_BORDER*(sbx != nhsb - 1); j++) { - in[i*OD_FILT_BSTRIDE + j] = x[i*xstride + j]; + for (i = -OD_FILT_BORDER * (sby != 0); + i < (nvb << bsize) + OD_FILT_BORDER * (sby != nvsb - 1); i++) { + for (j = -OD_FILT_BORDER * (sbx != 0); + j < (nhb << bsize) + OD_FILT_BORDER * (sbx != nhsb - 1); j++) { + in[i * OD_FILT_BSTRIDE + j] = x[i * xstride + j]; } } if (pli == 0) { for (by = 0; by < nvb; by++) { for (bx = 0; bx < nhb; bx++) { - dir[by][bx] = od_dir_find8(&x[8*by*xstride + 8*bx], xstride, - &var[by][bx], coeff_shift); + dir[by][bx] = od_dir_find8(&x[8 * by * xstride + 8 * bx], xstride, + &var[by][bx], coeff_shift); } } od_compute_thresh(thresh, threshold, var, nhb, nvb); - } - else { + } else { for (by = 0; by < nvb; by++) { for (bx = 0; bx < nhb; bx++) { thresh[by][bx] = threshold; @@ -283,7 +293,7 @@ void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride, for (by = 0; by < nvb; by++) { for (bx = 0; bx < nhb; bx++) { int skip; -# if defined(DAALA_ODINTRIN) +#if defined(DAALA_ODINTRIN) int xstart; int ystart; int xend; @@ -302,13 +312,13 @@ void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride, times. */ for (i = ystart; i < yend; i++) { for (j = xstart; j < xend; j++) { - skip = skip && bskip[((by << 1 >> xdec) + i)*skip_stride - + (bx << 1 >> xdec) + j]; + skip = skip && bskip[((by << 1 >> xdec) + i) * skip_stride + + (bx << 1 >> xdec) + j]; } } #else (void)overlap; - skip = bskip[by*skip_stride + bx]; + skip = bskip[by * skip_stride + bx]; #endif if (skip) thresh[by][bx] = 0; } @@ -316,23 +326,23 @@ void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride, for (by = 0; by < nvb; by++) { for (bx = 0; bx < nhb; bx++) { (vtbl->filter_dering_direction[bsize - OD_LOG_BSIZE0])( - &y[(by*ystride << bsize) + (bx << bsize)], ystride, - &in[(by*OD_FILT_BSTRIDE << bsize) + (bx << bsize)], - thresh[by][bx], dir[by][bx]); + &y[(by * ystride << bsize) + (bx << bsize)], ystride, + &in[(by * OD_FILT_BSTRIDE << bsize) + (bx << bsize)], thresh[by][bx], + dir[by][bx]); } } for (i = 0; i < nvb << bsize; i++) { for (j = 0; j < nhb << bsize; j++) { - in[i*OD_FILT_BSTRIDE + j] = y[i*ystride + j]; + in[i * OD_FILT_BSTRIDE + j] = y[i * ystride + j]; } } for (by = 0; by < nvb; by++) { for (bx = 0; bx < nhb; bx++) { (vtbl->filter_dering_orthogonal[bsize - OD_LOG_BSIZE0])( - &y[(by*ystride << bsize) + (bx << bsize)], ystride, - &in[(by*OD_FILT_BSTRIDE << bsize) + (bx << bsize)], - &x[(by*xstride << bsize) + (bx << bsize)], xstride, - thresh[by][bx], dir[by][bx]); + &y[(by * ystride << bsize) + (bx << bsize)], ystride, + &in[(by * OD_FILT_BSTRIDE << bsize) + (bx << bsize)], + &x[(by * xstride << bsize) + (bx << bsize)], xstride, thresh[by][bx], + dir[by][bx]); } } } diff --git a/av1/common/odintrin.c b/av1/common/odintrin.c index 44830c18f..bb36104d0 100644 --- a/av1/common/odintrin.c +++ b/av1/common/odintrin.c @@ -23,346 +23,516 @@ year=2005 }*/ uint32_t OD_DIVU_SMALL_CONSTS[OD_DIVU_DMAX][2] = { - {0xFFFFFFFF, 0xFFFFFFFF}, {0xFFFFFFFF, 0xFFFFFFFF}, {0xAAAAAAAB, 0}, - {0xFFFFFFFF, 0xFFFFFFFF}, {0xCCCCCCCD, 0}, {0xAAAAAAAB, 0}, - {0x92492492, 0x92492492}, {0xFFFFFFFF, 0xFFFFFFFF}, {0xE38E38E4, 0}, - {0xCCCCCCCD, 0}, {0xBA2E8BA3, 0}, {0xAAAAAAAB, 0}, - {0x9D89D89E, 0}, {0x92492492, 0x92492492}, {0x88888889, 0}, - {0xFFFFFFFF, 0xFFFFFFFF}, {0xF0F0F0F1, 0}, {0xE38E38E4, 0}, - {0xD79435E5, 0xD79435E5}, {0xCCCCCCCD, 0}, {0xC30C30C3, 0xC30C30C3}, - {0xBA2E8BA3, 0}, {0xB21642C9, 0}, {0xAAAAAAAB, 0}, - {0xA3D70A3E, 0}, {0x9D89D89E, 0}, {0x97B425ED, 0x97B425ED}, - {0x92492492, 0x92492492}, {0x8D3DCB09, 0}, {0x88888889, 0}, - {0x84210842, 0x84210842}, {0xFFFFFFFF, 0xFFFFFFFF}, {0xF83E0F84, 0}, - {0xF0F0F0F1, 0}, {0xEA0EA0EA, 0xEA0EA0EA}, {0xE38E38E4, 0}, - {0xDD67C8A6, 0xDD67C8A6}, {0xD79435E5, 0xD79435E5}, {0xD20D20D2, 0xD20D20D2}, - {0xCCCCCCCD, 0}, {0xC7CE0C7D, 0}, {0xC30C30C3, 0xC30C30C3}, - {0xBE82FA0C, 0}, {0xBA2E8BA3, 0}, {0xB60B60B6, 0xB60B60B6}, - {0xB21642C9, 0}, {0xAE4C415D, 0}, {0xAAAAAAAB, 0}, - {0xA72F053A, 0}, {0xA3D70A3E, 0}, {0xA0A0A0A1, 0}, - {0x9D89D89E, 0}, {0x9A90E7D9, 0x9A90E7D9}, {0x97B425ED, 0x97B425ED}, - {0x94F2094F, 0x94F2094F}, {0x92492492, 0x92492492}, {0x8FB823EE, 0x8FB823EE}, - {0x8D3DCB09, 0}, {0x8AD8F2FC, 0}, {0x88888889, 0}, - {0x864B8A7E, 0}, {0x84210842, 0x84210842}, {0x82082082, 0x82082082}, - {0xFFFFFFFF, 0xFFFFFFFF}, {0xFC0FC0FD, 0}, {0xF83E0F84, 0}, - {0xF4898D60, 0}, {0xF0F0F0F1, 0}, {0xED7303B6, 0}, - {0xEA0EA0EA, 0xEA0EA0EA}, {0xE6C2B449, 0}, {0xE38E38E4, 0}, - {0xE070381C, 0xE070381C}, {0xDD67C8A6, 0xDD67C8A6}, {0xDA740DA8, 0}, - {0xD79435E5, 0xD79435E5}, {0xD4C77B04, 0}, {0xD20D20D2, 0xD20D20D2}, - {0xCF6474A9, 0}, {0xCCCCCCCD, 0}, {0xCA4587E7, 0}, - {0xC7CE0C7D, 0}, {0xC565C87C, 0}, {0xC30C30C3, 0xC30C30C3}, - {0xC0C0C0C1, 0}, {0xBE82FA0C, 0}, {0xBC52640C, 0}, - {0xBA2E8BA3, 0}, {0xB81702E1, 0}, {0xB60B60B6, 0xB60B60B6}, - {0xB40B40B4, 0xB40B40B4}, {0xB21642C9, 0}, {0xB02C0B03, 0}, - {0xAE4C415D, 0}, {0xAC769184, 0xAC769184}, {0xAAAAAAAB, 0}, - {0xA8E83F57, 0xA8E83F57}, {0xA72F053A, 0}, {0xA57EB503, 0}, - {0xA3D70A3E, 0}, {0xA237C32B, 0xA237C32B}, {0xA0A0A0A1, 0}, - {0x9F1165E7, 0x9F1165E7}, {0x9D89D89E, 0}, {0x9C09C09C, 0x9C09C09C}, - {0x9A90E7D9, 0x9A90E7D9}, {0x991F1A51, 0x991F1A51}, {0x97B425ED, 0x97B425ED}, - {0x964FDA6C, 0x964FDA6C}, {0x94F2094F, 0x94F2094F}, {0x939A85C4, 0x939A85C4}, - {0x92492492, 0x92492492}, {0x90FDBC09, 0x90FDBC09}, {0x8FB823EE, 0x8FB823EE}, - {0x8E78356D, 0x8E78356D}, {0x8D3DCB09, 0}, {0x8C08C08C, 0x8C08C08C}, - {0x8AD8F2FC, 0}, {0x89AE408A, 0}, {0x88888889, 0}, - {0x8767AB5F, 0x8767AB5F}, {0x864B8A7E, 0}, {0x85340853, 0x85340853}, - {0x84210842, 0x84210842}, {0x83126E98, 0}, {0x82082082, 0x82082082}, - {0x81020408, 0x81020408}, {0xFFFFFFFF, 0xFFFFFFFF}, {0xFE03F810, 0}, - {0xFC0FC0FD, 0}, {0xFA232CF3, 0}, {0xF83E0F84, 0}, - {0xF6603D99, 0}, {0xF4898D60, 0}, {0xF2B9D649, 0}, - {0xF0F0F0F1, 0}, {0xEF2EB720, 0}, {0xED7303B6, 0}, - {0xEBBDB2A6, 0}, {0xEA0EA0EA, 0xEA0EA0EA}, {0xE865AC7C, 0}, - {0xE6C2B449, 0}, {0xE525982B, 0}, {0xE38E38E4, 0}, - {0xE1FC780F, 0}, {0xE070381C, 0xE070381C}, {0xDEE95C4D, 0}, - {0xDD67C8A6, 0xDD67C8A6}, {0xDBEB61EF, 0}, {0xDA740DA8, 0}, - {0xD901B204, 0}, {0xD79435E5, 0xD79435E5}, {0xD62B80D7, 0}, - {0xD4C77B04, 0}, {0xD3680D37, 0}, {0xD20D20D2, 0xD20D20D2}, - {0xD0B69FCC, 0}, {0xCF6474A9, 0}, {0xCE168A77, 0xCE168A77}, - {0xCCCCCCCD, 0}, {0xCB8727C1, 0}, {0xCA4587E7, 0}, - {0xC907DA4F, 0}, {0xC7CE0C7D, 0}, {0xC6980C6A, 0}, - {0xC565C87C, 0}, {0xC4372F86, 0}, {0xC30C30C3, 0xC30C30C3}, - {0xC1E4BBD6, 0}, {0xC0C0C0C1, 0}, {0xBFA02FE8, 0xBFA02FE8}, - {0xBE82FA0C, 0}, {0xBD691047, 0xBD691047}, {0xBC52640C, 0}, - {0xBB3EE722, 0}, {0xBA2E8BA3, 0}, {0xB92143FA, 0xB92143FA}, - {0xB81702E1, 0}, {0xB70FBB5A, 0xB70FBB5A}, {0xB60B60B6, 0xB60B60B6}, - {0xB509E68B, 0}, {0xB40B40B4, 0xB40B40B4}, {0xB30F6353, 0}, - {0xB21642C9, 0}, {0xB11FD3B8, 0xB11FD3B8}, {0xB02C0B03, 0}, - {0xAF3ADDC7, 0}, {0xAE4C415D, 0}, {0xAD602B58, 0xAD602B58}, - {0xAC769184, 0xAC769184}, {0xAB8F69E3, 0}, {0xAAAAAAAB, 0}, - {0xA9C84A48, 0}, {0xA8E83F57, 0xA8E83F57}, {0xA80A80A8, 0xA80A80A8}, - {0xA72F053A, 0}, {0xA655C439, 0xA655C439}, {0xA57EB503, 0}, - {0xA4A9CF1E, 0}, {0xA3D70A3E, 0}, {0xA3065E40, 0}, - {0xA237C32B, 0xA237C32B}, {0xA16B312F, 0}, {0xA0A0A0A1, 0}, - {0x9FD809FE, 0}, {0x9F1165E7, 0x9F1165E7}, {0x9E4CAD24, 0}, - {0x9D89D89E, 0}, {0x9CC8E161, 0}, {0x9C09C09C, 0x9C09C09C}, - {0x9B4C6F9F, 0}, {0x9A90E7D9, 0x9A90E7D9}, {0x99D722DB, 0}, - {0x991F1A51, 0x991F1A51}, {0x9868C80A, 0}, {0x97B425ED, 0x97B425ED}, - {0x97012E02, 0x97012E02}, {0x964FDA6C, 0x964FDA6C}, {0x95A02568, 0x95A02568}, - {0x94F2094F, 0x94F2094F}, {0x94458094, 0x94458094}, {0x939A85C4, 0x939A85C4}, - {0x92F11384, 0x92F11384}, {0x92492492, 0x92492492}, {0x91A2B3C5, 0}, - {0x90FDBC09, 0x90FDBC09}, {0x905A3863, 0x905A3863}, {0x8FB823EE, 0x8FB823EE}, - {0x8F1779DA, 0}, {0x8E78356D, 0x8E78356D}, {0x8DDA5202, 0x8DDA5202}, - {0x8D3DCB09, 0}, {0x8CA29C04, 0x8CA29C04}, {0x8C08C08C, 0x8C08C08C}, - {0x8B70344A, 0x8B70344A}, {0x8AD8F2FC, 0}, {0x8A42F870, 0x8A42F870}, - {0x89AE408A, 0}, {0x891AC73B, 0}, {0x88888889, 0}, - {0x87F78088, 0}, {0x8767AB5F, 0x8767AB5F}, {0x86D90545, 0}, - {0x864B8A7E, 0}, {0x85BF3761, 0x85BF3761}, {0x85340853, 0x85340853}, - {0x84A9F9C8, 0x84A9F9C8}, {0x84210842, 0x84210842}, {0x83993052, 0x83993052}, - {0x83126E98, 0}, {0x828CBFBF, 0}, {0x82082082, 0x82082082}, - {0x81848DA9, 0}, {0x81020408, 0x81020408}, {0x80808081, 0}, - {0xFFFFFFFF, 0xFFFFFFFF}, {0xFF00FF01, 0}, {0xFE03F810, 0}, - {0xFD08E551, 0}, {0xFC0FC0FD, 0}, {0xFB188566, 0}, - {0xFA232CF3, 0}, {0xF92FB222, 0}, {0xF83E0F84, 0}, - {0xF74E3FC3, 0}, {0xF6603D99, 0}, {0xF57403D6, 0}, - {0xF4898D60, 0}, {0xF3A0D52D, 0}, {0xF2B9D649, 0}, - {0xF1D48BCF, 0}, {0xF0F0F0F1, 0}, {0xF00F00F0, 0xF00F00F0}, - {0xEF2EB720, 0}, {0xEE500EE5, 0xEE500EE5}, {0xED7303B6, 0}, - {0xEC979119, 0}, {0xEBBDB2A6, 0}, {0xEAE56404, 0}, - {0xEA0EA0EA, 0xEA0EA0EA}, {0xE9396520, 0}, {0xE865AC7C, 0}, - {0xE79372E3, 0}, {0xE6C2B449, 0}, {0xE5F36CB0, 0xE5F36CB0}, - {0xE525982B, 0}, {0xE45932D8, 0}, {0xE38E38E4, 0}, - {0xE2C4A689, 0}, {0xE1FC780F, 0}, {0xE135A9CA, 0}, - {0xE070381C, 0xE070381C}, {0xDFAC1F75, 0}, {0xDEE95C4D, 0}, - {0xDE27EB2D, 0}, {0xDD67C8A6, 0xDD67C8A6}, {0xDCA8F159, 0}, - {0xDBEB61EF, 0}, {0xDB2F171E, 0}, {0xDA740DA8, 0}, - {0xD9BA4257, 0}, {0xD901B204, 0}, {0xD84A598F, 0}, - {0xD79435E5, 0xD79435E5}, {0xD6DF43FD, 0}, {0xD62B80D7, 0}, - {0xD578E97D, 0}, {0xD4C77B04, 0}, {0xD417328A, 0}, - {0xD3680D37, 0}, {0xD2BA083C, 0}, {0xD20D20D2, 0xD20D20D2}, - {0xD161543E, 0xD161543E}, {0xD0B69FCC, 0}, {0xD00D00D0, 0xD00D00D0}, - {0xCF6474A9, 0}, {0xCEBCF8BC, 0}, {0xCE168A77, 0xCE168A77}, - {0xCD712753, 0}, {0xCCCCCCCD, 0}, {0xCC29786D, 0}, - {0xCB8727C1, 0}, {0xCAE5D85F, 0xCAE5D85F}, {0xCA4587E7, 0}, - {0xC9A633FD, 0}, {0xC907DA4F, 0}, {0xC86A7890, 0xC86A7890}, - {0xC7CE0C7D, 0}, {0xC73293D8, 0}, {0xC6980C6A, 0}, - {0xC5FE7403, 0xC5FE7403}, {0xC565C87C, 0}, {0xC4CE07B0, 0xC4CE07B0}, - {0xC4372F86, 0}, {0xC3A13DE6, 0xC3A13DE6}, {0xC30C30C3, 0xC30C30C3}, - {0xC2780614, 0}, {0xC1E4BBD6, 0}, {0xC152500C, 0xC152500C}, - {0xC0C0C0C1, 0}, {0xC0300C03, 0xC0300C03}, {0xBFA02FE8, 0xBFA02FE8}, - {0xBF112A8B, 0}, {0xBE82FA0C, 0}, {0xBDF59C92, 0}, - {0xBD691047, 0xBD691047}, {0xBCDD535E, 0}, {0xBC52640C, 0}, - {0xBBC8408D, 0}, {0xBB3EE722, 0}, {0xBAB65610, 0xBAB65610}, - {0xBA2E8BA3, 0}, {0xB9A7862A, 0xB9A7862A}, {0xB92143FA, 0xB92143FA}, - {0xB89BC36D, 0}, {0xB81702E1, 0}, {0xB79300B8, 0}, - {0xB70FBB5A, 0xB70FBB5A}, {0xB68D3134, 0xB68D3134}, {0xB60B60B6, 0xB60B60B6}, - {0xB58A4855, 0xB58A4855}, {0xB509E68B, 0}, {0xB48A39D4, 0xB48A39D4}, - {0xB40B40B4, 0xB40B40B4}, {0xB38CF9B0, 0xB38CF9B0}, {0xB30F6353, 0}, - {0xB2927C2A, 0}, {0xB21642C9, 0}, {0xB19AB5C5, 0}, - {0xB11FD3B8, 0xB11FD3B8}, {0xB0A59B42, 0}, {0xB02C0B03, 0}, - {0xAFB321A1, 0xAFB321A1}, {0xAF3ADDC7, 0}, {0xAEC33E20, 0}, - {0xAE4C415D, 0}, {0xADD5E632, 0xADD5E632}, {0xAD602B58, 0xAD602B58}, - {0xACEB0F89, 0xACEB0F89}, {0xAC769184, 0xAC769184}, {0xAC02B00B, 0}, - {0xAB8F69E3, 0}, {0xAB1CBDD4, 0}, {0xAAAAAAAB, 0}, - {0xAA392F36, 0}, {0xA9C84A48, 0}, {0xA957FAB5, 0xA957FAB5}, - {0xA8E83F57, 0xA8E83F57}, {0xA8791709, 0}, {0xA80A80A8, 0xA80A80A8}, - {0xA79C7B17, 0}, {0xA72F053A, 0}, {0xA6C21DF7, 0}, - {0xA655C439, 0xA655C439}, {0xA5E9F6ED, 0xA5E9F6ED}, {0xA57EB503, 0}, - {0xA513FD6C, 0}, {0xA4A9CF1E, 0}, {0xA4402910, 0xA4402910}, - {0xA3D70A3E, 0}, {0xA36E71A3, 0}, {0xA3065E40, 0}, - {0xA29ECF16, 0xA29ECF16}, {0xA237C32B, 0xA237C32B}, {0xA1D13986, 0}, - {0xA16B312F, 0}, {0xA105A933, 0}, {0xA0A0A0A1, 0}, - {0xA03C1689, 0}, {0x9FD809FE, 0}, {0x9F747A15, 0x9F747A15}, - {0x9F1165E7, 0x9F1165E7}, {0x9EAECC8D, 0x9EAECC8D}, {0x9E4CAD24, 0}, - {0x9DEB06C9, 0x9DEB06C9}, {0x9D89D89E, 0}, {0x9D2921C4, 0}, - {0x9CC8E161, 0}, {0x9C69169B, 0x9C69169B}, {0x9C09C09C, 0x9C09C09C}, - {0x9BAADE8E, 0x9BAADE8E}, {0x9B4C6F9F, 0}, {0x9AEE72FD, 0}, - {0x9A90E7D9, 0x9A90E7D9}, {0x9A33CD67, 0x9A33CD67}, {0x99D722DB, 0}, - {0x997AE76B, 0x997AE76B}, {0x991F1A51, 0x991F1A51}, {0x98C3BAC7, 0x98C3BAC7}, - {0x9868C80A, 0}, {0x980E4156, 0x980E4156}, {0x97B425ED, 0x97B425ED}, - {0x975A7510, 0}, {0x97012E02, 0x97012E02}, {0x96A8500A, 0}, - {0x964FDA6C, 0x964FDA6C}, {0x95F7CC73, 0}, {0x95A02568, 0x95A02568}, - {0x9548E498, 0}, {0x94F2094F, 0x94F2094F}, {0x949B92DE, 0}, - {0x94458094, 0x94458094}, {0x93EFD1C5, 0x93EFD1C5}, {0x939A85C4, 0x939A85C4}, - {0x93459BE7, 0}, {0x92F11384, 0x92F11384}, {0x929CEBF5, 0}, - {0x92492492, 0x92492492}, {0x91F5BCB9, 0}, {0x91A2B3C5, 0}, - {0x91500915, 0x91500915}, {0x90FDBC09, 0x90FDBC09}, {0x90ABCC02, 0x90ABCC02}, - {0x905A3863, 0x905A3863}, {0x90090090, 0x90090090}, {0x8FB823EE, 0x8FB823EE}, - {0x8F67A1E4, 0}, {0x8F1779DA, 0}, {0x8EC7AB3A, 0}, - {0x8E78356D, 0x8E78356D}, {0x8E2917E1, 0}, {0x8DDA5202, 0x8DDA5202}, - {0x8D8BE340, 0}, {0x8D3DCB09, 0}, {0x8CF008CF, 0x8CF008CF}, - {0x8CA29C04, 0x8CA29C04}, {0x8C55841D, 0}, {0x8C08C08C, 0x8C08C08C}, - {0x8BBC50C9, 0}, {0x8B70344A, 0x8B70344A}, {0x8B246A88, 0}, - {0x8AD8F2FC, 0}, {0x8A8DCD20, 0}, {0x8A42F870, 0x8A42F870}, - {0x89F8746A, 0}, {0x89AE408A, 0}, {0x89645C4F, 0x89645C4F}, - {0x891AC73B, 0}, {0x88D180CD, 0x88D180CD}, {0x88888889, 0}, - {0x883FDDF0, 0x883FDDF0}, {0x87F78088, 0}, {0x87AF6FD6, 0}, - {0x8767AB5F, 0x8767AB5F}, {0x872032AC, 0x872032AC}, {0x86D90545, 0}, - {0x869222B2, 0}, {0x864B8A7E, 0}, {0x86053C34, 0x86053C34}, - {0x85BF3761, 0x85BF3761}, {0x85797B91, 0x85797B91}, {0x85340853, 0x85340853}, - {0x84EEDD36, 0}, {0x84A9F9C8, 0x84A9F9C8}, {0x84655D9C, 0}, - {0x84210842, 0x84210842}, {0x83DCF94E, 0}, {0x83993052, 0x83993052}, - {0x8355ACE4, 0}, {0x83126E98, 0}, {0x82CF7504, 0}, - {0x828CBFBF, 0}, {0x824A4E61, 0}, {0x82082082, 0x82082082}, - {0x81C635BC, 0x81C635BC}, {0x81848DA9, 0}, {0x814327E4, 0}, - {0x81020408, 0x81020408}, {0x80C121B3, 0}, {0x80808081, 0}, - {0x80402010, 0x80402010}, {0xFFFFFFFF, 0xFFFFFFFF}, {0xFF803FE1, 0}, - {0xFF00FF01, 0}, {0xFE823CA6, 0}, {0xFE03F810, 0}, - {0xFD863087, 0}, {0xFD08E551, 0}, {0xFC8C15B5, 0}, - {0xFC0FC0FD, 0}, {0xFB93E673, 0}, {0xFB188566, 0}, - {0xFA9D9D20, 0}, {0xFA232CF3, 0}, {0xF9A9342D, 0}, - {0xF92FB222, 0}, {0xF8B6A622, 0xF8B6A622}, {0xF83E0F84, 0}, - {0xF7C5ED9D, 0}, {0xF74E3FC3, 0}, {0xF6D7054E, 0}, - {0xF6603D99, 0}, {0xF5E9E7FD, 0}, {0xF57403D6, 0}, - {0xF4FE9083, 0}, {0xF4898D60, 0}, {0xF414F9CE, 0}, - {0xF3A0D52D, 0}, {0xF32D1EE0, 0}, {0xF2B9D649, 0}, - {0xF246FACC, 0}, {0xF1D48BCF, 0}, {0xF16288B9, 0}, - {0xF0F0F0F1, 0}, {0xF07FC3E0, 0xF07FC3E0}, {0xF00F00F0, 0xF00F00F0}, - {0xEF9EA78C, 0}, {0xEF2EB720, 0}, {0xEEBF2F19, 0}, - {0xEE500EE5, 0xEE500EE5}, {0xEDE155F4, 0}, {0xED7303B6, 0}, - {0xED05179C, 0xED05179C}, {0xEC979119, 0}, {0xEC2A6FA0, 0xEC2A6FA0}, - {0xEBBDB2A6, 0}, {0xEB5159A0, 0}, {0xEAE56404, 0}, - {0xEA79D14A, 0}, {0xEA0EA0EA, 0xEA0EA0EA}, {0xE9A3D25E, 0xE9A3D25E}, - {0xE9396520, 0}, {0xE8CF58AB, 0}, {0xE865AC7C, 0}, - {0xE7FC600F, 0}, {0xE79372E3, 0}, {0xE72AE476, 0}, - {0xE6C2B449, 0}, {0xE65AE1DC, 0}, {0xE5F36CB0, 0xE5F36CB0}, - {0xE58C544A, 0}, {0xE525982B, 0}, {0xE4BF37D9, 0}, - {0xE45932D8, 0}, {0xE3F388AF, 0}, {0xE38E38E4, 0}, - {0xE32942FF, 0}, {0xE2C4A689, 0}, {0xE260630B, 0}, - {0xE1FC780F, 0}, {0xE198E520, 0}, {0xE135A9CA, 0}, - {0xE0D2C59A, 0}, {0xE070381C, 0xE070381C}, {0xE00E00E0, 0xE00E00E0}, - {0xDFAC1F75, 0}, {0xDF4A9369, 0}, {0xDEE95C4D, 0}, - {0xDE8879B3, 0}, {0xDE27EB2D, 0}, {0xDDC7B04D, 0}, - {0xDD67C8A6, 0xDD67C8A6}, {0xDD0833CE, 0}, {0xDCA8F159, 0}, - {0xDC4A00DD, 0}, {0xDBEB61EF, 0}, {0xDB8D1428, 0}, - {0xDB2F171E, 0}, {0xDAD16A6B, 0}, {0xDA740DA8, 0}, - {0xDA17006D, 0xDA17006D}, {0xD9BA4257, 0}, {0xD95DD300, 0}, - {0xD901B204, 0}, {0xD8A5DEFF, 0}, {0xD84A598F, 0}, - {0xD7EF2152, 0}, {0xD79435E5, 0xD79435E5}, {0xD73996E9, 0}, - {0xD6DF43FD, 0}, {0xD6853CC1, 0}, {0xD62B80D7, 0}, - {0xD5D20FDF, 0}, {0xD578E97D, 0}, {0xD5200D52, 0xD5200D52}, - {0xD4C77B04, 0}, {0xD46F3235, 0}, {0xD417328A, 0}, - {0xD3BF7BA9, 0}, {0xD3680D37, 0}, {0xD310E6DB, 0}, - {0xD2BA083C, 0}, {0xD2637101, 0}, {0xD20D20D2, 0xD20D20D2}, - {0xD1B71759, 0}, {0xD161543E, 0xD161543E}, {0xD10BD72C, 0}, - {0xD0B69FCC, 0}, {0xD061ADCA, 0}, {0xD00D00D0, 0xD00D00D0}, - {0xCFB8988C, 0}, {0xCF6474A9, 0}, {0xCF1094D4, 0}, - {0xCEBCF8BC, 0}, {0xCE69A00D, 0}, {0xCE168A77, 0xCE168A77}, - {0xCDC3B7A9, 0xCDC3B7A9}, {0xCD712753, 0}, {0xCD1ED924, 0}, - {0xCCCCCCCD, 0}, {0xCC7B0200, 0}, {0xCC29786D, 0}, - {0xCBD82FC7, 0}, {0xCB8727C1, 0}, {0xCB36600D, 0}, - {0xCAE5D85F, 0xCAE5D85F}, {0xCA95906C, 0}, {0xCA4587E7, 0}, - {0xC9F5BE86, 0}, {0xC9A633FD, 0}, {0xC956E803, 0xC956E803}, - {0xC907DA4F, 0}, {0xC8B90A96, 0}, {0xC86A7890, 0xC86A7890}, - {0xC81C23F5, 0xC81C23F5}, {0xC7CE0C7D, 0}, {0xC78031E0, 0xC78031E0}, - {0xC73293D8, 0}, {0xC6E5321D, 0}, {0xC6980C6A, 0}, - {0xC64B2278, 0xC64B2278}, {0xC5FE7403, 0xC5FE7403}, {0xC5B200C6, 0}, - {0xC565C87C, 0}, {0xC519CAE0, 0xC519CAE0}, {0xC4CE07B0, 0xC4CE07B0}, - {0xC4827EA8, 0xC4827EA8}, {0xC4372F86, 0}, {0xC3EC1A06, 0}, - {0xC3A13DE6, 0xC3A13DE6}, {0xC3569AE6, 0}, {0xC30C30C3, 0xC30C30C3}, - {0xC2C1FF3E, 0}, {0xC2780614, 0}, {0xC22E4507, 0}, - {0xC1E4BBD6, 0}, {0xC19B6A42, 0}, {0xC152500C, 0xC152500C}, - {0xC1096CF6, 0}, {0xC0C0C0C1, 0}, {0xC0784B2F, 0}, - {0xC0300C03, 0xC0300C03}, {0xBFE80300, 0}, {0xBFA02FE8, 0xBFA02FE8}, - {0xBF589280, 0}, {0xBF112A8B, 0}, {0xBEC9F7CE, 0}, - {0xBE82FA0C, 0}, {0xBE3C310C, 0}, {0xBDF59C92, 0}, - {0xBDAF3C64, 0}, {0xBD691047, 0xBD691047}, {0xBD231803, 0}, - {0xBCDD535E, 0}, {0xBC97C21E, 0xBC97C21E}, {0xBC52640C, 0}, - {0xBC0D38EE, 0xBC0D38EE}, {0xBBC8408D, 0}, {0xBB837AB1, 0}, - {0xBB3EE722, 0}, {0xBAFA85A9, 0xBAFA85A9}, {0xBAB65610, 0xBAB65610}, - {0xBA725820, 0xBA725820}, {0xBA2E8BA3, 0}, {0xB9EAF063, 0}, - {0xB9A7862A, 0xB9A7862A}, {0xB9644CC4, 0}, {0xB92143FA, 0xB92143FA}, - {0xB8DE6B9A, 0}, {0xB89BC36D, 0}, {0xB8594B41, 0}, - {0xB81702E1, 0}, {0xB7D4EA19, 0xB7D4EA19}, {0xB79300B8, 0}, - {0xB7514689, 0}, {0xB70FBB5A, 0xB70FBB5A}, {0xB6CE5EF9, 0xB6CE5EF9}, - {0xB68D3134, 0xB68D3134}, {0xB64C31D9, 0}, {0xB60B60B6, 0xB60B60B6}, - {0xB5CABD9B, 0}, {0xB58A4855, 0xB58A4855}, {0xB54A00B5, 0xB54A00B5}, - {0xB509E68B, 0}, {0xB4C9F9A5, 0}, {0xB48A39D4, 0xB48A39D4}, - {0xB44AA6E9, 0xB44AA6E9}, {0xB40B40B4, 0xB40B40B4}, {0xB3CC0706, 0}, - {0xB38CF9B0, 0xB38CF9B0}, {0xB34E1884, 0}, {0xB30F6353, 0}, - {0xB2D0D9EF, 0}, {0xB2927C2A, 0}, {0xB25449D7, 0}, - {0xB21642C9, 0}, {0xB1D866D1, 0xB1D866D1}, {0xB19AB5C5, 0}, - {0xB15D2F76, 0}, {0xB11FD3B8, 0xB11FD3B8}, {0xB0E2A260, 0xB0E2A260}, - {0xB0A59B42, 0}, {0xB068BE31, 0}, {0xB02C0B03, 0}, - {0xAFEF818C, 0}, {0xAFB321A1, 0xAFB321A1}, {0xAF76EB19, 0}, - {0xAF3ADDC7, 0}, {0xAEFEF982, 0}, {0xAEC33E20, 0}, - {0xAE87AB76, 0xAE87AB76}, {0xAE4C415D, 0}, {0xAE10FFA9, 0}, - {0xADD5E632, 0xADD5E632}, {0xAD9AF4D0, 0}, {0xAD602B58, 0xAD602B58}, - {0xAD2589A4, 0}, {0xACEB0F89, 0xACEB0F89}, {0xACB0BCE1, 0xACB0BCE1}, - {0xAC769184, 0xAC769184}, {0xAC3C8D4A, 0}, {0xAC02B00B, 0}, - {0xABC8F9A0, 0xABC8F9A0}, {0xAB8F69E3, 0}, {0xAB5600AC, 0}, - {0xAB1CBDD4, 0}, {0xAAE3A136, 0}, {0xAAAAAAAB, 0}, - {0xAA71DA0D, 0}, {0xAA392F36, 0}, {0xAA00AA01, 0}, - {0xA9C84A48, 0}, {0xA9900FE6, 0}, {0xA957FAB5, 0xA957FAB5}, - {0xA9200A92, 0xA9200A92}, {0xA8E83F57, 0xA8E83F57}, {0xA8B098E0, 0xA8B098E0}, - {0xA8791709, 0}, {0xA841B9AD, 0}, {0xA80A80A8, 0xA80A80A8}, - {0xA7D36BD8, 0}, {0xA79C7B17, 0}, {0xA765AE44, 0}, - {0xA72F053A, 0}, {0xA6F87FD6, 0xA6F87FD6}, {0xA6C21DF7, 0}, - {0xA68BDF79, 0}, {0xA655C439, 0xA655C439}, {0xA61FCC16, 0xA61FCC16}, - {0xA5E9F6ED, 0xA5E9F6ED}, {0xA5B4449D, 0}, {0xA57EB503, 0}, - {0xA54947FE, 0}, {0xA513FD6C, 0}, {0xA4DED52C, 0xA4DED52C}, - {0xA4A9CF1E, 0}, {0xA474EB1F, 0xA474EB1F}, {0xA4402910, 0xA4402910}, - {0xA40B88D0, 0}, {0xA3D70A3E, 0}, {0xA3A2AD39, 0xA3A2AD39}, - {0xA36E71A3, 0}, {0xA33A575A, 0xA33A575A}, {0xA3065E40, 0}, - {0xA2D28634, 0}, {0xA29ECF16, 0xA29ECF16}, {0xA26B38C9, 0}, - {0xA237C32B, 0xA237C32B}, {0xA2046E1F, 0xA2046E1F}, {0xA1D13986, 0}, - {0xA19E2540, 0}, {0xA16B312F, 0}, {0xA1385D35, 0}, - {0xA105A933, 0}, {0xA0D3150C, 0}, {0xA0A0A0A1, 0}, - {0xA06E4BD4, 0xA06E4BD4}, {0xA03C1689, 0}, {0xA00A00A0, 0xA00A00A0}, - {0x9FD809FE, 0}, {0x9FA63284, 0}, {0x9F747A15, 0x9F747A15}, - {0x9F42E095, 0x9F42E095}, {0x9F1165E7, 0x9F1165E7}, {0x9EE009EE, 0x9EE009EE}, - {0x9EAECC8D, 0x9EAECC8D}, {0x9E7DADA9, 0}, {0x9E4CAD24, 0}, - {0x9E1BCAE3, 0}, {0x9DEB06C9, 0x9DEB06C9}, {0x9DBA60BB, 0x9DBA60BB}, - {0x9D89D89E, 0}, {0x9D596E54, 0x9D596E54}, {0x9D2921C4, 0}, - {0x9CF8F2D1, 0x9CF8F2D1}, {0x9CC8E161, 0}, {0x9C98ED58, 0}, - {0x9C69169B, 0x9C69169B}, {0x9C395D10, 0x9C395D10}, {0x9C09C09C, 0x9C09C09C}, - {0x9BDA4124, 0x9BDA4124}, {0x9BAADE8E, 0x9BAADE8E}, {0x9B7B98C0, 0}, - {0x9B4C6F9F, 0}, {0x9B1D6311, 0x9B1D6311}, {0x9AEE72FD, 0}, - {0x9ABF9F48, 0x9ABF9F48}, {0x9A90E7D9, 0x9A90E7D9}, {0x9A624C97, 0}, - {0x9A33CD67, 0x9A33CD67}, {0x9A056A31, 0}, {0x99D722DB, 0}, - {0x99A8F74C, 0}, {0x997AE76B, 0x997AE76B}, {0x994CF320, 0x994CF320}, - {0x991F1A51, 0x991F1A51}, {0x98F15CE7, 0}, {0x98C3BAC7, 0x98C3BAC7}, - {0x989633DB, 0x989633DB}, {0x9868C80A, 0}, {0x983B773B, 0}, - {0x980E4156, 0x980E4156}, {0x97E12644, 0x97E12644}, {0x97B425ED, 0x97B425ED}, - {0x97874039, 0}, {0x975A7510, 0}, {0x972DC45B, 0}, - {0x97012E02, 0x97012E02}, {0x96D4B1EF, 0}, {0x96A8500A, 0}, - {0x967C083B, 0}, {0x964FDA6C, 0x964FDA6C}, {0x9623C686, 0x9623C686}, - {0x95F7CC73, 0}, {0x95CBEC1B, 0}, {0x95A02568, 0x95A02568}, - {0x95747844, 0}, {0x9548E498, 0}, {0x951D6A4E, 0}, - {0x94F2094F, 0x94F2094F}, {0x94C6C187, 0}, {0x949B92DE, 0}, - {0x94707D3F, 0}, {0x94458094, 0x94458094}, {0x941A9CC8, 0x941A9CC8}, - {0x93EFD1C5, 0x93EFD1C5}, {0x93C51F76, 0}, {0x939A85C4, 0x939A85C4}, - {0x9370049C, 0}, {0x93459BE7, 0}, {0x931B4B91, 0}, - {0x92F11384, 0x92F11384}, {0x92C6F3AC, 0x92C6F3AC}, {0x929CEBF5, 0}, - {0x9272FC48, 0x9272FC48}, {0x92492492, 0x92492492}, {0x921F64BF, 0}, - {0x91F5BCB9, 0}, {0x91CC2C6C, 0x91CC2C6C}, {0x91A2B3C5, 0}, - {0x917952AF, 0}, {0x91500915, 0x91500915}, {0x9126D6E5, 0}, - {0x90FDBC09, 0x90FDBC09}, {0x90D4B86F, 0}, {0x90ABCC02, 0x90ABCC02}, - {0x9082F6B0, 0}, {0x905A3863, 0x905A3863}, {0x9031910A, 0}, - {0x90090090, 0x90090090}, {0x8FE086E3, 0}, {0x8FB823EE, 0x8FB823EE}, - {0x8F8FD7A0, 0}, {0x8F67A1E4, 0}, {0x8F3F82A8, 0x8F3F82A8}, - {0x8F1779DA, 0}, {0x8EEF8766, 0}, {0x8EC7AB3A, 0}, - {0x8E9FE542, 0x8E9FE542}, {0x8E78356D, 0x8E78356D}, {0x8E509BA8, 0x8E509BA8}, - {0x8E2917E1, 0}, {0x8E01AA05, 0}, {0x8DDA5202, 0x8DDA5202}, - {0x8DB30FC6, 0x8DB30FC6}, {0x8D8BE340, 0}, {0x8D64CC5C, 0}, - {0x8D3DCB09, 0}, {0x8D16DF35, 0x8D16DF35}, {0x8CF008CF, 0x8CF008CF}, - {0x8CC947C5, 0}, {0x8CA29C04, 0x8CA29C04}, {0x8C7C057D, 0}, - {0x8C55841D, 0}, {0x8C2F17D2, 0x8C2F17D2}, {0x8C08C08C, 0x8C08C08C}, - {0x8BE27E39, 0x8BE27E39}, {0x8BBC50C9, 0}, {0x8B963829, 0x8B963829}, - {0x8B70344A, 0x8B70344A}, {0x8B4A451A, 0}, {0x8B246A88, 0}, - {0x8AFEA483, 0x8AFEA483}, {0x8AD8F2FC, 0}, {0x8AB355E0, 0x8AB355E0}, - {0x8A8DCD20, 0}, {0x8A6858AB, 0}, {0x8A42F870, 0x8A42F870}, - {0x8A1DAC60, 0x8A1DAC60}, {0x89F8746A, 0}, {0x89D3507D, 0}, - {0x89AE408A, 0}, {0x89894480, 0}, {0x89645C4F, 0x89645C4F}, - {0x893F87E8, 0x893F87E8}, {0x891AC73B, 0}, {0x88F61A37, 0x88F61A37}, - {0x88D180CD, 0x88D180CD}, {0x88ACFAEE, 0}, {0x88888889, 0}, - {0x8864298F, 0}, {0x883FDDF0, 0x883FDDF0}, {0x881BA59E, 0}, - {0x87F78088, 0}, {0x87D36EA0, 0}, {0x87AF6FD6, 0}, - {0x878B841B, 0}, {0x8767AB5F, 0x8767AB5F}, {0x8743E595, 0}, - {0x872032AC, 0x872032AC}, {0x86FC9296, 0x86FC9296}, {0x86D90545, 0}, - {0x86B58AA8, 0}, {0x869222B2, 0}, {0x866ECD53, 0x866ECD53}, - {0x864B8A7E, 0}, {0x86285A23, 0x86285A23}, {0x86053C34, 0x86053C34}, - {0x85E230A3, 0x85E230A3}, {0x85BF3761, 0x85BF3761}, {0x859C5060, 0x859C5060}, - {0x85797B91, 0x85797B91}, {0x8556B8E7, 0x8556B8E7}, {0x85340853, 0x85340853}, - {0x851169C7, 0x851169C7}, {0x84EEDD36, 0}, {0x84CC6290, 0}, - {0x84A9F9C8, 0x84A9F9C8}, {0x8487A2D1, 0}, {0x84655D9C, 0}, - {0x84432A1B, 0x84432A1B}, {0x84210842, 0x84210842}, {0x83FEF802, 0x83FEF802}, - {0x83DCF94E, 0}, {0x83BB0C18, 0}, {0x83993052, 0x83993052}, - {0x837765F0, 0x837765F0}, {0x8355ACE4, 0}, {0x83340520, 0x83340520}, - {0x83126E98, 0}, {0x82F0E93D, 0x82F0E93D}, {0x82CF7504, 0}, - {0x82AE11DE, 0}, {0x828CBFBF, 0}, {0x826B7E99, 0x826B7E99}, - {0x824A4E61, 0}, {0x82292F08, 0}, {0x82082082, 0x82082082}, - {0x81E722C2, 0x81E722C2}, {0x81C635BC, 0x81C635BC}, {0x81A55963, 0}, - {0x81848DA9, 0}, {0x8163D283, 0}, {0x814327E4, 0}, - {0x81228DBF, 0}, {0x81020408, 0x81020408}, {0x80E18AB3, 0}, - {0x80C121B3, 0}, {0x80A0C8FB, 0x80A0C8FB}, {0x80808081, 0}, - {0x80604836, 0x80604836}, {0x80402010, 0x80402010}, {0x80200802, 0x80200802}, - {0xFFFFFFFF, 0xFFFFFFFF} + { 0xFFFFFFFF, 0xFFFFFFFF }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xAAAAAAAB, 0 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xCCCCCCCD, 0 }, { 0xAAAAAAAB, 0 }, + { 0x92492492, 0x92492492 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xE38E38E4, 0 }, { 0xCCCCCCCD, 0 }, + { 0xBA2E8BA3, 0 }, { 0xAAAAAAAB, 0 }, + { 0x9D89D89E, 0 }, { 0x92492492, 0x92492492 }, + { 0x88888889, 0 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xF0F0F0F1, 0 }, { 0xE38E38E4, 0 }, + { 0xD79435E5, 0xD79435E5 }, { 0xCCCCCCCD, 0 }, + { 0xC30C30C3, 0xC30C30C3 }, { 0xBA2E8BA3, 0 }, + { 0xB21642C9, 0 }, { 0xAAAAAAAB, 0 }, + { 0xA3D70A3E, 0 }, { 0x9D89D89E, 0 }, + { 0x97B425ED, 0x97B425ED }, { 0x92492492, 0x92492492 }, + { 0x8D3DCB09, 0 }, { 0x88888889, 0 }, + { 0x84210842, 0x84210842 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xF83E0F84, 0 }, { 0xF0F0F0F1, 0 }, + { 0xEA0EA0EA, 0xEA0EA0EA }, { 0xE38E38E4, 0 }, + { 0xDD67C8A6, 0xDD67C8A6 }, { 0xD79435E5, 0xD79435E5 }, + { 0xD20D20D2, 0xD20D20D2 }, { 0xCCCCCCCD, 0 }, + { 0xC7CE0C7D, 0 }, { 0xC30C30C3, 0xC30C30C3 }, + { 0xBE82FA0C, 0 }, { 0xBA2E8BA3, 0 }, + { 0xB60B60B6, 0xB60B60B6 }, { 0xB21642C9, 0 }, + { 0xAE4C415D, 0 }, { 0xAAAAAAAB, 0 }, + { 0xA72F053A, 0 }, { 0xA3D70A3E, 0 }, + { 0xA0A0A0A1, 0 }, { 0x9D89D89E, 0 }, + { 0x9A90E7D9, 0x9A90E7D9 }, { 0x97B425ED, 0x97B425ED }, + { 0x94F2094F, 0x94F2094F }, { 0x92492492, 0x92492492 }, + { 0x8FB823EE, 0x8FB823EE }, { 0x8D3DCB09, 0 }, + { 0x8AD8F2FC, 0 }, { 0x88888889, 0 }, + { 0x864B8A7E, 0 }, { 0x84210842, 0x84210842 }, + { 0x82082082, 0x82082082 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xFC0FC0FD, 0 }, { 0xF83E0F84, 0 }, + { 0xF4898D60, 0 }, { 0xF0F0F0F1, 0 }, + { 0xED7303B6, 0 }, { 0xEA0EA0EA, 0xEA0EA0EA }, + { 0xE6C2B449, 0 }, { 0xE38E38E4, 0 }, + { 0xE070381C, 0xE070381C }, { 0xDD67C8A6, 0xDD67C8A6 }, + { 0xDA740DA8, 0 }, { 0xD79435E5, 0xD79435E5 }, + { 0xD4C77B04, 0 }, { 0xD20D20D2, 0xD20D20D2 }, + { 0xCF6474A9, 0 }, { 0xCCCCCCCD, 0 }, + { 0xCA4587E7, 0 }, { 0xC7CE0C7D, 0 }, + { 0xC565C87C, 0 }, { 0xC30C30C3, 0xC30C30C3 }, + { 0xC0C0C0C1, 0 }, { 0xBE82FA0C, 0 }, + { 0xBC52640C, 0 }, { 0xBA2E8BA3, 0 }, + { 0xB81702E1, 0 }, { 0xB60B60B6, 0xB60B60B6 }, + { 0xB40B40B4, 0xB40B40B4 }, { 0xB21642C9, 0 }, + { 0xB02C0B03, 0 }, { 0xAE4C415D, 0 }, + { 0xAC769184, 0xAC769184 }, { 0xAAAAAAAB, 0 }, + { 0xA8E83F57, 0xA8E83F57 }, { 0xA72F053A, 0 }, + { 0xA57EB503, 0 }, { 0xA3D70A3E, 0 }, + { 0xA237C32B, 0xA237C32B }, { 0xA0A0A0A1, 0 }, + { 0x9F1165E7, 0x9F1165E7 }, { 0x9D89D89E, 0 }, + { 0x9C09C09C, 0x9C09C09C }, { 0x9A90E7D9, 0x9A90E7D9 }, + { 0x991F1A51, 0x991F1A51 }, { 0x97B425ED, 0x97B425ED }, + { 0x964FDA6C, 0x964FDA6C }, { 0x94F2094F, 0x94F2094F }, + { 0x939A85C4, 0x939A85C4 }, { 0x92492492, 0x92492492 }, + { 0x90FDBC09, 0x90FDBC09 }, { 0x8FB823EE, 0x8FB823EE }, + { 0x8E78356D, 0x8E78356D }, { 0x8D3DCB09, 0 }, + { 0x8C08C08C, 0x8C08C08C }, { 0x8AD8F2FC, 0 }, + { 0x89AE408A, 0 }, { 0x88888889, 0 }, + { 0x8767AB5F, 0x8767AB5F }, { 0x864B8A7E, 0 }, + { 0x85340853, 0x85340853 }, { 0x84210842, 0x84210842 }, + { 0x83126E98, 0 }, { 0x82082082, 0x82082082 }, + { 0x81020408, 0x81020408 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xFE03F810, 0 }, { 0xFC0FC0FD, 0 }, + { 0xFA232CF3, 0 }, { 0xF83E0F84, 0 }, + { 0xF6603D99, 0 }, { 0xF4898D60, 0 }, + { 0xF2B9D649, 0 }, { 0xF0F0F0F1, 0 }, + { 0xEF2EB720, 0 }, { 0xED7303B6, 0 }, + { 0xEBBDB2A6, 0 }, { 0xEA0EA0EA, 0xEA0EA0EA }, + { 0xE865AC7C, 0 }, { 0xE6C2B449, 0 }, + { 0xE525982B, 0 }, { 0xE38E38E4, 0 }, + { 0xE1FC780F, 0 }, { 0xE070381C, 0xE070381C }, + { 0xDEE95C4D, 0 }, { 0xDD67C8A6, 0xDD67C8A6 }, + { 0xDBEB61EF, 0 }, { 0xDA740DA8, 0 }, + { 0xD901B204, 0 }, { 0xD79435E5, 0xD79435E5 }, + { 0xD62B80D7, 0 }, { 0xD4C77B04, 0 }, + { 0xD3680D37, 0 }, { 0xD20D20D2, 0xD20D20D2 }, + { 0xD0B69FCC, 0 }, { 0xCF6474A9, 0 }, + { 0xCE168A77, 0xCE168A77 }, { 0xCCCCCCCD, 0 }, + { 0xCB8727C1, 0 }, { 0xCA4587E7, 0 }, + { 0xC907DA4F, 0 }, { 0xC7CE0C7D, 0 }, + { 0xC6980C6A, 0 }, { 0xC565C87C, 0 }, + { 0xC4372F86, 0 }, { 0xC30C30C3, 0xC30C30C3 }, + { 0xC1E4BBD6, 0 }, { 0xC0C0C0C1, 0 }, + { 0xBFA02FE8, 0xBFA02FE8 }, { 0xBE82FA0C, 0 }, + { 0xBD691047, 0xBD691047 }, { 0xBC52640C, 0 }, + { 0xBB3EE722, 0 }, { 0xBA2E8BA3, 0 }, + { 0xB92143FA, 0xB92143FA }, { 0xB81702E1, 0 }, + { 0xB70FBB5A, 0xB70FBB5A }, { 0xB60B60B6, 0xB60B60B6 }, + { 0xB509E68B, 0 }, { 0xB40B40B4, 0xB40B40B4 }, + { 0xB30F6353, 0 }, { 0xB21642C9, 0 }, + { 0xB11FD3B8, 0xB11FD3B8 }, { 0xB02C0B03, 0 }, + { 0xAF3ADDC7, 0 }, { 0xAE4C415D, 0 }, + { 0xAD602B58, 0xAD602B58 }, { 0xAC769184, 0xAC769184 }, + { 0xAB8F69E3, 0 }, { 0xAAAAAAAB, 0 }, + { 0xA9C84A48, 0 }, { 0xA8E83F57, 0xA8E83F57 }, + { 0xA80A80A8, 0xA80A80A8 }, { 0xA72F053A, 0 }, + { 0xA655C439, 0xA655C439 }, { 0xA57EB503, 0 }, + { 0xA4A9CF1E, 0 }, { 0xA3D70A3E, 0 }, + { 0xA3065E40, 0 }, { 0xA237C32B, 0xA237C32B }, + { 0xA16B312F, 0 }, { 0xA0A0A0A1, 0 }, + { 0x9FD809FE, 0 }, { 0x9F1165E7, 0x9F1165E7 }, + { 0x9E4CAD24, 0 }, { 0x9D89D89E, 0 }, + { 0x9CC8E161, 0 }, { 0x9C09C09C, 0x9C09C09C }, + { 0x9B4C6F9F, 0 }, { 0x9A90E7D9, 0x9A90E7D9 }, + { 0x99D722DB, 0 }, { 0x991F1A51, 0x991F1A51 }, + { 0x9868C80A, 0 }, { 0x97B425ED, 0x97B425ED }, + { 0x97012E02, 0x97012E02 }, { 0x964FDA6C, 0x964FDA6C }, + { 0x95A02568, 0x95A02568 }, { 0x94F2094F, 0x94F2094F }, + { 0x94458094, 0x94458094 }, { 0x939A85C4, 0x939A85C4 }, + { 0x92F11384, 0x92F11384 }, { 0x92492492, 0x92492492 }, + { 0x91A2B3C5, 0 }, { 0x90FDBC09, 0x90FDBC09 }, + { 0x905A3863, 0x905A3863 }, { 0x8FB823EE, 0x8FB823EE }, + { 0x8F1779DA, 0 }, { 0x8E78356D, 0x8E78356D }, + { 0x8DDA5202, 0x8DDA5202 }, { 0x8D3DCB09, 0 }, + { 0x8CA29C04, 0x8CA29C04 }, { 0x8C08C08C, 0x8C08C08C }, + { 0x8B70344A, 0x8B70344A }, { 0x8AD8F2FC, 0 }, + { 0x8A42F870, 0x8A42F870 }, { 0x89AE408A, 0 }, + { 0x891AC73B, 0 }, { 0x88888889, 0 }, + { 0x87F78088, 0 }, { 0x8767AB5F, 0x8767AB5F }, + { 0x86D90545, 0 }, { 0x864B8A7E, 0 }, + { 0x85BF3761, 0x85BF3761 }, { 0x85340853, 0x85340853 }, + { 0x84A9F9C8, 0x84A9F9C8 }, { 0x84210842, 0x84210842 }, + { 0x83993052, 0x83993052 }, { 0x83126E98, 0 }, + { 0x828CBFBF, 0 }, { 0x82082082, 0x82082082 }, + { 0x81848DA9, 0 }, { 0x81020408, 0x81020408 }, + { 0x80808081, 0 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xFF00FF01, 0 }, { 0xFE03F810, 0 }, + { 0xFD08E551, 0 }, { 0xFC0FC0FD, 0 }, + { 0xFB188566, 0 }, { 0xFA232CF3, 0 }, + { 0xF92FB222, 0 }, { 0xF83E0F84, 0 }, + { 0xF74E3FC3, 0 }, { 0xF6603D99, 0 }, + { 0xF57403D6, 0 }, { 0xF4898D60, 0 }, + { 0xF3A0D52D, 0 }, { 0xF2B9D649, 0 }, + { 0xF1D48BCF, 0 }, { 0xF0F0F0F1, 0 }, + { 0xF00F00F0, 0xF00F00F0 }, { 0xEF2EB720, 0 }, + { 0xEE500EE5, 0xEE500EE5 }, { 0xED7303B6, 0 }, + { 0xEC979119, 0 }, { 0xEBBDB2A6, 0 }, + { 0xEAE56404, 0 }, { 0xEA0EA0EA, 0xEA0EA0EA }, + { 0xE9396520, 0 }, { 0xE865AC7C, 0 }, + { 0xE79372E3, 0 }, { 0xE6C2B449, 0 }, + { 0xE5F36CB0, 0xE5F36CB0 }, { 0xE525982B, 0 }, + { 0xE45932D8, 0 }, { 0xE38E38E4, 0 }, + { 0xE2C4A689, 0 }, { 0xE1FC780F, 0 }, + { 0xE135A9CA, 0 }, { 0xE070381C, 0xE070381C }, + { 0xDFAC1F75, 0 }, { 0xDEE95C4D, 0 }, + { 0xDE27EB2D, 0 }, { 0xDD67C8A6, 0xDD67C8A6 }, + { 0xDCA8F159, 0 }, { 0xDBEB61EF, 0 }, + { 0xDB2F171E, 0 }, { 0xDA740DA8, 0 }, + { 0xD9BA4257, 0 }, { 0xD901B204, 0 }, + { 0xD84A598F, 0 }, { 0xD79435E5, 0xD79435E5 }, + { 0xD6DF43FD, 0 }, { 0xD62B80D7, 0 }, + { 0xD578E97D, 0 }, { 0xD4C77B04, 0 }, + { 0xD417328A, 0 }, { 0xD3680D37, 0 }, + { 0xD2BA083C, 0 }, { 0xD20D20D2, 0xD20D20D2 }, + { 0xD161543E, 0xD161543E }, { 0xD0B69FCC, 0 }, + { 0xD00D00D0, 0xD00D00D0 }, { 0xCF6474A9, 0 }, + { 0xCEBCF8BC, 0 }, { 0xCE168A77, 0xCE168A77 }, + { 0xCD712753, 0 }, { 0xCCCCCCCD, 0 }, + { 0xCC29786D, 0 }, { 0xCB8727C1, 0 }, + { 0xCAE5D85F, 0xCAE5D85F }, { 0xCA4587E7, 0 }, + { 0xC9A633FD, 0 }, { 0xC907DA4F, 0 }, + { 0xC86A7890, 0xC86A7890 }, { 0xC7CE0C7D, 0 }, + { 0xC73293D8, 0 }, { 0xC6980C6A, 0 }, + { 0xC5FE7403, 0xC5FE7403 }, { 0xC565C87C, 0 }, + { 0xC4CE07B0, 0xC4CE07B0 }, { 0xC4372F86, 0 }, + { 0xC3A13DE6, 0xC3A13DE6 }, { 0xC30C30C3, 0xC30C30C3 }, + { 0xC2780614, 0 }, { 0xC1E4BBD6, 0 }, + { 0xC152500C, 0xC152500C }, { 0xC0C0C0C1, 0 }, + { 0xC0300C03, 0xC0300C03 }, { 0xBFA02FE8, 0xBFA02FE8 }, + { 0xBF112A8B, 0 }, { 0xBE82FA0C, 0 }, + { 0xBDF59C92, 0 }, { 0xBD691047, 0xBD691047 }, + { 0xBCDD535E, 0 }, { 0xBC52640C, 0 }, + { 0xBBC8408D, 0 }, { 0xBB3EE722, 0 }, + { 0xBAB65610, 0xBAB65610 }, { 0xBA2E8BA3, 0 }, + { 0xB9A7862A, 0xB9A7862A }, { 0xB92143FA, 0xB92143FA }, + { 0xB89BC36D, 0 }, { 0xB81702E1, 0 }, + { 0xB79300B8, 0 }, { 0xB70FBB5A, 0xB70FBB5A }, + { 0xB68D3134, 0xB68D3134 }, { 0xB60B60B6, 0xB60B60B6 }, + { 0xB58A4855, 0xB58A4855 }, { 0xB509E68B, 0 }, + { 0xB48A39D4, 0xB48A39D4 }, { 0xB40B40B4, 0xB40B40B4 }, + { 0xB38CF9B0, 0xB38CF9B0 }, { 0xB30F6353, 0 }, + { 0xB2927C2A, 0 }, { 0xB21642C9, 0 }, + { 0xB19AB5C5, 0 }, { 0xB11FD3B8, 0xB11FD3B8 }, + { 0xB0A59B42, 0 }, { 0xB02C0B03, 0 }, + { 0xAFB321A1, 0xAFB321A1 }, { 0xAF3ADDC7, 0 }, + { 0xAEC33E20, 0 }, { 0xAE4C415D, 0 }, + { 0xADD5E632, 0xADD5E632 }, { 0xAD602B58, 0xAD602B58 }, + { 0xACEB0F89, 0xACEB0F89 }, { 0xAC769184, 0xAC769184 }, + { 0xAC02B00B, 0 }, { 0xAB8F69E3, 0 }, + { 0xAB1CBDD4, 0 }, { 0xAAAAAAAB, 0 }, + { 0xAA392F36, 0 }, { 0xA9C84A48, 0 }, + { 0xA957FAB5, 0xA957FAB5 }, { 0xA8E83F57, 0xA8E83F57 }, + { 0xA8791709, 0 }, { 0xA80A80A8, 0xA80A80A8 }, + { 0xA79C7B17, 0 }, { 0xA72F053A, 0 }, + { 0xA6C21DF7, 0 }, { 0xA655C439, 0xA655C439 }, + { 0xA5E9F6ED, 0xA5E9F6ED }, { 0xA57EB503, 0 }, + { 0xA513FD6C, 0 }, { 0xA4A9CF1E, 0 }, + { 0xA4402910, 0xA4402910 }, { 0xA3D70A3E, 0 }, + { 0xA36E71A3, 0 }, { 0xA3065E40, 0 }, + { 0xA29ECF16, 0xA29ECF16 }, { 0xA237C32B, 0xA237C32B }, + { 0xA1D13986, 0 }, { 0xA16B312F, 0 }, + { 0xA105A933, 0 }, { 0xA0A0A0A1, 0 }, + { 0xA03C1689, 0 }, { 0x9FD809FE, 0 }, + { 0x9F747A15, 0x9F747A15 }, { 0x9F1165E7, 0x9F1165E7 }, + { 0x9EAECC8D, 0x9EAECC8D }, { 0x9E4CAD24, 0 }, + { 0x9DEB06C9, 0x9DEB06C9 }, { 0x9D89D89E, 0 }, + { 0x9D2921C4, 0 }, { 0x9CC8E161, 0 }, + { 0x9C69169B, 0x9C69169B }, { 0x9C09C09C, 0x9C09C09C }, + { 0x9BAADE8E, 0x9BAADE8E }, { 0x9B4C6F9F, 0 }, + { 0x9AEE72FD, 0 }, { 0x9A90E7D9, 0x9A90E7D9 }, + { 0x9A33CD67, 0x9A33CD67 }, { 0x99D722DB, 0 }, + { 0x997AE76B, 0x997AE76B }, { 0x991F1A51, 0x991F1A51 }, + { 0x98C3BAC7, 0x98C3BAC7 }, { 0x9868C80A, 0 }, + { 0x980E4156, 0x980E4156 }, { 0x97B425ED, 0x97B425ED }, + { 0x975A7510, 0 }, { 0x97012E02, 0x97012E02 }, + { 0x96A8500A, 0 }, { 0x964FDA6C, 0x964FDA6C }, + { 0x95F7CC73, 0 }, { 0x95A02568, 0x95A02568 }, + { 0x9548E498, 0 }, { 0x94F2094F, 0x94F2094F }, + { 0x949B92DE, 0 }, { 0x94458094, 0x94458094 }, + { 0x93EFD1C5, 0x93EFD1C5 }, { 0x939A85C4, 0x939A85C4 }, + { 0x93459BE7, 0 }, { 0x92F11384, 0x92F11384 }, + { 0x929CEBF5, 0 }, { 0x92492492, 0x92492492 }, + { 0x91F5BCB9, 0 }, { 0x91A2B3C5, 0 }, + { 0x91500915, 0x91500915 }, { 0x90FDBC09, 0x90FDBC09 }, + { 0x90ABCC02, 0x90ABCC02 }, { 0x905A3863, 0x905A3863 }, + { 0x90090090, 0x90090090 }, { 0x8FB823EE, 0x8FB823EE }, + { 0x8F67A1E4, 0 }, { 0x8F1779DA, 0 }, + { 0x8EC7AB3A, 0 }, { 0x8E78356D, 0x8E78356D }, + { 0x8E2917E1, 0 }, { 0x8DDA5202, 0x8DDA5202 }, + { 0x8D8BE340, 0 }, { 0x8D3DCB09, 0 }, + { 0x8CF008CF, 0x8CF008CF }, { 0x8CA29C04, 0x8CA29C04 }, + { 0x8C55841D, 0 }, { 0x8C08C08C, 0x8C08C08C }, + { 0x8BBC50C9, 0 }, { 0x8B70344A, 0x8B70344A }, + { 0x8B246A88, 0 }, { 0x8AD8F2FC, 0 }, + { 0x8A8DCD20, 0 }, { 0x8A42F870, 0x8A42F870 }, + { 0x89F8746A, 0 }, { 0x89AE408A, 0 }, + { 0x89645C4F, 0x89645C4F }, { 0x891AC73B, 0 }, + { 0x88D180CD, 0x88D180CD }, { 0x88888889, 0 }, + { 0x883FDDF0, 0x883FDDF0 }, { 0x87F78088, 0 }, + { 0x87AF6FD6, 0 }, { 0x8767AB5F, 0x8767AB5F }, + { 0x872032AC, 0x872032AC }, { 0x86D90545, 0 }, + { 0x869222B2, 0 }, { 0x864B8A7E, 0 }, + { 0x86053C34, 0x86053C34 }, { 0x85BF3761, 0x85BF3761 }, + { 0x85797B91, 0x85797B91 }, { 0x85340853, 0x85340853 }, + { 0x84EEDD36, 0 }, { 0x84A9F9C8, 0x84A9F9C8 }, + { 0x84655D9C, 0 }, { 0x84210842, 0x84210842 }, + { 0x83DCF94E, 0 }, { 0x83993052, 0x83993052 }, + { 0x8355ACE4, 0 }, { 0x83126E98, 0 }, + { 0x82CF7504, 0 }, { 0x828CBFBF, 0 }, + { 0x824A4E61, 0 }, { 0x82082082, 0x82082082 }, + { 0x81C635BC, 0x81C635BC }, { 0x81848DA9, 0 }, + { 0x814327E4, 0 }, { 0x81020408, 0x81020408 }, + { 0x80C121B3, 0 }, { 0x80808081, 0 }, + { 0x80402010, 0x80402010 }, { 0xFFFFFFFF, 0xFFFFFFFF }, + { 0xFF803FE1, 0 }, { 0xFF00FF01, 0 }, + { 0xFE823CA6, 0 }, { 0xFE03F810, 0 }, + { 0xFD863087, 0 }, { 0xFD08E551, 0 }, + { 0xFC8C15B5, 0 }, { 0xFC0FC0FD, 0 }, + { 0xFB93E673, 0 }, { 0xFB188566, 0 }, + { 0xFA9D9D20, 0 }, { 0xFA232CF3, 0 }, + { 0xF9A9342D, 0 }, { 0xF92FB222, 0 }, + { 0xF8B6A622, 0xF8B6A622 }, { 0xF83E0F84, 0 }, + { 0xF7C5ED9D, 0 }, { 0xF74E3FC3, 0 }, + { 0xF6D7054E, 0 }, { 0xF6603D99, 0 }, + { 0xF5E9E7FD, 0 }, { 0xF57403D6, 0 }, + { 0xF4FE9083, 0 }, { 0xF4898D60, 0 }, + { 0xF414F9CE, 0 }, { 0xF3A0D52D, 0 }, + { 0xF32D1EE0, 0 }, { 0xF2B9D649, 0 }, + { 0xF246FACC, 0 }, { 0xF1D48BCF, 0 }, + { 0xF16288B9, 0 }, { 0xF0F0F0F1, 0 }, + { 0xF07FC3E0, 0xF07FC3E0 }, { 0xF00F00F0, 0xF00F00F0 }, + { 0xEF9EA78C, 0 }, { 0xEF2EB720, 0 }, + { 0xEEBF2F19, 0 }, { 0xEE500EE5, 0xEE500EE5 }, + { 0xEDE155F4, 0 }, { 0xED7303B6, 0 }, + { 0xED05179C, 0xED05179C }, { 0xEC979119, 0 }, + { 0xEC2A6FA0, 0xEC2A6FA0 }, { 0xEBBDB2A6, 0 }, + { 0xEB5159A0, 0 }, { 0xEAE56404, 0 }, + { 0xEA79D14A, 0 }, { 0xEA0EA0EA, 0xEA0EA0EA }, + { 0xE9A3D25E, 0xE9A3D25E }, { 0xE9396520, 0 }, + { 0xE8CF58AB, 0 }, { 0xE865AC7C, 0 }, + { 0xE7FC600F, 0 }, { 0xE79372E3, 0 }, + { 0xE72AE476, 0 }, { 0xE6C2B449, 0 }, + { 0xE65AE1DC, 0 }, { 0xE5F36CB0, 0xE5F36CB0 }, + { 0xE58C544A, 0 }, { 0xE525982B, 0 }, + { 0xE4BF37D9, 0 }, { 0xE45932D8, 0 }, + { 0xE3F388AF, 0 }, { 0xE38E38E4, 0 }, + { 0xE32942FF, 0 }, { 0xE2C4A689, 0 }, + { 0xE260630B, 0 }, { 0xE1FC780F, 0 }, + { 0xE198E520, 0 }, { 0xE135A9CA, 0 }, + { 0xE0D2C59A, 0 }, { 0xE070381C, 0xE070381C }, + { 0xE00E00E0, 0xE00E00E0 }, { 0xDFAC1F75, 0 }, + { 0xDF4A9369, 0 }, { 0xDEE95C4D, 0 }, + { 0xDE8879B3, 0 }, { 0xDE27EB2D, 0 }, + { 0xDDC7B04D, 0 }, { 0xDD67C8A6, 0xDD67C8A6 }, + { 0xDD0833CE, 0 }, { 0xDCA8F159, 0 }, + { 0xDC4A00DD, 0 }, { 0xDBEB61EF, 0 }, + { 0xDB8D1428, 0 }, { 0xDB2F171E, 0 }, + { 0xDAD16A6B, 0 }, { 0xDA740DA8, 0 }, + { 0xDA17006D, 0xDA17006D }, { 0xD9BA4257, 0 }, + { 0xD95DD300, 0 }, { 0xD901B204, 0 }, + { 0xD8A5DEFF, 0 }, { 0xD84A598F, 0 }, + { 0xD7EF2152, 0 }, { 0xD79435E5, 0xD79435E5 }, + { 0xD73996E9, 0 }, { 0xD6DF43FD, 0 }, + { 0xD6853CC1, 0 }, { 0xD62B80D7, 0 }, + { 0xD5D20FDF, 0 }, { 0xD578E97D, 0 }, + { 0xD5200D52, 0xD5200D52 }, { 0xD4C77B04, 0 }, + { 0xD46F3235, 0 }, { 0xD417328A, 0 }, + { 0xD3BF7BA9, 0 }, { 0xD3680D37, 0 }, + { 0xD310E6DB, 0 }, { 0xD2BA083C, 0 }, + { 0xD2637101, 0 }, { 0xD20D20D2, 0xD20D20D2 }, + { 0xD1B71759, 0 }, { 0xD161543E, 0xD161543E }, + { 0xD10BD72C, 0 }, { 0xD0B69FCC, 0 }, + { 0xD061ADCA, 0 }, { 0xD00D00D0, 0xD00D00D0 }, + { 0xCFB8988C, 0 }, { 0xCF6474A9, 0 }, + { 0xCF1094D4, 0 }, { 0xCEBCF8BC, 0 }, + { 0xCE69A00D, 0 }, { 0xCE168A77, 0xCE168A77 }, + { 0xCDC3B7A9, 0xCDC3B7A9 }, { 0xCD712753, 0 }, + { 0xCD1ED924, 0 }, { 0xCCCCCCCD, 0 }, + { 0xCC7B0200, 0 }, { 0xCC29786D, 0 }, + { 0xCBD82FC7, 0 }, { 0xCB8727C1, 0 }, + { 0xCB36600D, 0 }, { 0xCAE5D85F, 0xCAE5D85F }, + { 0xCA95906C, 0 }, { 0xCA4587E7, 0 }, + { 0xC9F5BE86, 0 }, { 0xC9A633FD, 0 }, + { 0xC956E803, 0xC956E803 }, { 0xC907DA4F, 0 }, + { 0xC8B90A96, 0 }, { 0xC86A7890, 0xC86A7890 }, + { 0xC81C23F5, 0xC81C23F5 }, { 0xC7CE0C7D, 0 }, + { 0xC78031E0, 0xC78031E0 }, { 0xC73293D8, 0 }, + { 0xC6E5321D, 0 }, { 0xC6980C6A, 0 }, + { 0xC64B2278, 0xC64B2278 }, { 0xC5FE7403, 0xC5FE7403 }, + { 0xC5B200C6, 0 }, { 0xC565C87C, 0 }, + { 0xC519CAE0, 0xC519CAE0 }, { 0xC4CE07B0, 0xC4CE07B0 }, + { 0xC4827EA8, 0xC4827EA8 }, { 0xC4372F86, 0 }, + { 0xC3EC1A06, 0 }, { 0xC3A13DE6, 0xC3A13DE6 }, + { 0xC3569AE6, 0 }, { 0xC30C30C3, 0xC30C30C3 }, + { 0xC2C1FF3E, 0 }, { 0xC2780614, 0 }, + { 0xC22E4507, 0 }, { 0xC1E4BBD6, 0 }, + { 0xC19B6A42, 0 }, { 0xC152500C, 0xC152500C }, + { 0xC1096CF6, 0 }, { 0xC0C0C0C1, 0 }, + { 0xC0784B2F, 0 }, { 0xC0300C03, 0xC0300C03 }, + { 0xBFE80300, 0 }, { 0xBFA02FE8, 0xBFA02FE8 }, + { 0xBF589280, 0 }, { 0xBF112A8B, 0 }, + { 0xBEC9F7CE, 0 }, { 0xBE82FA0C, 0 }, + { 0xBE3C310C, 0 }, { 0xBDF59C92, 0 }, + { 0xBDAF3C64, 0 }, { 0xBD691047, 0xBD691047 }, + { 0xBD231803, 0 }, { 0xBCDD535E, 0 }, + { 0xBC97C21E, 0xBC97C21E }, { 0xBC52640C, 0 }, + { 0xBC0D38EE, 0xBC0D38EE }, { 0xBBC8408D, 0 }, + { 0xBB837AB1, 0 }, { 0xBB3EE722, 0 }, + { 0xBAFA85A9, 0xBAFA85A9 }, { 0xBAB65610, 0xBAB65610 }, + { 0xBA725820, 0xBA725820 }, { 0xBA2E8BA3, 0 }, + { 0xB9EAF063, 0 }, { 0xB9A7862A, 0xB9A7862A }, + { 0xB9644CC4, 0 }, { 0xB92143FA, 0xB92143FA }, + { 0xB8DE6B9A, 0 }, { 0xB89BC36D, 0 }, + { 0xB8594B41, 0 }, { 0xB81702E1, 0 }, + { 0xB7D4EA19, 0xB7D4EA19 }, { 0xB79300B8, 0 }, + { 0xB7514689, 0 }, { 0xB70FBB5A, 0xB70FBB5A }, + { 0xB6CE5EF9, 0xB6CE5EF9 }, { 0xB68D3134, 0xB68D3134 }, + { 0xB64C31D9, 0 }, { 0xB60B60B6, 0xB60B60B6 }, + { 0xB5CABD9B, 0 }, { 0xB58A4855, 0xB58A4855 }, + { 0xB54A00B5, 0xB54A00B5 }, { 0xB509E68B, 0 }, + { 0xB4C9F9A5, 0 }, { 0xB48A39D4, 0xB48A39D4 }, + { 0xB44AA6E9, 0xB44AA6E9 }, { 0xB40B40B4, 0xB40B40B4 }, + { 0xB3CC0706, 0 }, { 0xB38CF9B0, 0xB38CF9B0 }, + { 0xB34E1884, 0 }, { 0xB30F6353, 0 }, + { 0xB2D0D9EF, 0 }, { 0xB2927C2A, 0 }, + { 0xB25449D7, 0 }, { 0xB21642C9, 0 }, + { 0xB1D866D1, 0xB1D866D1 }, { 0xB19AB5C5, 0 }, + { 0xB15D2F76, 0 }, { 0xB11FD3B8, 0xB11FD3B8 }, + { 0xB0E2A260, 0xB0E2A260 }, { 0xB0A59B42, 0 }, + { 0xB068BE31, 0 }, { 0xB02C0B03, 0 }, + { 0xAFEF818C, 0 }, { 0xAFB321A1, 0xAFB321A1 }, + { 0xAF76EB19, 0 }, { 0xAF3ADDC7, 0 }, + { 0xAEFEF982, 0 }, { 0xAEC33E20, 0 }, + { 0xAE87AB76, 0xAE87AB76 }, { 0xAE4C415D, 0 }, + { 0xAE10FFA9, 0 }, { 0xADD5E632, 0xADD5E632 }, + { 0xAD9AF4D0, 0 }, { 0xAD602B58, 0xAD602B58 }, + { 0xAD2589A4, 0 }, { 0xACEB0F89, 0xACEB0F89 }, + { 0xACB0BCE1, 0xACB0BCE1 }, { 0xAC769184, 0xAC769184 }, + { 0xAC3C8D4A, 0 }, { 0xAC02B00B, 0 }, + { 0xABC8F9A0, 0xABC8F9A0 }, { 0xAB8F69E3, 0 }, + { 0xAB5600AC, 0 }, { 0xAB1CBDD4, 0 }, + { 0xAAE3A136, 0 }, { 0xAAAAAAAB, 0 }, + { 0xAA71DA0D, 0 }, { 0xAA392F36, 0 }, + { 0xAA00AA01, 0 }, { 0xA9C84A48, 0 }, + { 0xA9900FE6, 0 }, { 0xA957FAB5, 0xA957FAB5 }, + { 0xA9200A92, 0xA9200A92 }, { 0xA8E83F57, 0xA8E83F57 }, + { 0xA8B098E0, 0xA8B098E0 }, { 0xA8791709, 0 }, + { 0xA841B9AD, 0 }, { 0xA80A80A8, 0xA80A80A8 }, + { 0xA7D36BD8, 0 }, { 0xA79C7B17, 0 }, + { 0xA765AE44, 0 }, { 0xA72F053A, 0 }, + { 0xA6F87FD6, 0xA6F87FD6 }, { 0xA6C21DF7, 0 }, + { 0xA68BDF79, 0 }, { 0xA655C439, 0xA655C439 }, + { 0xA61FCC16, 0xA61FCC16 }, { 0xA5E9F6ED, 0xA5E9F6ED }, + { 0xA5B4449D, 0 }, { 0xA57EB503, 0 }, + { 0xA54947FE, 0 }, { 0xA513FD6C, 0 }, + { 0xA4DED52C, 0xA4DED52C }, { 0xA4A9CF1E, 0 }, + { 0xA474EB1F, 0xA474EB1F }, { 0xA4402910, 0xA4402910 }, + { 0xA40B88D0, 0 }, { 0xA3D70A3E, 0 }, + { 0xA3A2AD39, 0xA3A2AD39 }, { 0xA36E71A3, 0 }, + { 0xA33A575A, 0xA33A575A }, { 0xA3065E40, 0 }, + { 0xA2D28634, 0 }, { 0xA29ECF16, 0xA29ECF16 }, + { 0xA26B38C9, 0 }, { 0xA237C32B, 0xA237C32B }, + { 0xA2046E1F, 0xA2046E1F }, { 0xA1D13986, 0 }, + { 0xA19E2540, 0 }, { 0xA16B312F, 0 }, + { 0xA1385D35, 0 }, { 0xA105A933, 0 }, + { 0xA0D3150C, 0 }, { 0xA0A0A0A1, 0 }, + { 0xA06E4BD4, 0xA06E4BD4 }, { 0xA03C1689, 0 }, + { 0xA00A00A0, 0xA00A00A0 }, { 0x9FD809FE, 0 }, + { 0x9FA63284, 0 }, { 0x9F747A15, 0x9F747A15 }, + { 0x9F42E095, 0x9F42E095 }, { 0x9F1165E7, 0x9F1165E7 }, + { 0x9EE009EE, 0x9EE009EE }, { 0x9EAECC8D, 0x9EAECC8D }, + { 0x9E7DADA9, 0 }, { 0x9E4CAD24, 0 }, + { 0x9E1BCAE3, 0 }, { 0x9DEB06C9, 0x9DEB06C9 }, + { 0x9DBA60BB, 0x9DBA60BB }, { 0x9D89D89E, 0 }, + { 0x9D596E54, 0x9D596E54 }, { 0x9D2921C4, 0 }, + { 0x9CF8F2D1, 0x9CF8F2D1 }, { 0x9CC8E161, 0 }, + { 0x9C98ED58, 0 }, { 0x9C69169B, 0x9C69169B }, + { 0x9C395D10, 0x9C395D10 }, { 0x9C09C09C, 0x9C09C09C }, + { 0x9BDA4124, 0x9BDA4124 }, { 0x9BAADE8E, 0x9BAADE8E }, + { 0x9B7B98C0, 0 }, { 0x9B4C6F9F, 0 }, + { 0x9B1D6311, 0x9B1D6311 }, { 0x9AEE72FD, 0 }, + { 0x9ABF9F48, 0x9ABF9F48 }, { 0x9A90E7D9, 0x9A90E7D9 }, + { 0x9A624C97, 0 }, { 0x9A33CD67, 0x9A33CD67 }, + { 0x9A056A31, 0 }, { 0x99D722DB, 0 }, + { 0x99A8F74C, 0 }, { 0x997AE76B, 0x997AE76B }, + { 0x994CF320, 0x994CF320 }, { 0x991F1A51, 0x991F1A51 }, + { 0x98F15CE7, 0 }, { 0x98C3BAC7, 0x98C3BAC7 }, + { 0x989633DB, 0x989633DB }, { 0x9868C80A, 0 }, + { 0x983B773B, 0 }, { 0x980E4156, 0x980E4156 }, + { 0x97E12644, 0x97E12644 }, { 0x97B425ED, 0x97B425ED }, + { 0x97874039, 0 }, { 0x975A7510, 0 }, + { 0x972DC45B, 0 }, { 0x97012E02, 0x97012E02 }, + { 0x96D4B1EF, 0 }, { 0x96A8500A, 0 }, + { 0x967C083B, 0 }, { 0x964FDA6C, 0x964FDA6C }, + { 0x9623C686, 0x9623C686 }, { 0x95F7CC73, 0 }, + { 0x95CBEC1B, 0 }, { 0x95A02568, 0x95A02568 }, + { 0x95747844, 0 }, { 0x9548E498, 0 }, + { 0x951D6A4E, 0 }, { 0x94F2094F, 0x94F2094F }, + { 0x94C6C187, 0 }, { 0x949B92DE, 0 }, + { 0x94707D3F, 0 }, { 0x94458094, 0x94458094 }, + { 0x941A9CC8, 0x941A9CC8 }, { 0x93EFD1C5, 0x93EFD1C5 }, + { 0x93C51F76, 0 }, { 0x939A85C4, 0x939A85C4 }, + { 0x9370049C, 0 }, { 0x93459BE7, 0 }, + { 0x931B4B91, 0 }, { 0x92F11384, 0x92F11384 }, + { 0x92C6F3AC, 0x92C6F3AC }, { 0x929CEBF5, 0 }, + { 0x9272FC48, 0x9272FC48 }, { 0x92492492, 0x92492492 }, + { 0x921F64BF, 0 }, { 0x91F5BCB9, 0 }, + { 0x91CC2C6C, 0x91CC2C6C }, { 0x91A2B3C5, 0 }, + { 0x917952AF, 0 }, { 0x91500915, 0x91500915 }, + { 0x9126D6E5, 0 }, { 0x90FDBC09, 0x90FDBC09 }, + { 0x90D4B86F, 0 }, { 0x90ABCC02, 0x90ABCC02 }, + { 0x9082F6B0, 0 }, { 0x905A3863, 0x905A3863 }, + { 0x9031910A, 0 }, { 0x90090090, 0x90090090 }, + { 0x8FE086E3, 0 }, { 0x8FB823EE, 0x8FB823EE }, + { 0x8F8FD7A0, 0 }, { 0x8F67A1E4, 0 }, + { 0x8F3F82A8, 0x8F3F82A8 }, { 0x8F1779DA, 0 }, + { 0x8EEF8766, 0 }, { 0x8EC7AB3A, 0 }, + { 0x8E9FE542, 0x8E9FE542 }, { 0x8E78356D, 0x8E78356D }, + { 0x8E509BA8, 0x8E509BA8 }, { 0x8E2917E1, 0 }, + { 0x8E01AA05, 0 }, { 0x8DDA5202, 0x8DDA5202 }, + { 0x8DB30FC6, 0x8DB30FC6 }, { 0x8D8BE340, 0 }, + { 0x8D64CC5C, 0 }, { 0x8D3DCB09, 0 }, + { 0x8D16DF35, 0x8D16DF35 }, { 0x8CF008CF, 0x8CF008CF }, + { 0x8CC947C5, 0 }, { 0x8CA29C04, 0x8CA29C04 }, + { 0x8C7C057D, 0 }, { 0x8C55841D, 0 }, + { 0x8C2F17D2, 0x8C2F17D2 }, { 0x8C08C08C, 0x8C08C08C }, + { 0x8BE27E39, 0x8BE27E39 }, { 0x8BBC50C9, 0 }, + { 0x8B963829, 0x8B963829 }, { 0x8B70344A, 0x8B70344A }, + { 0x8B4A451A, 0 }, { 0x8B246A88, 0 }, + { 0x8AFEA483, 0x8AFEA483 }, { 0x8AD8F2FC, 0 }, + { 0x8AB355E0, 0x8AB355E0 }, { 0x8A8DCD20, 0 }, + { 0x8A6858AB, 0 }, { 0x8A42F870, 0x8A42F870 }, + { 0x8A1DAC60, 0x8A1DAC60 }, { 0x89F8746A, 0 }, + { 0x89D3507D, 0 }, { 0x89AE408A, 0 }, + { 0x89894480, 0 }, { 0x89645C4F, 0x89645C4F }, + { 0x893F87E8, 0x893F87E8 }, { 0x891AC73B, 0 }, + { 0x88F61A37, 0x88F61A37 }, { 0x88D180CD, 0x88D180CD }, + { 0x88ACFAEE, 0 }, { 0x88888889, 0 }, + { 0x8864298F, 0 }, { 0x883FDDF0, 0x883FDDF0 }, + { 0x881BA59E, 0 }, { 0x87F78088, 0 }, + { 0x87D36EA0, 0 }, { 0x87AF6FD6, 0 }, + { 0x878B841B, 0 }, { 0x8767AB5F, 0x8767AB5F }, + { 0x8743E595, 0 }, { 0x872032AC, 0x872032AC }, + { 0x86FC9296, 0x86FC9296 }, { 0x86D90545, 0 }, + { 0x86B58AA8, 0 }, { 0x869222B2, 0 }, + { 0x866ECD53, 0x866ECD53 }, { 0x864B8A7E, 0 }, + { 0x86285A23, 0x86285A23 }, { 0x86053C34, 0x86053C34 }, + { 0x85E230A3, 0x85E230A3 }, { 0x85BF3761, 0x85BF3761 }, + { 0x859C5060, 0x859C5060 }, { 0x85797B91, 0x85797B91 }, + { 0x8556B8E7, 0x8556B8E7 }, { 0x85340853, 0x85340853 }, + { 0x851169C7, 0x851169C7 }, { 0x84EEDD36, 0 }, + { 0x84CC6290, 0 }, { 0x84A9F9C8, 0x84A9F9C8 }, + { 0x8487A2D1, 0 }, { 0x84655D9C, 0 }, + { 0x84432A1B, 0x84432A1B }, { 0x84210842, 0x84210842 }, + { 0x83FEF802, 0x83FEF802 }, { 0x83DCF94E, 0 }, + { 0x83BB0C18, 0 }, { 0x83993052, 0x83993052 }, + { 0x837765F0, 0x837765F0 }, { 0x8355ACE4, 0 }, + { 0x83340520, 0x83340520 }, { 0x83126E98, 0 }, + { 0x82F0E93D, 0x82F0E93D }, { 0x82CF7504, 0 }, + { 0x82AE11DE, 0 }, { 0x828CBFBF, 0 }, + { 0x826B7E99, 0x826B7E99 }, { 0x824A4E61, 0 }, + { 0x82292F08, 0 }, { 0x82082082, 0x82082082 }, + { 0x81E722C2, 0x81E722C2 }, { 0x81C635BC, 0x81C635BC }, + { 0x81A55963, 0 }, { 0x81848DA9, 0 }, + { 0x8163D283, 0 }, { 0x814327E4, 0 }, + { 0x81228DBF, 0 }, { 0x81020408, 0x81020408 }, + { 0x80E18AB3, 0 }, { 0x80C121B3, 0 }, + { 0x80A0C8FB, 0x80A0C8FB }, { 0x80808081, 0 }, + { 0x80604836, 0x80604836 }, { 0x80402010, 0x80402010 }, + { 0x80200802, 0x80200802 }, { 0xFFFFFFFF, 0xFFFFFFFF } }; diff --git a/av1/common/pred_common.c b/av1/common/pred_common.c index 508dac5ce..1dac38fa5 100644 --- a/av1/common/pred_common.c +++ b/av1/common/pred_common.c @@ -62,7 +62,7 @@ int av1_get_intra_inter_context(const MACROBLOCKD *xd) { } int av1_get_reference_mode_context(const AV1_COMMON *cm, - const MACROBLOCKD *xd) { + const MACROBLOCKD *xd) { int ctx; const MB_MODE_INFO *const above_mbmi = xd->above_mbmi; const MB_MODE_INFO *const left_mbmi = xd->left_mbmi; @@ -105,7 +105,7 @@ int av1_get_reference_mode_context(const AV1_COMMON *cm, // Returns a context number for the given MB prediction signal int av1_get_pred_context_comp_ref_p(const AV1_COMMON *cm, - const MACROBLOCKD *xd) { + const MACROBLOCKD *xd) { int pred_context; const MB_MODE_INFO *const above_mbmi = xd->above_mbmi; const MB_MODE_INFO *const left_mbmi = xd->left_mbmi; diff --git a/av1/common/quant_common.c b/av1/common/quant_common.c index fbc391e40..e03a8d5dd 100644 --- a/av1/common/quant_common.c +++ b/av1/common/quant_common.c @@ -200,8 +200,8 @@ int16_t av1_ac_quant(int qindex, int delta, aom_bit_depth_t bit_depth) { #endif } -int av1_get_qindex(const struct segmentation *seg, int segment_id, - int base_qindex) { +int av1_get_qindex(const struct segmentation* seg, int segment_id, + int base_qindex) { if (segfeature_active(seg, segment_id, SEG_LVL_ALT_Q)) { const int data = get_segdata(seg, segment_id, SEG_LVL_ALT_Q); const int seg_qindex = @@ -346,8 +346,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 208, 215, 223, 232, 240, 249, 258, 268, 276, 285, 295, 305, 313, 321, 329, 338, 345, 352, 360, 367, 367, 367, 367, 218, 208, 198, 189, 181, 186, 191, 196, 201, 208, 215, 223, 232, 240, 249, 258, 268, 276, 285, - 295, 305, 313, 321, 329, 338, 345, 352, 360, 367, 367, 367, 367 - }, + 295, 305, 313, 321, 329, 338, 345, 352, 360, 367, 367, 367, 367 }, { /* Intra matrices */ /* Size 4 */ 16, 18, 33, 60, 18, 29, 45, 68, 33, 45, 72, 98, 60, 68, 98, 129, @@ -431,9 +430,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 56, 58, 60, 61, 63, 66, 68, 71, 74, 77, 81, 84, 88, 92, 95, 99, 103, 107, 110, 114, 118, 121, 124, 127, 130, 130, 130, 130, 69, 66, 62, 59, 56, 58, 60, 61, 63, 66, 68, 71, 74, 77, 81, 84, 88, 92, 95, 99, 103, - 107, 110, 114, 118, 121, 124, 127, 130, 130, 130, 130 - } - }, + 107, 110, 114, 118, 121, 124, 127, 130, 130, 130, 130 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -535,8 +532,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 167, 173, 179, 186, 193, 201, 207, 214, 221, 229, 235, 242, 249, 256, 262, 267, 273, 280, 280, 280, 280, 172, 161, 152, 144, 136, 140, 143, 147, 151, 156, 161, 167, 173, 179, 186, 193, 201, 207, 214, 221, 229, - 235, 242, 249, 256, 262, 267, 273, 280, 280, 280, 280 - }, + 235, 242, 249, 256, 262, 267, 273, 280, 280, 280, 280 }, { /* Intra matrices */ /* Size 4 */ 23, 40, 44, 59, 40, 50, 54, 64, 44, 54, 74, 89, 59, 64, 89, 114, @@ -620,9 +616,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 71, 74, 78, 81, 84, 87, 90, 94, 97, 100, 103, 107, 109, 112, 115, 118, 118, 118, 118, 68, 64, 60, 56, 53, 54, 56, 57, 59, 61, 64, 66, 69, 71, 74, 78, 81, 84, 87, 90, 94, 97, 100, 103, 107, 109, 112, 115, 118, 118, - 118, 118 - } - } }, + 118, 118 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -722,8 +716,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 189, 195, 201, 207, 213, 220, 227, 234, 240, 247, 254, 261, 266, 272, 278, 284, 288, 293, 298, 303, 303, 303, 303, 197, 189, 181, 174, 167, 171, 175, 179, 183, 189, 195, 201, 207, 213, 220, 227, 234, 240, 247, - 254, 261, 266, 272, 278, 284, 288, 293, 298, 303, 303, 303, 303 - }, + 254, 261, 266, 272, 278, 284, 288, 293, 298, 303, 303, 303, 303 }, { /* Intra matrices */ /* Size 4 */ 19, 21, 37, 63, 21, 33, 49, 70, 37, 49, 74, 96, 63, 70, 96, 119, @@ -807,9 +800,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 71, 73, 76, 78, 81, 84, 88, 90, 93, 96, 99, 102, 104, 107, 110, 112, 114, 117, 119, 119, 119, 119, 72, 68, 65, 62, 60, 61, 63, 64, 66, 68, 71, 73, 76, 78, 81, 84, 88, 90, 93, 96, 99, 102, 104, 107, 110, 112, - 114, 117, 119, 119, 119, 119 - } - }, + 114, 117, 119, 119, 119, 119 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -911,8 +902,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 186, 191, 196, 202, 209, 214, 219, 224, 230, 234, 238, 243, 248, 248, 248, 248, 161, 152, 144, 137, 131, 134, 137, 140, 143, 148, 152, 157, 163, 168, 173, 179, 186, 191, 196, 202, 209, 214, 219, 224, 230, 234, - 238, 243, 248, 248, 248, 248 - }, + 238, 243, 248, 248, 248, 248 }, { /* Intra matrices */ /* Size 4 */ 25, 42, 46, 60, 42, 51, 55, 65, 46, 55, 75, 88, 60, 65, 88, 109, @@ -995,9 +985,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 65, 61, 58, 55, 56, 58, 59, 61, 63, 65, 67, 69, 72, 74, 77, 80, 83, 86, 89, 92, 94, 97, 99, 102, 104, 107, 109, 111, 111, 111, 111, 69, 65, 61, 58, 55, 56, 58, 59, 61, 63, 65, 67, 69, 72, 74, 77, 80, 83, 86, 89, 92, - 94, 97, 99, 102, 104, 107, 109, 111, 111, 111, 111 - } - } }, + 94, 97, 99, 102, 104, 107, 109, 111, 111, 111, 111 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -1097,8 +1085,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 186, 191, 196, 202, 207, 212, 216, 221, 226, 230, 234, 238, 242, 246, 249, 252, 255, 255, 255, 255, 179, 172, 166, 160, 155, 158, 161, 164, 168, 172, 177, 181, 186, 191, 196, 202, 207, 212, 216, 221, 226, 230, - 234, 238, 242, 246, 249, 252, 255, 255, 255, 255 - }, + 234, 238, 242, 246, 249, 252, 255, 255, 255, 255 }, { /* Intra matrices */ /* Size 4 */ 21, 23, 40, 65, 23, 36, 52, 72, 40, 52, 75, 93, 65, 72, 93, 111, @@ -1182,9 +1169,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 81, 83, 86, 88, 91, 93, 95, 97, 99, 101, 104, 105, 107, 108, 110, 110, 110, 110, 73, 70, 67, 64, 62, 63, 65, 66, 68, 70, 72, 74, 76, 79, 81, 83, 86, 88, 91, 93, 95, 97, 99, 101, 104, 105, 107, 108, 110, 110, 110, - 110 - } - }, + 110 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -1285,8 +1270,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 136, 140, 144, 148, 153, 157, 162, 167, 172, 176, 181, 186, 191, 195, 199, 203, 207, 211, 214, 217, 221, 221, 221, 221, 152, 144, 137, 131, 125, 128, 130, 133, 136, 140, 144, 148, 153, 157, 162, 167, 172, 176, - 181, 186, 191, 195, 199, 203, 207, 211, 214, 217, 221, 221, 221, 221 - }, + 181, 186, 191, 195, 199, 203, 207, 211, 214, 217, 221, 221, 221, 221 }, { /* Intra matrices */ /* Size 4 */ 27, 44, 48, 61, 44, 53, 57, 66, 48, 57, 74, 86, 61, 66, 86, 103, @@ -1369,9 +1353,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 59, 56, 58, 59, 60, 62, 64, 65, 68, 70, 72, 74, 77, 79, 82, 84, 87, 89, 91, 93, 96, 98, 100, 102, 103, 105, 105, 105, 105, 69, 66, 62, 59, 56, 58, 59, 60, 62, 64, 65, 68, 70, 72, 74, 77, 79, 82, 84, 87, 89, 91, 93, - 96, 98, 100, 102, 103, 105, 105, 105, 105 - } - } }, + 96, 98, 100, 102, 103, 105, 105, 105, 105 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -1471,8 +1453,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 180, 185, 188, 191, 195, 199, 202, 204, 207, 210, 213, 215, 217, 220, 220, 220, 220, 163, 158, 153, 148, 144, 146, 149, 151, 154, 158, 161, 165, 169, 173, 176, 180, 185, 188, 191, 195, 199, 202, 204, 207, 210, - 213, 215, 217, 220, 220, 220, 220 - }, + 213, 215, 217, 220, 220, 220, 220 }, { /* Intra matrices */ /* Size 4 */ 24, 26, 43, 67, 26, 39, 54, 72, 43, 54, 75, 91, 67, 72, 91, 105, @@ -1555,9 +1536,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 66, 68, 69, 71, 73, 74, 76, 78, 80, 82, 85, 86, 88, 90, 92, 93, 95, 97, 98, 99, 101, 102, 103, 103, 103, 103, 73, 71, 68, 66, 64, 65, 66, 68, 69, 71, 73, 74, 76, 78, 80, 82, 85, 86, 88, 90, 92, 93, 95, 97, 98, 99, - 101, 102, 103, 103, 103, 103 - } - }, + 101, 102, 103, 103, 103, 103 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -1658,8 +1637,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 167, 170, 175, 178, 181, 184, 188, 190, 193, 196, 198, 198, 198, 198, 143, 136, 130, 125, 120, 122, 124, 127, 129, 133, 136, 140, 143, 147, 151, 155, 159, 163, 167, 170, 175, 178, 181, 184, 188, 190, 193, 196, - 198, 198, 198, 198 - }, + 198, 198, 198, 198 }, { /* Intra matrices */ /* Size 4 */ 29, 46, 49, 62, 46, 54, 58, 66, 49, 58, 74, 84, 62, 66, 84, 99, @@ -1742,9 +1720,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 66, 68, 70, 72, 74, 76, 79, 80, 82, 85, 87, 89, 90, 92, 94, 96, 97, 99, 100, 100, 100, 100, 70, 66, 63, 60, 58, 59, 60, 61, 63, 64, 66, 68, 70, 72, 74, 76, 79, 80, 82, 85, 87, 89, 90, 92, 94, 96, 97, 99, 100, 100, - 100, 100 - } - } }, + 100, 100 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -1844,8 +1820,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 166, 168, 171, 174, 176, 178, 180, 183, 185, 186, 188, 190, 191, 191, 191, 191, 149, 145, 141, 137, 134, 136, 138, 140, 142, 145, 148, 151, 154, 156, 159, 162, 166, 168, 171, 174, 176, 178, 180, 183, 185, 186, - 188, 190, 191, 191, 191, 191 - }, + 188, 190, 191, 191, 191, 191 }, { /* Intra matrices */ /* Size 4 */ 26, 29, 46, 68, 29, 42, 57, 73, 46, 57, 75, 88, 68, 73, 88, 99, @@ -1927,9 +1902,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 96, 97, 98, 98, 98, 98, 73, 71, 69, 67, 65, 66, 67, 69, 70, 71, 73, 74, 76, 78, 79, 81, 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 98, 98, 98, 73, 71, 69, 67, 65, 66, 67, 69, 70, 71, 73, 74, 76, 78, 79, 81, - 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 98, 98, 98 - } - }, + 83, 84, 86, 87, 89, 90, 91, 92, 94, 95, 96, 97, 98, 98, 98, 98 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -2029,8 +2002,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 128, 131, 135, 138, 141, 144, 148, 151, 154, 157, 160, 162, 165, 168, 170, 172, 174, 177, 179, 179, 179, 179, 134, 129, 123, 119, 115, 117, 119, 121, 123, 126, 128, 131, 135, 138, 141, 144, 148, 151, 154, 157, - 160, 162, 165, 168, 170, 172, 174, 177, 179, 179, 179, 179 - }, + 160, 162, 165, 168, 170, 172, 174, 177, 179, 179, 179, 179 }, { /* Intra matrices */ /* Size 4 */ 31, 47, 51, 63, 47, 56, 59, 67, 51, 59, 74, 82, 63, 67, 82, 95, @@ -2112,9 +2084,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 93, 94, 96, 96, 96, 96, 70, 67, 64, 61, 59, 60, 61, 62, 63, 65, 67, 68, 70, 72, 74, 75, 77, 79, 81, 83, 85, 86, 87, 89, 91, 92, 93, 94, 96, 96, 96, 96, 70, 67, 64, 61, 59, 60, 61, 62, 63, 65, 67, 68, 70, 72, 74, 75, - 77, 79, 81, 83, 85, 86, 87, 89, 91, 92, 93, 94, 96, 96, 96, 96 - } - } }, + 77, 79, 81, 83, 85, 86, 87, 89, 91, 92, 93, 94, 96, 96, 96, 96 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -2212,8 +2182,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 145, 147, 150, 151, 153, 155, 158, 159, 161, 162, 164, 165, 166, 167, 169, 169, 169, 169, 137, 133, 130, 127, 125, 126, 128, 129, 131, 133, 136, 138, 140, 143, 145, 147, 150, 151, 153, 155, 158, 159, 161, 162, - 164, 165, 166, 167, 169, 169, 169, 169 - }, + 164, 165, 166, 167, 169, 169, 169, 169 }, { /* Intra matrices */ /* Size 4 */ 29, 32, 48, 68, 32, 45, 58, 73, 48, 58, 75, 86, 68, 73, 86, 94, @@ -2295,9 +2264,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 91, 92, 93, 93, 93, 93, 73, 71, 70, 68, 66, 67, 68, 69, 70, 71, 73, 74, 75, 77, 78, 80, 81, 82, 83, 85, 86, 87, 88, 89, 90, 90, 91, 92, 93, 93, 93, 93, 73, 71, 70, 68, 66, 67, 68, 69, 70, 71, 73, 74, 75, 77, 78, 80, - 81, 82, 83, 85, 86, 87, 88, 89, 90, 90, 91, 92, 93, 93, 93, 93 - } - }, + 81, 82, 83, 85, 86, 87, 88, 89, 90, 90, 91, 92, 93, 93, 93, 93 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -2396,8 +2363,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 147, 149, 151, 153, 155, 157, 158, 160, 162, 162, 162, 162, 126, 121, 117, 113, 109, 111, 113, 115, 116, 119, 121, 124, 126, 129, 132, 134, 137, 139, 142, 144, 147, 149, 151, 153, 155, 157, 158, 160, 162, 162, - 162, 162 - }, + 162, 162 }, { /* Intra matrices */ /* Size 4 */ 33, 49, 53, 64, 49, 57, 60, 67, 53, 60, 73, 81, 64, 67, 81, 91, @@ -2479,9 +2445,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 89, 90, 91, 91, 91, 91, 70, 67, 64, 62, 60, 61, 62, 63, 64, 65, 67, 68, 70, 71, 73, 75, 76, 78, 79, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 91, 91, 91, 70, 67, 64, 62, 60, 61, 62, 63, 64, 65, 67, 68, 70, 71, 73, 75, - 76, 78, 79, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 91, 91, 91 - } - } }, + 76, 78, 79, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 91, 91, 91 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -2579,8 +2543,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, 150, 150, 150, 150, 126, 123, 121, 118, 116, 117, 119, 120, 121, 123, 125, 127, 129, 130, 132, 134, 136, 137, 139, 140, 142, 143, 144, 145, 146, 147, 148, 149, - 150, 150, 150, 150 - }, + 150, 150, 150, 150 }, { /* Intra matrices */ /* Size 4 */ 32, 34, 51, 69, 34, 47, 60, 73, 51, 60, 75, 83, 69, 73, 83, 90, @@ -2662,9 +2625,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 87, 88, 89, 89, 89, 89, 73, 71, 70, 68, 67, 68, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 85, 86, 87, 87, 88, 89, 89, 89, 89, 73, 71, 70, 68, 67, 68, 68, 69, 70, 71, 72, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 85, 86, 87, 87, 88, 89, 89, 89, 89 - } - }, + 79, 80, 81, 82, 83, 84, 85, 85, 86, 87, 87, 88, 89, 89, 89, 89 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -2762,8 +2723,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 137, 138, 140, 142, 143, 144, 145, 147, 147, 147, 147, 118, 114, 111, 108, 104, 106, 107, 109, 110, 112, 114, 116, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 138, 140, 142, 143, 144, 145, 147, 147, 147, - 147 - }, + 147 }, { /* Intra matrices */ /* Size 4 */ 35, 51, 54, 64, 51, 58, 61, 67, 54, 61, 72, 79, 64, 67, 79, 87, @@ -2845,9 +2805,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 86, 87, 88, 88, 88, 88, 69, 67, 65, 63, 61, 62, 63, 63, 64, 66, 67, 68, 70, 71, 72, 74, 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 88, 88, 88, 69, 67, 65, 63, 61, 62, 63, 63, 64, 66, 67, 68, 70, 71, 72, 74, - 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 88, 88, 88 - } - } }, + 75, 76, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 88, 88, 88 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -2944,8 +2902,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, 132, 133, 134, 134, 134, 134, 134, 116, 114, 112, 110, 108, 109, 110, 112, 113, 114, 115, 117, 118, 119, 121, 122, 124, 125, 126, 127, 128, 129, 130, 131, 132, - 132, 133, 134, 134, 134, 134, 134 - }, + 132, 133, 134, 134, 134, 134, 134 }, { /* Intra matrices */ /* Size 4 */ 35, 37, 53, 69, 37, 50, 61, 72, 53, 61, 74, 81, 69, 72, 81, 86, @@ -3027,9 +2984,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 84, 84, 85, 85, 85, 85, 72, 71, 70, 68, 67, 68, 69, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 78, 79, 80, 81, 81, 82, 82, 83, 84, 84, 84, 85, 85, 85, 85, 72, 71, 70, 68, 67, 68, 69, 69, 70, 71, 72, 73, 74, 75, 76, 77, - 78, 78, 79, 80, 81, 81, 82, 82, 83, 84, 84, 84, 85, 85, 85, 85 - } - }, + 78, 78, 79, 80, 81, 81, 82, 82, 83, 84, 84, 84, 85, 85, 85, 85 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -3124,8 +3079,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 111, 113, 115, 116, 118, 120, 121, 123, 124, 126, 127, 128, 129, 130, 131, 132, 133, 133, 133, 133, 111, 108, 105, 102, 100, 101, 102, 103, 104, 106, 108, 109, 111, 113, 115, 116, 118, 120, 121, 123, 124, 126, - 127, 128, 129, 130, 131, 132, 133, 133, 133, 133 - }, + 127, 128, 129, 130, 131, 132, 133, 133, 133, 133 }, { /* Intra matrices */ /* Size 4 */ 37, 52, 55, 64, 52, 59, 62, 67, 55, 62, 72, 77, 64, 67, 77, 84, @@ -3207,9 +3161,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 83, 84, 84, 84, 84, 84, 69, 67, 65, 63, 62, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 82, 83, 84, 84, 84, 84, 84, 69, 67, 65, 63, 62, 62, 63, 64, 65, 66, 67, 68, 69, 70, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 82, 83, 84, 84, 84, 84, 84 - } - } }, + 74, 75, 76, 77, 78, 79, 80, 81, 82, 82, 83, 84, 84, 84, 84, 84 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -3303,8 +3255,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 116, 117, 118, 118, 119, 119, 120, 120, 121, 121, 121, 121, 107, 106, 104, 103, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, - 116, 116, 117, 118, 118, 119, 119, 120, 120, 121, 121, 121, 121 - }, + 116, 116, 117, 118, 118, 119, 119, 120, 120, 121, 121, 121, 121 }, { /* Intra matrices */ /* Size 4 */ 38, 40, 55, 69, 40, 52, 62, 72, 55, 62, 73, 79, 69, 72, 79, 83, @@ -3386,9 +3337,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 81, 81, 82, 82, 82, 82, 72, 70, 69, 68, 67, 68, 69, 69, 70, 71, 71, 72, 73, 74, 74, 75, 76, 76, 77, 78, 78, 79, 79, 80, 80, 81, 81, 81, 82, 82, 82, 82, 72, 70, 69, 68, 67, 68, 69, 69, 70, 71, 71, 72, 73, 74, 74, 75, - 76, 76, 77, 78, 78, 79, 79, 80, 80, 81, 81, 81, 82, 82, 82, 82 - } - }, + 76, 76, 77, 78, 78, 79, 79, 80, 80, 81, 81, 81, 82, 82, 82, 82 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -3478,8 +3427,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 97, 98, 99, 100, 101, 103, 104, 106, 107, 108, 110, 111, 112, 113, 115, 116, 116, 117, 118, 119, 120, 121, 121, 121, 121, 121, 104, 101, 99, 97, 95, 96, 97, 98, 99, 100, 101, 103, 104, 106, 107, 108, 110, 111, 112, - 113, 115, 116, 116, 117, 118, 119, 120, 121, 121, 121, 121, 121 - }, + 113, 115, 116, 116, 117, 118, 119, 120, 121, 121, 121, 121, 121 }, { /* Intra matrices */ /* Size 4 */ 40, 54, 57, 65, 54, 60, 62, 67, 57, 62, 71, 75, 65, 67, 75, 81, @@ -3561,9 +3509,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 80, 81, 81, 81, 81, 81, 69, 67, 65, 64, 62, 63, 64, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 74, 75, 76, 77, 78, 78, 79, 79, 80, 81, 81, 81, 81, 81, 69, 67, 65, 64, 62, 63, 64, 64, 65, 66, 67, 68, 69, 70, 71, 72, - 73, 74, 74, 75, 76, 77, 78, 78, 79, 79, 80, 81, 81, 81, 81, 81 - } - } }, + 73, 74, 74, 75, 76, 77, 78, 78, 79, 79, 80, 81, 81, 81, 81, 81 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -3652,8 +3598,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 100, 101, 101, 102, 103, 104, 104, 105, 105, 106, 107, 107, 107, 108, 108, 109, 109, 109, 109, 109, 109, 99, 98, 97, 96, 95, 95, 96, 97, 97, 98, 99, 100, 101, 101, 102, 103, 104, 104, 105, 105, 106, 107, 107, 107, - 108, 108, 109, 109, 109, 109, 109, 109 - }, + 108, 108, 109, 109, 109, 109, 109, 109 }, { /* Intra matrices */ /* Size 4 */ 41, 43, 57, 69, 43, 54, 63, 71, 57, 63, 72, 77, 69, 71, 77, 80, @@ -3735,9 +3680,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 78, 78, 79, 79, 79, 79, 71, 70, 69, 68, 67, 68, 68, 69, 69, 70, 71, 71, 72, 72, 73, 74, 74, 75, 75, 76, 76, 76, 77, 77, 78, 78, 78, 78, 79, 79, 79, 79, 71, 70, 69, 68, 67, 68, 68, 69, 69, 70, 71, 71, 72, 72, 73, 74, - 74, 75, 75, 76, 76, 76, 77, 77, 78, 78, 78, 78, 79, 79, 79, 79 - } - }, + 74, 75, 75, 76, 76, 76, 77, 77, 78, 78, 78, 78, 79, 79, 79, 79 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -3825,8 +3768,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 106, 107, 108, 108, 109, 109, 110, 111, 111, 111, 111, 97, 95, 94, 92, 90, 91, 92, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 106, 107, - 108, 108, 109, 109, 110, 111, 111, 111, 111 - }, + 108, 108, 109, 109, 110, 111, 111, 111, 111 }, { /* Intra matrices */ /* Size 4 */ 42, 56, 58, 65, 56, 61, 63, 67, 58, 63, 70, 74, 65, 67, 74, 78, @@ -3908,9 +3850,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 77, 78, 78, 78, 78, 78, 68, 67, 65, 64, 63, 63, 64, 64, 65, 66, 67, 67, 68, 69, 70, 71, 72, 72, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 78, 78, 78, 68, 67, 65, 64, 63, 63, 64, 64, 65, 66, 67, 67, 68, 69, 70, 71, - 72, 72, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 78, 78, 78 - } - } }, + 72, 72, 73, 74, 74, 75, 75, 76, 76, 77, 77, 78, 78, 78, 78, 78 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -3993,8 +3933,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 99, 99, 99, 99, 99, 99, 92, 91, 90, 90, 89, 89, 90, 90, 91, 91, 92, 92, 93, 94, 94, 95, 95, 96, 96, 97, 97, 97, 98, 98, 98, 99, 99, 99, 99, 99, 99, 99, 92, 91, 90, 90, 89, 89, 90, 90, 91, 91, 92, 92, 93, 94, 94, 95, - 95, 96, 96, 97, 97, 97, 98, 98, 98, 99, 99, 99, 99, 99, 99, 99 - }, + 95, 96, 96, 97, 97, 97, 98, 98, 98, 99, 99, 99, 99, 99, 99, 99 }, { /* Intra matrices */ /* Size 4 */ 44, 46, 58, 68, 46, 56, 64, 70, 58, 64, 71, 74, 68, 70, 74, 77, @@ -4076,9 +4015,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 75, 76, 76, 76, 76, 76, 70, 69, 68, 68, 67, 68, 68, 68, 69, 69, 70, 70, 71, 71, 72, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 70, 69, 68, 68, 67, 68, 68, 68, 69, 69, 70, 70, 71, 71, 72, 72, - 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76 - } - }, + 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -4162,8 +4099,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 87, 86, 86, 87, 87, 88, 89, 90, 90, 91, 92, 93, 94, 95, 95, 96, 97, 97, 98, 98, 99, 99, 100, 100, 101, 101, 101, 101, 101, 91, 90, 88, 87, 86, 86, 87, 87, 88, 89, 90, 90, 91, 92, 93, 94, 95, 95, 96, 97, 97, 98, 98, - 99, 99, 100, 100, 101, 101, 101, 101, 101 - }, + 99, 99, 100, 100, 101, 101, 101, 101, 101 }, { /* Intra matrices */ /* Size 4 */ 45, 57, 59, 65, 57, 62, 63, 67, 59, 63, 69, 72, 65, 67, 72, 76, @@ -4245,9 +4181,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 75, 75, 75, 75, 75, 75, 68, 66, 65, 64, 63, 64, 64, 65, 65, 66, 66, 67, 68, 68, 69, 70, 70, 71, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 75, 75, 68, 66, 65, 64, 63, 64, 64, 65, 65, 66, 66, 67, 68, 68, 69, 70, - 70, 71, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 75, 75 - } - } }, + 70, 71, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 75, 75, 75, 75 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -4330,8 +4264,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 90, 90, 91, 91, 91, 91, 85, 85, 84, 84, 83, 83, 84, 84, 84, 85, 85, 86, 86, 86, 87, 87, 88, 88, 88, 89, 89, 89, 89, 90, 90, 90, 90, 90, 91, 91, 91, 91, 85, 85, 84, 84, 83, 83, 84, 84, 84, 85, 85, 86, 86, 86, 87, 87, - 88, 88, 88, 89, 89, 89, 89, 90, 90, 90, 90, 90, 91, 91, 91, 91 - }, + 88, 88, 88, 89, 89, 89, 89, 90, 90, 90, 90, 90, 91, 91, 91, 91 }, { /* Intra matrices */ /* Size 4 */ 48, 50, 60, 68, 50, 58, 64, 69, 60, 64, 70, 72, 68, 69, 72, 74, @@ -4413,9 +4346,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 73, 73, 73, 73, 73, 73, 69, 68, 68, 67, 67, 67, 67, 68, 68, 68, 69, 69, 69, 70, 70, 70, 71, 71, 71, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73, 69, 68, 68, 67, 67, 67, 67, 68, 68, 68, 69, 69, 69, 70, 70, 70, - 71, 71, 71, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73 - } - }, + 71, 71, 71, 72, 72, 72, 72, 72, 73, 73, 73, 73, 73, 73, 73, 73 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -4498,8 +4429,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 92, 92, 92, 92, 92, 92, 85, 84, 83, 82, 81, 81, 82, 82, 83, 83, 84, 85, 85, 86, 86, 87, 88, 88, 89, 89, 90, 90, 90, 91, 91, 91, 92, 92, 92, 92, 92, 92, 85, 84, 83, 82, 81, 81, 82, 82, 83, 83, 84, 85, 85, 86, 86, 87, - 88, 88, 89, 89, 90, 90, 90, 91, 91, 91, 92, 92, 92, 92, 92, 92 - }, + 88, 88, 89, 89, 90, 90, 90, 91, 91, 91, 92, 92, 92, 92, 92, 92 }, { /* Intra matrices */ /* Size 4 */ 48, 59, 60, 65, 59, 62, 64, 66, 60, 64, 68, 70, 65, 66, 70, 73, @@ -4581,9 +4511,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 72, 73, 73, 73, 73, 73, 67, 66, 65, 64, 63, 64, 64, 65, 65, 66, 66, 67, 67, 68, 68, 69, 69, 69, 70, 70, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 73, 67, 66, 65, 64, 63, 64, 64, 65, 65, 66, 66, 67, 67, 68, 68, 69, - 69, 69, 70, 70, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 73 - } - } }, + 69, 69, 70, 70, 71, 71, 71, 72, 72, 72, 72, 73, 73, 73, 73, 73 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -4666,8 +4594,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 83, 83, 83, 83, 83, 83, 79, 79, 79, 78, 78, 78, 78, 78, 79, 79, 79, 80, 80, 80, 80, 81, 81, 81, 81, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, 79, 79, 79, 78, 78, 78, 78, 78, 79, 79, 79, 80, 80, 80, 80, 81, - 81, 81, 81, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83 - }, + 81, 81, 81, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83 }, { /* Intra matrices */ /* Size 4 */ 51, 53, 61, 67, 53, 60, 65, 68, 61, 65, 68, 70, 67, 68, 70, 71, @@ -4749,9 +4676,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 71, 71, 71, 71, 71, 71, 68, 67, 67, 67, 66, 67, 67, 67, 67, 67, 68, 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71, 68, 67, 67, 67, 66, 67, 67, 67, 67, 67, 68, 68, 68, 68, 69, 69, - 69, 69, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71 - } - }, + 69, 69, 70, 70, 70, 70, 70, 70, 70, 71, 71, 71, 71, 71, 71, 71 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -4834,8 +4759,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 84, 84, 84, 84, 84, 84, 80, 79, 78, 77, 77, 77, 77, 78, 78, 78, 79, 79, 80, 80, 80, 81, 81, 82, 82, 82, 82, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84, 80, 79, 78, 77, 77, 77, 77, 78, 78, 78, 79, 79, 80, 80, 80, 81, - 81, 82, 82, 82, 82, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84 - }, + 81, 82, 82, 82, 82, 83, 83, 83, 83, 84, 84, 84, 84, 84, 84, 84 }, { /* Intra matrices */ /* Size 4 */ 52, 60, 61, 65, 60, 63, 64, 66, 61, 64, 67, 69, 65, 66, 69, 71, @@ -4917,9 +4841,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 70, 70, 70, 70, 70, 70, 66, 66, 65, 64, 64, 64, 64, 65, 65, 65, 66, 66, 66, 67, 67, 67, 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70, 66, 66, 65, 64, 64, 64, 64, 65, 65, 65, 66, 66, 66, 67, 67, 67, - 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70 - } - } }, + 68, 68, 68, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -5002,8 +4924,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 76, 76, 76, 76, 76, 76, 74, 74, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 75, 75, 75, 75, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 76, 76, 76, 74, 74, 73, 73, 73, 73, 73, 73, 73, 74, 74, 74, 74, 74, 74, 75, - 75, 75, 75, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 76, 76, 76 - }, + 75, 75, 75, 75, 75, 75, 75, 75, 76, 76, 76, 76, 76, 76, 76, 76 }, { /* Intra matrices */ /* Size 4 */ 55, 57, 62, 66, 57, 61, 65, 67, 62, 65, 67, 68, 66, 67, 68, 69, @@ -5085,9 +5006,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 68, 68, 68, 68, 68, 68, 67, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 67, 66, 66, 66, 66, 66, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, - 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 - } - }, + 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -5170,8 +5089,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 77, 77, 77, 77, 77, 77, 74, 74, 73, 73, 72, 73, 73, 73, 73, 73, 74, 74, 74, 74, 75, 75, 75, 75, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77, 74, 74, 73, 73, 72, 73, 73, 73, 73, 73, 74, 74, 74, 74, 75, 75, - 75, 75, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77 - }, + 75, 75, 76, 76, 76, 76, 76, 76, 76, 77, 77, 77, 77, 77, 77, 77 }, { /* Intra matrices */ /* Size 4 */ 55, 61, 62, 65, 61, 63, 64, 65, 62, 64, 66, 67, 65, 65, 67, 68, @@ -5253,9 +5171,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 68, 68, 68, 68, 68, 68, 66, 65, 65, 64, 64, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 66, 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68, 66, 65, 65, 64, 64, 64, 64, 64, 65, 65, 65, 65, 66, 66, 66, 66, - 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 - } - } }, + 67, 67, 67, 67, 67, 67, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -5338,8 +5254,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 70, 70, 70, 70, 70, 70, 69, 69, 69, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 69, 69, 69, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70 - }, + 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70 }, { /* Intra matrices */ /* Size 4 */ 59, 60, 63, 65, 60, 63, 64, 65, 63, 64, 66, 66, 65, 65, 66, 66, @@ -5421,9 +5336,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 66, 66, 66, 66, 66, 66, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 - } - }, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -5506,8 +5419,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 70, 70, 70, 70, 70, 70, 69, 69, 69, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 69, 69, 69, 68, 68, 68, 68, 68, 69, 69, 69, 69, 69, 69, 69, 69, - 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70 - }, + 69, 69, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70, 70 }, { /* Intra matrices */ /* Size 4 */ 59, 63, 63, 64, 63, 64, 64, 65, 63, 64, 65, 66, 64, 65, 66, 66, @@ -5589,9 +5501,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 66, 66, 66, 66, 66, 66, 65, 65, 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 65, 65, 64, 64, 64, 64, 64, 64, 64, 64, 65, 65, 65, 65, 65, 65, - 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 - } - } }, + 65, 65, 65, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -5674,8 +5584,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - }, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }, { /* Intra matrices */ /* Size 4 */ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, @@ -5757,9 +5666,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - } - }, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -5842,8 +5749,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - }, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }, { /* Intra matrices */ /* Size 4 */ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, @@ -5925,9 +5831,7 @@ static uint16_t iwt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - } - } } + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 } } } }; static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + @@ -6014,8 +5918,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 12, 11, 11, 11, 11, 11, 19, 20, 21, 22, 23, 22, 21, 21, 20, 20, 19, 18, 18, 17, 16, 16, 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 11, 19, 20, 21, 22, 23, 22, 21, 21, 20, 20, 19, 18, 18, 17, 16, 16, - 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 11 - }, + 15, 15, 14, 14, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 11 }, { /* Intra matrices */ /* Size 4 */ 249, 225, 124, 69, 225, 139, 91, 60, 124, 91, 57, 42, 69, 60, 42, 32, @@ -6104,9 +6007,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 33, 32, 31, 31, 31, 31, 59, 62, 66, 69, 73, 71, 69, 67, 65, 62, 60, 57, 55, 53, 51, 49, 46, 45, 43, 41, 40, 38, 37, 36, 35, 34, 33, 32, 31, 31, 31, 31, 59, 62, 66, 69, 73, 71, 69, 67, 65, 62, 60, 57, 55, 53, 51, 49, - 46, 45, 43, 41, 40, 38, 37, 36, 35, 34, 33, 32, 31, 31, 31, 31 - } - }, + 46, 45, 43, 41, 40, 38, 37, 36, 35, 34, 33, 32, 31, 31, 31, 31 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -6189,8 +6090,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 15, 15, 15, 15, 15, 15, 24, 25, 27, 29, 30, 29, 29, 28, 27, 26, 25, 25, 24, 23, 22, 21, 20, 20, 19, 19, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 15, 15, 24, 25, 27, 29, 30, 29, 29, 28, 27, 26, 25, 25, 24, 23, 22, 21, - 20, 20, 19, 19, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 15, 15 - }, + 20, 20, 19, 19, 18, 17, 17, 16, 16, 16, 15, 15, 15, 15, 15, 15 }, { /* Intra matrices */ /* Size 4 */ 175, 103, 93, 70, 103, 83, 76, 64, 93, 76, 55, 46, 70, 64, 46, 36, @@ -6276,9 +6176,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 77, 75, 73, 71, 69, 67, 64, 62, 60, 57, 55, 53, 51, 49, 47, 45, 44, 42, 41, 40, 38, 37, 37, 36, 35, 35, 35, 35, 60, 64, 69, 73, 77, 75, 73, 71, 69, 67, 64, 62, 60, 57, 55, 53, 51, 49, 47, 45, 44, 42, 41, 40, 38, 37, - 37, 36, 35, 35, 35, 35 - } - } }, + 37, 36, 35, 35, 35, 35 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -6361,8 +6259,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 14, 14, 14, 14, 14, 14, 21, 22, 23, 24, 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14, 21, 22, 23, 24, 24, 24, 23, 23, 22, 22, 21, 20, 20, 19, 19, 18, - 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14 - }, + 17, 17, 17, 16, 16, 15, 15, 15, 14, 14, 14, 14, 14, 14, 14, 14 }, { /* Intra matrices */ /* Size 4 */ 217, 196, 112, 65, 196, 124, 84, 58, 112, 84, 55, 43, 65, 58, 43, 34, @@ -6451,9 +6348,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 62, 60, 58, 56, 54, 52, 50, 49, 47, 45, 44, 43, 41, 40, 39, 38, 37, 37, 36, 35, 34, 34, 34, 34, 57, 60, 63, 66, 69, 67, 65, 64, 62, 60, 58, 56, 54, 52, 50, 49, 47, 45, 44, 43, 41, 40, 39, 38, 37, 37, 36, 35, 34, - 34, 34, 34 - } - }, + 34, 34, 34 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -6536,8 +6431,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 17, 17, 17, 17, 17, 17, 25, 27, 28, 30, 31, 31, 30, 29, 29, 28, 27, 26, 25, 24, 24, 23, 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 17, 17, 17, 17, 25, 27, 28, 30, 31, 31, 30, 29, 29, 28, 27, 26, 25, 24, 24, 23, - 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 17, 17, 17, 17 - }, + 22, 21, 21, 20, 20, 19, 19, 18, 18, 18, 17, 17, 17, 17, 17, 17 }, { /* Intra matrices */ /* Size 4 */ 162, 98, 89, 68, 98, 80, 74, 63, 89, 74, 55, 47, 68, 63, 47, 38, @@ -6622,9 +6516,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 59, 63, 67, 71, 75, 73, 71, 69, 68, 66, 63, 61, 59, 57, 55, 53, 51, 49, 48, 46, 45, 44, 42, 41, 40, 39, 38, 38, 37, 37, 37, 37, 59, 63, 67, 71, 75, 73, 71, 69, 68, 66, 63, 61, 59, 57, 55, 53, 51, 49, 48, 46, 45, 44, - 42, 41, 40, 39, 38, 38, 37, 37, 37, 37 - } - } }, + 42, 41, 40, 39, 38, 38, 37, 37, 37, 37 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -6707,8 +6599,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 16, 16, 16, 16, 16, 16, 23, 24, 25, 26, 26, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, 20, 19, 19, 19, 18, 18, 17, 17, 17, 17, 16, 16, 16, 16, 16, 16, 23, 24, 25, 26, 26, 26, 25, 25, 24, 24, 23, 23, 22, 21, 21, 20, - 20, 19, 19, 19, 18, 18, 17, 17, 17, 17, 16, 16, 16, 16, 16, 16 - }, + 20, 19, 19, 19, 18, 18, 17, 17, 17, 17, 16, 16, 16, 16, 16, 16 }, { /* Intra matrices */ /* Size 4 */ 192, 174, 103, 63, 174, 113, 79, 57, 103, 79, 55, 44, 63, 57, 44, 37, @@ -6796,9 +6687,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 56, 59, 61, 64, 66, 65, 63, 62, 60, 59, 57, 55, 54, 52, 51, 49, 48, 46, 45, 44, 43, 42, 41, 40, 40, 39, 38, 38, 37, 37, 37, 37, 56, 59, 61, 64, 66, 65, 63, 62, 60, 59, 57, 55, 54, 52, 51, 49, 48, 46, 45, 44, 43, 42, - 41, 40, 40, 39, 38, 38, 37, 37, 37, 37 - } - }, + 41, 40, 40, 39, 38, 38, 37, 37, 37, 37 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -6881,8 +6770,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 19, 19, 19, 19, 19, 19, 27, 28, 30, 31, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 25, 24, 23, 23, 22, 21, 21, 21, 20, 20, 19, 19, 19, 19, 19, 19, 19, 27, 28, 30, 31, 33, 32, 31, 31, 30, 29, 28, 28, 27, 26, 25, 25, - 24, 23, 23, 22, 21, 21, 21, 20, 20, 19, 19, 19, 19, 19, 19, 19 - }, + 24, 23, 23, 22, 21, 21, 21, 20, 20, 19, 19, 19, 19, 19, 19, 19 }, { /* Intra matrices */ /* Size 4 */ 152, 94, 86, 67, 94, 77, 72, 62, 86, 72, 55, 48, 67, 62, 48, 40, @@ -6966,9 +6854,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 39, 39, 59, 62, 66, 69, 73, 71, 70, 68, 66, 64, 63, 61, 59, 57, 55, 53, 52, 50, 49, 47, 46, 45, 44, 43, 42, 41, 40, 40, 39, 39, 39, 39, 59, 62, 66, 69, 73, 71, 70, 68, 66, 64, 63, 61, 59, 57, 55, 53, 52, 50, 49, 47, - 46, 45, 44, 43, 42, 41, 40, 40, 39, 39, 39, 39 - } - } }, + 46, 45, 44, 43, 42, 41, 40, 40, 39, 39, 39, 39 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -7051,8 +6937,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 19, 19, 19, 19, 19, 19, 25, 26, 27, 28, 28, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, 22, 22, 21, 21, 21, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19, 25, 26, 27, 28, 28, 28, 28, 27, 27, 26, 25, 25, 24, 24, 23, 23, - 22, 22, 21, 21, 21, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19 - }, + 22, 22, 21, 21, 21, 20, 20, 20, 19, 19, 19, 19, 19, 19, 19, 19 }, { /* Intra matrices */ /* Size 4 */ 171, 157, 95, 62, 157, 104, 75, 57, 95, 75, 54, 45, 62, 57, 45, 39, @@ -7139,9 +7024,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 40, 40, 40, 40, 56, 58, 60, 62, 64, 63, 62, 61, 59, 58, 56, 55, 54, 52, 51, 50, 48, 47, 46, 46, 45, 44, 43, 42, 42, 41, 41, 40, 40, 40, 40, 40, 56, 58, 60, 62, 64, 63, 62, 61, 59, 58, 56, 55, 54, 52, 51, 50, 48, 47, - 46, 46, 45, 44, 43, 42, 42, 41, 41, 40, 40, 40, 40, 40 - } - }, + 46, 46, 45, 44, 43, 42, 42, 41, 41, 40, 40, 40, 40, 40 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -7224,8 +7107,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 21, 21, 21, 21, 21, 21, 29, 30, 31, 33, 34, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 26, 26, 25, 25, 24, 23, 23, 23, 22, 22, 22, 21, 21, 21, 21, 21, 21, 29, 30, 31, 33, 34, 34, 33, 32, 32, 31, 30, 29, 29, 28, 27, 26, - 26, 25, 25, 24, 23, 23, 23, 22, 22, 22, 21, 21, 21, 21, 21, 21 - }, + 26, 25, 25, 24, 23, 23, 23, 22, 22, 22, 21, 21, 21, 21, 21, 21 }, { /* Intra matrices */ /* Size 4 */ 142, 90, 83, 66, 90, 75, 71, 62, 83, 71, 55, 49, 66, 62, 49, 41, @@ -7308,9 +7190,8 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 43, 42, 42, 41, 41, 41, 41, 59, 62, 65, 68, 71, 70, 68, 67, 65, 64, 62, 60, 59, 57, 55, 54, 52, 51, 50, 48, 47, 46, 45, 44, 44, 43, 42, 42, 41, 41, 41, 41, 59, 62, 65, 68, 71, 70, 68, 67, 65, 64, 62, 60, 59, 57, 55, - 54, 52, 51, 50, 48, 47, 46, 45, 44, 44, 43, 42, 42, 41, 41, 41, 41 - } - } }, + 54, 52, 51, 50, 48, 47, 46, 45, 44, 44, 43, 42, 42, 41, 41, 41, + 41 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -7393,8 +7274,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 22, 22, 21, 21, 21, 21, 28, 28, 29, 30, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 24, 23, 23, 23, 22, 22, 22, 22, 22, 21, 21, 21, 21, 28, 28, 29, 30, 31, 30, 30, 29, 29, 28, 28, 27, 27, 26, 26, 25, - 25, 24, 24, 24, 23, 23, 23, 22, 22, 22, 22, 22, 21, 21, 21, 21 - }, + 25, 24, 24, 24, 23, 23, 23, 22, 22, 22, 22, 22, 21, 21, 21, 21 }, { /* Intra matrices */ /* Size 4 */ 155, 142, 90, 61, 142, 97, 72, 56, 90, 72, 54, 46, 61, 56, 46, 41, @@ -7481,9 +7361,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 58, 59, 61, 63, 62, 61, 60, 59, 57, 56, 55, 54, 53, 52, 51, 49, 49, 48, 47, 46, 46, 45, 44, 44, 43, 43, 42, 42, 42, 42, 42, 56, 58, 59, 61, 63, 62, 61, 60, 59, 57, 56, 55, 54, 53, 52, 51, 49, 49, 48, 47, 46, 46, 45, - 44, 44, 43, 43, 42, 42, 42, 42, 42 - } - }, + 44, 44, 43, 43, 42, 42, 42, 42, 42 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -7566,8 +7444,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 23, 23, 23, 23, 23, 23, 31, 32, 33, 34, 36, 35, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, 28, 27, 27, 26, 26, 25, 25, 24, 24, 24, 23, 23, 23, 23, 23, 23, 31, 32, 33, 34, 36, 35, 35, 34, 33, 33, 32, 31, 30, 30, 29, 28, - 28, 27, 27, 26, 26, 25, 25, 24, 24, 24, 23, 23, 23, 23, 23, 23 - }, + 28, 27, 27, 26, 26, 25, 25, 24, 24, 24, 23, 23, 23, 23, 23, 23 }, { /* Intra matrices */ /* Size 4 */ 133, 87, 80, 65, 87, 73, 69, 61, 80, 69, 56, 50, 65, 61, 50, 43, @@ -7650,9 +7527,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 43, 43, 43, 43, 59, 62, 64, 67, 70, 68, 67, 66, 65, 63, 62, 60, 59, 57, 56, 54, 53, 52, 51, 50, 48, 48, 47, 46, 45, 45, 44, 43, 43, 43, 43, 43, 59, 62, 64, 67, 70, 68, 67, 66, 65, 63, 62, 60, 59, 57, 56, 54, 53, 52, - 51, 50, 48, 48, 47, 46, 45, 45, 44, 43, 43, 43, 43, 43 - } - } }, + 51, 50, 48, 48, 47, 46, 45, 45, 44, 43, 43, 43, 43, 43 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -7735,8 +7610,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 25, 24, 24, 24, 24, 24, 30, 31, 31, 32, 33, 32, 32, 32, 31, 31, 30, 30, 29, 29, 28, 28, 27, 27, 27, 26, 26, 26, 25, 25, 25, 25, 25, 24, 24, 24, 24, 24, 30, 31, 31, 32, 33, 32, 32, 32, 31, 31, 30, 30, 29, 29, 28, 28, - 27, 27, 27, 26, 26, 26, 25, 25, 25, 25, 25, 24, 24, 24, 24, 24 - }, + 27, 27, 27, 26, 26, 26, 25, 25, 25, 25, 25, 24, 24, 24, 24, 24 }, { /* Intra matrices */ /* Size 4 */ 141, 130, 85, 60, 130, 91, 70, 56, 85, 70, 55, 48, 60, 56, 48, 43, @@ -7821,9 +7695,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 45, 44, 44, 44, 44, 56, 57, 59, 60, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 51, 50, 49, 48, 48, 47, 47, 46, 46, 45, 45, 45, 44, 44, 44, 44, 56, 57, 59, 60, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 51, - 50, 49, 48, 48, 47, 47, 46, 46, 45, 45, 45, 44, 44, 44, 44 - } - }, + 50, 49, 48, 48, 47, 47, 46, 46, 45, 45, 45, 44, 44, 44, 44 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -7906,8 +7778,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 26, 26, 25, 25, 25, 25, 33, 34, 35, 36, 37, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, 30, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 26, 25, 25, 25, 25, 33, 34, 35, 36, 37, 37, 36, 36, 35, 34, 34, 33, 32, 32, 31, 31, - 30, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 26, 25, 25, 25, 25 - }, + 30, 29, 29, 28, 28, 28, 27, 27, 26, 26, 26, 26, 25, 25, 25, 25 }, { /* Intra matrices */ /* Size 4 */ 125, 84, 78, 64, 84, 72, 68, 61, 78, 68, 56, 51, 64, 61, 51, 45, @@ -7990,9 +7861,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 45, 59, 61, 64, 66, 68, 67, 66, 65, 64, 63, 61, 60, 59, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 48, 47, 46, 46, 45, 45, 45, 45, 45, 59, 61, 64, 66, 68, 67, 66, 65, 64, 63, 61, 60, 59, 57, 56, 55, 54, 53, 52, 51, 50, - 49, 48, 48, 47, 46, 46, 45, 45, 45, 45, 45 - } - } }, + 49, 48, 48, 47, 46, 46, 45, 45, 45, 45, 45 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -8075,8 +7944,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 28, 27, 27, 27, 27, 27, 33, 33, 34, 35, 35, 35, 34, 34, 34, 33, 33, 32, 32, 31, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 28, 28, 27, 27, 27, 27, 27, 33, 33, 34, 35, 35, 35, 34, 34, 34, 33, 33, 32, 32, 31, 31, 31, - 30, 30, 30, 29, 29, 29, 28, 28, 28, 28, 28, 27, 27, 27, 27, 27 - }, + 30, 30, 30, 29, 29, 29, 28, 28, 28, 28, 28, 27, 27, 27, 27, 27 }, { /* Intra matrices */ /* Size 4 */ 129, 119, 81, 60, 119, 86, 68, 56, 81, 68, 55, 49, 60, 56, 49, 45, @@ -8161,9 +8029,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 56, 57, 59, 60, 61, 61, 60, 59, 58, 57, 57, 56, 55, 54, 53, 52, 52, 51, 50, 50, 49, 49, 48, 48, 47, 47, 47, 47, 46, 46, 46, 46, 56, 57, 59, 60, 61, 61, 60, 59, 58, 57, 57, 56, 55, 54, 53, 52, 52, 51, 50, 50, 49, 49, - 48, 48, 47, 47, 47, 47, 46, 46, 46, 46 - } - }, + 48, 48, 47, 47, 47, 47, 46, 46, 46, 46 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -8246,8 +8112,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 28, 28, 28, 28, 28, 28, 35, 36, 37, 38, 39, 39, 38, 38, 37, 36, 36, 35, 35, 34, 33, 33, 32, 32, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 28, 28, 28, 35, 36, 37, 38, 39, 39, 38, 38, 37, 36, 36, 35, 35, 34, 33, 33, - 32, 32, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 28, 28, 28 - }, + 32, 32, 31, 31, 30, 30, 30, 29, 29, 29, 28, 28, 28, 28, 28, 28 }, { /* Intra matrices */ /* Size 4 */ 117, 81, 76, 64, 81, 71, 67, 61, 76, 67, 57, 52, 64, 61, 52, 47, @@ -8330,9 +8195,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 59, 61, 63, 65, 67, 66, 65, 65, 64, 62, 61, 60, 59, 58, 57, 56, 54, 54, 53, 52, 51, 50, 50, 49, 49, 48, 48, 47, 47, 47, 47, 47, 59, 61, 63, 65, 67, 66, 65, 65, 64, 62, 61, 60, 59, 58, 57, 56, 54, 54, 53, 52, 51, 50, - 50, 49, 49, 48, 48, 47, 47, 47, 47, 47 - } - } }, + 50, 49, 49, 48, 48, 47, 47, 47, 47, 47 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -8415,8 +8278,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 31, 31, 31, 31, 31, 31, 35, 36, 37, 37, 38, 37, 37, 37, 36, 36, 36, 35, 35, 34, 34, 34, 33, 33, 33, 32, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 36, 37, 37, 38, 37, 37, 37, 36, 36, 36, 35, 35, 34, 34, 34, - 33, 33, 33, 32, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31, 31, 31 - }, + 33, 33, 33, 32, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, { /* Intra matrices */ /* Size 4 */ 118, 110, 77, 59, 110, 82, 67, 57, 77, 67, 56, 51, 59, 57, 51, 47, @@ -8501,9 +8363,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 59, 58, 58, 57, 56, 55, 55, 54, 53, 53, 52, 52, 51, 51, 50, 50, 50, 49, 49, 49, 49, 48, 48, 48, 48, 57, 58, 59, 60, 61, 60, 60, 59, 58, 58, 57, 56, 55, 55, 54, 53, 53, 52, 52, 51, 51, 50, 50, 50, 49, 49, 49, 49, 48, - 48, 48, 48 - } - }, + 48, 48, 48 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -8586,8 +8446,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 31, 31, 31, 31, 31, 31, 37, 38, 39, 40, 41, 41, 40, 40, 39, 39, 38, 37, 37, 36, 36, 35, 35, 34, 34, 33, 33, 33, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31, 37, 38, 39, 40, 41, 41, 40, 40, 39, 39, 38, 37, 37, 36, 36, 35, - 35, 34, 34, 33, 33, 33, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31 - }, + 35, 34, 34, 33, 33, 33, 32, 32, 32, 31, 31, 31, 31, 31, 31, 31 }, { /* Intra matrices */ /* Size 4 */ 110, 78, 74, 64, 78, 69, 66, 61, 74, 66, 57, 53, 64, 61, 53, 49, @@ -8670,9 +8529,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 65, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 52, 51, 51, 50, 50, 49, 49, 49, 49, 49, 49, 59, 61, 63, 65, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 55, 54, 53, 52, 52, 51, 51, 50, - 50, 49, 49, 49, 49, 49, 49 - } - } }, + 50, 49, 49, 49, 49, 49, 49 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -8755,8 +8612,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 34, 34, 34, 34, 34, 34, 38, 39, 39, 40, 40, 40, 40, 39, 39, 39, 38, 38, 38, 37, 37, 37, 36, 36, 36, 35, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34, 34, 38, 39, 39, 40, 40, 40, 40, 39, 39, 39, 38, 38, 38, 37, 37, 37, - 36, 36, 36, 35, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34, 34 - }, + 36, 36, 36, 35, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34, 34 }, { /* Intra matrices */ /* Size 4 */ 109, 102, 75, 59, 102, 79, 66, 57, 75, 66, 56, 52, 59, 57, 52, 49, @@ -8840,9 +8696,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 50, 50, 50, 50, 50, 57, 58, 59, 60, 61, 60, 60, 59, 59, 58, 57, 57, 56, 56, 55, 55, 54, 54, 53, 53, 52, 52, 52, 51, 51, 51, 51, 50, 50, 50, 50, 50, 57, 58, 59, 60, 61, 60, 60, 59, 59, 58, 57, 57, 56, 56, 55, 55, 54, - 54, 53, 53, 52, 52, 52, 51, 51, 51, 51, 50, 50, 50, 50, 50 - } - }, + 54, 53, 53, 52, 52, 52, 51, 51, 51, 51, 50, 50, 50, 50, 50 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -8925,8 +8779,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 34, 34, 34, 34, 34, 34, 39, 40, 41, 42, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 38, 38, 37, 37, 37, 36, 36, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34, 39, 40, 41, 42, 43, 43, 42, 42, 41, 41, 40, 40, 39, 39, 38, 38, - 37, 37, 37, 36, 36, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34 - }, + 37, 37, 37, 36, 36, 35, 35, 35, 35, 34, 34, 34, 34, 34, 34, 34 }, { /* Intra matrices */ /* Size 4 */ 103, 76, 72, 63, 76, 68, 66, 61, 72, 66, 58, 54, 63, 61, 54, 51, @@ -9009,9 +8862,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 66, 65, 64, 64, 63, 62, 61, 60, 60, 59, 58, 57, 56, 56, 55, 54, 54, 53, 53, 52, 52, 52, 51, 51, 51, 51, 51, 51, 60, 61, 63, 64, 66, 65, 64, 64, 63, 62, 61, 60, 60, 59, 58, 57, 56, 56, 55, 54, 54, 53, 53, 52, 52, - 52, 51, 51, 51, 51, 51, 51 - } - } }, + 52, 51, 51, 51, 51, 51, 51 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -9094,8 +8945,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 38, 38, 37, 37, 37, 37, 41, 42, 42, 43, 43, 43, 43, 42, 42, 42, 41, 41, 41, 40, 40, 40, 40, 39, 39, 39, 39, 38, 38, 38, 38, 38, 38, 38, 37, 37, 37, 37, 41, 42, 42, 43, 43, 43, 43, 42, 42, 42, 41, 41, 41, 40, 40, 40, - 40, 39, 39, 39, 39, 38, 38, 38, 38, 38, 38, 38, 37, 37, 37, 37 - }, + 40, 39, 39, 39, 39, 38, 38, 38, 38, 38, 38, 38, 37, 37, 37, 37 }, { /* Intra matrices */ /* Size 4 */ 100, 95, 72, 60, 95, 76, 65, 58, 72, 65, 57, 54, 60, 58, 54, 51, @@ -9179,9 +9029,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 59, 58, 58, 57, 57, 56, 56, 55, 55, 55, 54, 54, 54, 53, 53, 53, 53, 52, 52, 52, 52, 52, 52, 58, 59, 59, 60, 61, 60, 60, 60, 59, 59, 58, 58, 57, 57, 56, 56, 55, 55, 55, 54, 54, 54, 53, 53, 53, 53, 52, 52, 52, 52, 52, - 52 - } - }, + 52 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -9264,8 +9112,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 37, 37, 37, 37, 37, 37, 42, 43, 44, 45, 45, 45, 45, 44, 44, 43, 43, 42, 42, 42, 41, 41, 40, 40, 39, 39, 39, 39, 38, 38, 38, 38, 37, 37, 37, 37, 37, 37, 42, 43, 44, 45, 45, 45, 45, 44, 44, 43, 43, 42, 42, 42, 41, 41, - 40, 40, 39, 39, 39, 39, 38, 38, 38, 38, 37, 37, 37, 37, 37, 37 - }, + 40, 40, 39, 39, 39, 39, 38, 38, 38, 38, 37, 37, 37, 37, 37, 37 }, { /* Intra matrices */ /* Size 4 */ 97, 74, 71, 63, 74, 67, 65, 61, 71, 65, 58, 56, 63, 61, 56, 52, @@ -9348,9 +9195,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 63, 62, 61, 61, 60, 59, 59, 58, 57, 57, 56, 56, 55, 55, 54, 54, 54, 53, 53, 53, 52, 52, 52, 52, 60, 61, 63, 64, 65, 65, 64, 64, 63, 62, 61, 61, 60, 59, 59, 58, 57, 57, 56, 56, 55, 55, 54, 54, 54, 53, 53, 53, 52, - 52, 52, 52 - } - } }, + 52, 52, 52 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -9433,8 +9278,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 41, 41, 41, 41, 41, 41, 45, 45, 45, 46, 46, 46, 46, 45, 45, 45, 45, 44, 44, 44, 44, 43, 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 45, 45, 45, 46, 46, 46, 46, 45, 45, 45, 45, 44, 44, 44, 44, 43, - 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41 - }, + 43, 43, 43, 42, 42, 42, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41 }, { /* Intra matrices */ /* Size 4 */ 93, 88, 70, 60, 88, 73, 64, 58, 70, 64, 58, 55, 60, 58, 55, 53, @@ -9516,9 +9360,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 54, 54, 54, 54, 54, 54, 54, 59, 59, 60, 60, 61, 61, 60, 60, 60, 59, 59, 58, 58, 58, 57, 57, 57, 56, 56, 56, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 59, 59, 60, 60, 61, 61, 60, 60, 60, 59, 59, 58, 58, 58, 57, - 57, 57, 56, 56, 56, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54 - } - }, + 57, 57, 56, 56, 56, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -9601,8 +9443,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 41, 41, 41, 41, 41, 41, 45, 46, 46, 47, 48, 48, 47, 47, 47, 46, 46, 45, 45, 44, 44, 44, 43, 43, 43, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41, 45, 46, 46, 47, 48, 48, 47, 47, 47, 46, 46, 45, 45, 44, 44, 44, - 43, 43, 43, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41 - }, + 43, 43, 43, 42, 42, 42, 42, 41, 41, 41, 41, 41, 41, 41, 41, 41 }, { /* Intra matrices */ /* Size 4 */ 90, 72, 69, 63, 72, 66, 65, 62, 69, 65, 59, 57, 63, 62, 57, 54, @@ -9684,9 +9525,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 55, 55, 54, 54, 54, 54, 61, 62, 63, 64, 65, 64, 64, 63, 63, 62, 62, 61, 60, 60, 59, 59, 58, 58, 57, 57, 57, 56, 56, 56, 55, 55, 55, 55, 54, 54, 54, 54, 61, 62, 63, 64, 65, 64, 64, 63, 63, 62, 62, 61, 60, 60, 59, 59, - 58, 58, 57, 57, 57, 56, 56, 56, 55, 55, 55, 55, 54, 54, 54, 54 - } - } }, + 58, 58, 57, 57, 57, 56, 56, 56, 55, 55, 55, 55, 54, 54, 54, 54 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -9769,8 +9608,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 45, 45, 45, 45, 45, 45, 48, 48, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 47, 47, 47, 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 48, 48, 49, 49, 49, 49, 49, 49, 49, 48, 48, 48, 48, 47, 47, 47, - 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45 - }, + 47, 47, 46, 46, 46, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45 }, { /* Intra matrices */ /* Size 4 */ 86, 83, 68, 60, 83, 70, 64, 59, 68, 64, 59, 57, 60, 59, 57, 55, @@ -9852,9 +9690,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 56, 56, 56, 56, 56, 56, 59, 60, 60, 61, 61, 61, 61, 61, 60, 60, 60, 59, 59, 59, 58, 58, 58, 58, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 56, 59, 60, 60, 61, 61, 61, 61, 61, 60, 60, 60, 59, 59, 59, 58, 58, - 58, 58, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 56 - } - }, + 58, 58, 57, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 56, 56, 56 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -9937,8 +9773,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 45, 45, 44, 44, 44, 44, 48, 49, 49, 50, 51, 50, 50, 50, 49, 49, 49, 48, 48, 48, 47, 47, 47, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44, 48, 49, 49, 50, 51, 50, 50, 50, 49, 49, 49, 48, 48, 48, 47, 47, - 47, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44 - }, + 47, 46, 46, 46, 46, 46, 45, 45, 45, 45, 45, 45, 44, 44, 44, 44 }, { /* Intra matrices */ /* Size 4 */ 85, 70, 68, 63, 70, 66, 64, 62, 68, 64, 60, 58, 63, 62, 58, 56, @@ -10020,9 +9855,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 57, 56, 56, 56, 56, 56, 61, 62, 63, 64, 65, 64, 64, 63, 63, 62, 62, 62, 61, 61, 60, 60, 59, 59, 59, 58, 58, 58, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 61, 62, 63, 64, 65, 64, 64, 63, 63, 62, 62, 62, 61, 61, 60, 60, - 59, 59, 59, 58, 58, 58, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56 - } - } }, + 59, 59, 59, 58, 58, 58, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -10105,8 +9938,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 50, 50, 50, 50, 50, 50, 52, 52, 52, 52, 53, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 52, 52, 52, 52, 53, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, - 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 - }, + 51, 51, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50, 50 }, { /* Intra matrices */ /* Size 4 */ 80, 77, 67, 61, 77, 68, 63, 60, 67, 63, 60, 58, 61, 60, 58, 57, @@ -10188,9 +10020,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 58, 58, 58, 58, 58, 58, 60, 61, 61, 61, 62, 62, 61, 61, 61, 61, 61, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 60, 61, 61, 61, 62, 62, 61, 61, 61, 61, 61, 60, 60, 60, 60, 59, - 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58 - } - }, + 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58, 58 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -10273,8 +10103,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 49, 49, 49, 49, 49, 49, 52, 52, 52, 53, 53, 53, 53, 53, 53, 52, 52, 52, 51, 51, 51, 51, 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 52, 52, 52, 53, 53, 53, 53, 53, 53, 52, 52, 52, 51, 51, 51, 51, - 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49 - }, + 50, 50, 50, 50, 50, 50, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49 }, { /* Intra matrices */ /* Size 4 */ 79, 68, 67, 63, 68, 65, 64, 62, 67, 64, 61, 60, 63, 62, 60, 58, @@ -10356,9 +10185,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 58, 58, 58, 58, 58, 58, 62, 62, 63, 64, 64, 64, 64, 63, 63, 63, 62, 62, 62, 61, 61, 61, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 62, 62, 63, 64, 64, 64, 64, 63, 63, 63, 62, 62, 62, 61, 61, 61, - 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58 - } - } }, + 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -10441,8 +10268,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 54, 54, 54, 54, 54, 54, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 55, 56, 56, 56, 56, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, - 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54 - }, + 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54, 54 }, { /* Intra matrices */ /* Size 4 */ 74, 72, 66, 62, 72, 67, 63, 61, 66, 63, 61, 60, 62, 61, 60, 59, @@ -10524,9 +10350,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 60, 60, 60, 60, 60, 60, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, - 61, 61, 61, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60 - } - }, + 61, 61, 61, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -10609,8 +10433,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 53, 53, 53, 53, 53, 53, 55, 56, 56, 56, 57, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53, 55, 56, 56, 56, 57, 56, 56, 56, 56, 56, 56, 55, 55, 55, 55, 55, - 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53 - }, + 55, 54, 54, 54, 54, 54, 54, 54, 54, 53, 53, 53, 53, 53, 53, 53 }, { /* Intra matrices */ /* Size 4 */ 74, 67, 66, 63, 67, 65, 64, 63, 66, 64, 62, 61, 63, 63, 61, 60, @@ -10692,9 +10515,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 60, 60, 60, 60, 60, 60, 62, 63, 63, 64, 64, 64, 64, 64, 63, 63, 63, 63, 62, 62, 62, 62, 62, 61, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 60, 60, 62, 63, 63, 64, 64, 64, 64, 64, 63, 63, 63, 63, 62, 62, 62, 62, - 62, 61, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 60, 60 - } - } }, + 62, 61, 61, 61, 61, 61, 61, 61, 60, 60, 60, 60, 60, 60, 60, 60 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -10777,8 +10598,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 - }, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59 }, { /* Intra matrices */ /* Size 4 */ 69, 68, 65, 63, 68, 65, 64, 63, 65, 64, 62, 62, 63, 63, 62, 62, @@ -10860,9 +10680,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 62, - 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62 - } - }, + 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -10945,8 +10763,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 58, 58, 58, 58, 58, 58, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58, 59, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 59, 59, 59, 59, 59, - 59, 59, 59, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58 - }, + 59, 59, 59, 59, 59, 59, 59, 59, 59, 58, 58, 58, 58, 58, 58, 58 }, { /* Intra matrices */ /* Size 4 */ 69, 65, 65, 64, 65, 64, 64, 63, 65, 64, 63, 62, 64, 63, 62, 62, @@ -11028,9 +10845,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 62, 62, 62, 62, 62, 62, 63, 63, 64, 64, 64, 64, 64, 64, 64, 64, 63, 63, 63, 63, 63, 63, 63, 63, 63, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 63, 63, 64, 64, 64, 64, 64, 64, 64, 64, 63, 63, 63, 63, 63, 63, - 63, 63, 63, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62 - } - } }, + 63, 63, 63, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62 } } }, { { /* Luma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -11113,8 +10928,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - }, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }, { /* Intra matrices */ /* Size 4 */ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, @@ -11196,9 +11010,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - } - }, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 } }, { /* Chroma matrices */ { /* Inter matrices */ /* Size 4 */ @@ -11281,8 +11093,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - }, + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 }, { /* Intra matrices */ /* Size 4 */ 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, @@ -11364,9 +11175,7 @@ static uint16_t wt_matrix_ref[NUM_QM_LEVELS][2][2][4 * 4 + 8 * 8 + 16 * 16 + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, - 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 - } - } } + 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64 } } } }; #endif diff --git a/av1/common/reconinter.c b/av1/common/reconinter.c index 4a9a98a38..3c1f37263 100644 --- a/av1/common/reconinter.c +++ b/av1/common/reconinter.c @@ -40,11 +40,11 @@ void av1_highbd_build_inter_predictor( } #endif // CONFIG_AOM_HIGHBITDEPTH -void av1_build_inter_predictor(const uint8_t *src, int src_stride, - uint8_t *dst, int dst_stride, const MV *src_mv, - const struct scale_factors *sf, int w, int h, - int ref, const InterpKernel *kernel, - enum mv_precision precision, int x, int y) { +void av1_build_inter_predictor(const uint8_t *src, int src_stride, uint8_t *dst, + int dst_stride, const MV *src_mv, + const struct scale_factors *sf, int w, int h, + int ref, const InterpKernel *kernel, + enum mv_precision precision, int x, int y) { const int is_q4 = precision == MV_PRECISION_Q4; const MV mv_q4 = { is_q4 ? src_mv->row : src_mv->row * 2, is_q4 ? src_mv->col : src_mv->col * 2 }; @@ -120,8 +120,8 @@ void build_inter_predictors(MACROBLOCKD *xd, int plane, int block, int bw, } } -void av1_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane, int i, - int ir, int ic, int mi_row, int mi_col) { +void av1_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane, int i, int ir, + int ic, int mi_row, int mi_col) { struct macroblockd_plane *const pd = &xd->plane[plane]; MODE_INFO *const mi = xd->mi[0]; const BLOCK_SIZE plane_bsize = get_plane_block_size(mi->mbmi.sb_type, pd); @@ -194,30 +194,30 @@ static void build_inter_predictors_for_planes(MACROBLOCKD *xd, BLOCK_SIZE bsize, } void av1_build_inter_predictors_sby(MACROBLOCKD *xd, int mi_row, int mi_col, - BLOCK_SIZE bsize) { + BLOCK_SIZE bsize) { build_inter_predictors_for_planes(xd, bsize, mi_row, mi_col, 0, 0); } void av1_build_inter_predictors_sbp(MACROBLOCKD *xd, int mi_row, int mi_col, - BLOCK_SIZE bsize, int plane) { + BLOCK_SIZE bsize, int plane) { build_inter_predictors_for_planes(xd, bsize, mi_row, mi_col, plane, plane); } void av1_build_inter_predictors_sbuv(MACROBLOCKD *xd, int mi_row, int mi_col, - BLOCK_SIZE bsize) { + BLOCK_SIZE bsize) { build_inter_predictors_for_planes(xd, bsize, mi_row, mi_col, 1, MAX_MB_PLANE - 1); } void av1_build_inter_predictors_sb(MACROBLOCKD *xd, int mi_row, int mi_col, - BLOCK_SIZE bsize) { + BLOCK_SIZE bsize) { build_inter_predictors_for_planes(xd, bsize, mi_row, mi_col, 0, MAX_MB_PLANE - 1); } void av1_setup_dst_planes(struct macroblockd_plane planes[MAX_MB_PLANE], - const YV12_BUFFER_CONFIG *src, int mi_row, - int mi_col) { + const YV12_BUFFER_CONFIG *src, int mi_row, + int mi_col) { uint8_t *const buffers[MAX_MB_PLANE] = { src->y_buffer, src->u_buffer, src->v_buffer }; const int strides[MAX_MB_PLANE] = { src->y_stride, src->uv_stride, @@ -232,8 +232,8 @@ void av1_setup_dst_planes(struct macroblockd_plane planes[MAX_MB_PLANE], } void av1_setup_pre_planes(MACROBLOCKD *xd, int idx, - const YV12_BUFFER_CONFIG *src, int mi_row, - int mi_col, const struct scale_factors *sf) { + const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col, + const struct scale_factors *sf) { if (src != NULL) { int i; uint8_t *const buffers[MAX_MB_PLANE] = { src->y_buffer, src->u_buffer, diff --git a/av1/common/reconintra.c b/av1/common/reconintra.c index 1ded6bc96..6da28ad19 100644 --- a/av1/common/reconintra.c +++ b/av1/common/reconintra.c @@ -101,8 +101,8 @@ static const uint8_t *const orders[BLOCK_SIZES] = { }; static int av1_has_right(BLOCK_SIZE bsize, int mi_row, int mi_col, - int right_available, TX_SIZE txsz, int y, int x, - int ss_x) { + int right_available, TX_SIZE txsz, int y, int x, + int ss_x) { if (y == 0) { int wl = mi_width_log2_lookup[bsize]; int hl = mi_height_log2_lookup[bsize]; @@ -134,8 +134,8 @@ static int av1_has_right(BLOCK_SIZE bsize, int mi_row, int mi_col, } static int av1_has_bottom(BLOCK_SIZE bsize, int mi_row, int mi_col, - int bottom_available, TX_SIZE txsz, int y, int x, - int ss_y) { + int bottom_available, TX_SIZE txsz, int y, int x, + int ss_y) { if (x == 0) { int wl = mi_width_log2_lookup[bsize]; int hl = mi_height_log2_lookup[bsize]; @@ -676,9 +676,9 @@ static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref, } void av1_predict_intra_block(const MACROBLOCKD *xd, int bwl_in, int bhl_in, - TX_SIZE tx_size, PREDICTION_MODE mode, - const uint8_t *ref, int ref_stride, uint8_t *dst, - int dst_stride, int aoff, int loff, int plane) { + TX_SIZE tx_size, PREDICTION_MODE mode, + const uint8_t *ref, int ref_stride, uint8_t *dst, + int dst_stride, int aoff, int loff, int plane) { const int txw = (1 << tx_size); const int have_top = loff || xd->up_available; const int have_left = aoff || xd->left_available; @@ -694,10 +694,10 @@ void av1_predict_intra_block(const MACROBLOCKD *xd, int bwl_in, int bhl_in, const int right_available = mi_col + (bw >> !pd->subsampling_x) < xd->tile.mi_col_end; const int have_right = av1_has_right(bsize, mi_row, mi_col, right_available, - tx_size, loff, aoff, pd->subsampling_x); + tx_size, loff, aoff, pd->subsampling_x); const int have_bottom = av1_has_bottom(bsize, mi_row, mi_col, xd->mb_to_bottom_edge > 0, tx_size, - loff, aoff, pd->subsampling_y); + loff, aoff, pd->subsampling_y); const int wpx = 4 * bw; const int hpx = 4 * bh; const int txpx = 4 * txw; diff --git a/av1/common/scale.c b/av1/common/scale.c index b91c81d76..bc202e96a 100644 --- a/av1/common/scale.c +++ b/av1/common/scale.c @@ -45,11 +45,11 @@ MV32 av1_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf) { #if CONFIG_AOM_HIGHBITDEPTH void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w, - int other_h, int this_w, int this_h, - int use_highbd) { + int other_h, int this_w, int this_h, + int use_highbd) { #else void av1_setup_scale_factors_for_frame(struct scale_factors *sf, int other_w, - int other_h, int this_w, int this_h) { + int other_h, int this_w, int this_h) { #endif if (!valid_ref_frame_size(other_w, other_h, this_w, this_h)) { sf->x_scale_fp = REF_INVALID_SCALE; diff --git a/av1/common/scan.c b/av1/common/scan.c index aac80d90f..0d1eb0abc 100644 --- a/av1/common/scan.c +++ b/av1/common/scan.c @@ -693,10 +693,8 @@ DECLARE_ALIGNED(16, static const int16_t, av1_default_iscan_32x32[1024]) = { const scan_order av1_default_scan_orders[TX_SIZES] = { { default_scan_4x4, av1_default_iscan_4x4, default_scan_4x4_neighbors }, { default_scan_8x8, av1_default_iscan_8x8, default_scan_8x8_neighbors }, - { default_scan_16x16, av1_default_iscan_16x16, - default_scan_16x16_neighbors }, - { default_scan_32x32, av1_default_iscan_32x32, - default_scan_32x32_neighbors }, + { default_scan_16x16, av1_default_iscan_16x16, default_scan_16x16_neighbors }, + { default_scan_32x32, av1_default_iscan_32x32, default_scan_32x32_neighbors }, }; const scan_order av1_scan_orders[TX_SIZES][TX_TYPES] = { diff --git a/av1/common/seg_common.c b/av1/common/seg_common.c index 369a3e1d5..b19ef2419 100644 --- a/av1/common/seg_common.c +++ b/av1/common/seg_common.c @@ -32,7 +32,7 @@ void av1_clearall_segfeatures(struct segmentation *seg) { } void av1_enable_segfeature(struct segmentation *seg, int segment_id, - SEG_LVL_FEATURES feature_id) { + SEG_LVL_FEATURES feature_id) { seg->feature_mask[segment_id] |= 1 << feature_id; } @@ -45,7 +45,7 @@ int av1_is_segfeature_signed(SEG_LVL_FEATURES feature_id) { } void av1_set_segdata(struct segmentation *seg, int segment_id, - SEG_LVL_FEATURES feature_id, int seg_data) { + SEG_LVL_FEATURES feature_id, int seg_data) { assert(seg_data <= seg_feature_data_max[feature_id]); if (seg_data < 0) { assert(seg_feature_data_signed[feature_id]); diff --git a/av1/common/thread_common.c b/av1/common/thread_common.c index ede8d3cde..eabd5022a 100644 --- a/av1/common/thread_common.c +++ b/av1/common/thread_common.c @@ -131,7 +131,7 @@ static INLINE void thread_loop_filter_rows( break; case LF_PATH_SLOW: av1_filter_block_plane_non420(cm, &planes[plane], mi + mi_col, - mi_row, mi_col); + mi_row, mi_col); break; } } @@ -210,10 +210,10 @@ static void loop_filter_rows_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, } void av1_loop_filter_frame_mt(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, - struct macroblockd_plane planes[MAX_MB_PLANE], - int frame_filter_level, int y_only, - int partial_frame, AVxWorker *workers, - int num_workers, AV1LfSync *lf_sync) { + struct macroblockd_plane planes[MAX_MB_PLANE], + int frame_filter_level, int y_only, + int partial_frame, AVxWorker *workers, + int num_workers, AV1LfSync *lf_sync) { int start_mi_row, end_mi_row, mi_rows_to_filter; if (!frame_filter_level) return; @@ -248,7 +248,7 @@ static INLINE int get_sync_range(int width) { // Allocate memory for lf row synchronization void av1_loop_filter_alloc(AV1LfSync *lf_sync, AV1_COMMON *cm, int rows, - int width, int num_workers) { + int width, int num_workers) { lf_sync->rows = rows; #if CONFIG_MULTITHREAD { @@ -312,7 +312,7 @@ void av1_loop_filter_dealloc(AV1LfSync *lf_sync) { // Accumulate frame counts. void av1_accumulate_frame_counts(AV1_COMMON *cm, FRAME_COUNTS *counts, - int is_dec) { + int is_dec) { int i, j, k, l, m; for (i = 0; i < BLOCK_SIZE_GROUPS; i++) @@ -373,8 +373,7 @@ void av1_accumulate_frame_counts(AV1_COMMON *cm, FRAME_COUNTS *counts, cm->counts.refmv_mode[i][j] += counts->refmv_mode[i][j]; for (i = 0; i < DRL_MODE_CONTEXTS; ++i) - for (j = 0; j < 2; ++j) - cm->counts.drl_mode[i][j] += counts->drl_mode[i][j]; + for (j = 0; j < 2; ++j) cm->counts.drl_mode[i][j] += counts->drl_mode[i][j]; #endif for (i = 0; i < INTER_MODE_CONTEXTS; i++) @@ -429,8 +428,7 @@ void av1_accumulate_frame_counts(AV1_COMMON *cm, FRAME_COUNTS *counts, comps->hp[i] += comps_t->hp[i]; } - for (i = 0; i < MV_CLASSES; i++) - comps->classes[i] += comps_t->classes[i]; + for (i = 0; i < MV_CLASSES; i++) comps->classes[i] += comps_t->classes[i]; for (i = 0; i < CLASS0_SIZE; i++) { comps->class0[i] += comps_t->class0[i]; @@ -439,11 +437,9 @@ void av1_accumulate_frame_counts(AV1_COMMON *cm, FRAME_COUNTS *counts, } for (i = 0; i < MV_OFFSET_BITS; i++) - for (j = 0; j < 2; j++) - comps->bits[i][j] += comps_t->bits[i][j]; + for (j = 0; j < 2; j++) comps->bits[i][j] += comps_t->bits[i][j]; - for (i = 0; i < MV_FP_SIZE; i++) - comps->fp[i] += comps_t->fp[i]; + for (i = 0; i < MV_FP_SIZE; i++) comps->fp[i] += comps_t->fp[i]; } } #else diff --git a/av1/common/tile_common.c b/av1/common/tile_common.c index d69689026..de8b88f65 100644 --- a/av1/common/tile_common.c +++ b/av1/common/tile_common.c @@ -50,7 +50,7 @@ static int get_max_log2_tile_cols(const int sb64_cols) { } void av1_get_tile_n_bits(int mi_cols, int *min_log2_tile_cols, - int *max_log2_tile_cols) { + int *max_log2_tile_cols) { const int sb64_cols = mi_cols_aligned_to_sb(mi_cols) >> MI_BLOCK_SIZE_LOG2; *min_log2_tile_cols = get_min_log2_tile_cols(sb64_cols); *max_log2_tile_cols = get_max_log2_tile_cols(sb64_cols); diff --git a/av1/common/x86/av1_fwd_txfm_sse2.c b/av1/common/x86/av1_fwd_txfm_sse2.c index c4d0b0c03..081fe0837 100644 --- a/av1/common/x86/av1_fwd_txfm_sse2.c +++ b/av1/common/x86/av1_fwd_txfm_sse2.c @@ -85,7 +85,7 @@ void av1_fdct8x8_1_sse2(const int16_t *input, tran_low_t *output, int stride) { } void av1_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, - int stride) { + int stride) { __m128i in0, in1, in2, in3; __m128i u0, u1; __m128i sum = _mm_setzero_si128(); @@ -154,7 +154,7 @@ void av1_fdct16x16_1_sse2(const int16_t *input, tran_low_t *output, } void av1_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output, - int stride) { + int stride) { __m128i in0, in1, in2, in3; __m128i u0, u1; __m128i sum = _mm_setzero_si128(); diff --git a/av1/common/x86/av1_inv_txfm_sse2.c b/av1/common/x86/av1_inv_txfm_sse2.c index e8c50723f..ef4a6ebc2 100644 --- a/av1/common/x86/av1_inv_txfm_sse2.c +++ b/av1/common/x86/av1_inv_txfm_sse2.c @@ -1160,7 +1160,7 @@ void av1_idct8x8_12_add_sse2(const int16_t *input, uint8_t *dest, int stride) { } void av1_idct16x16_256_add_sse2(const int16_t *input, uint8_t *dest, - int stride) { + int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); const __m128i zero = _mm_setzero_si128(); @@ -1284,8 +1284,7 @@ void av1_idct16x16_256_add_sse2(const int16_t *input, uint8_t *dest, } } -void av1_idct16x16_1_add_sse2(const int16_t *input, uint8_t *dest, - int stride) { +void av1_idct16x16_1_add_sse2(const int16_t *input, uint8_t *dest, int stride) { __m128i dc_value; const __m128i zero = _mm_setzero_si128(); int a, i; @@ -2144,7 +2143,7 @@ void av1_iadst16_sse2(__m128i *in0, __m128i *in1) { } void av1_idct16x16_10_add_sse2(const int16_t *input, uint8_t *dest, - int stride) { + int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); const __m128i zero = _mm_setzero_si128(); @@ -3018,7 +3017,7 @@ void av1_idct16x16_10_add_sse2(const int16_t *input, uint8_t *dest, // Only upper-left 8x8 has non-zero coeff void av1_idct32x32_34_add_sse2(const int16_t *input, uint8_t *dest, - int stride) { + int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); @@ -3175,7 +3174,7 @@ void av1_idct32x32_34_add_sse2(const int16_t *input, uint8_t *dest, } void av1_idct32x32_1024_add_sse2(const int16_t *input, uint8_t *dest, - int stride) { + int stride) { const __m128i rounding = _mm_set1_epi32(DCT_CONST_ROUNDING); const __m128i final_rounding = _mm_set1_epi16(1 << 5); const __m128i zero = _mm_setzero_si128(); @@ -3448,8 +3447,7 @@ void av1_idct32x32_1024_add_sse2(const int16_t *input, uint8_t *dest, } } -void av1_idct32x32_1_add_sse2(const int16_t *input, uint8_t *dest, - int stride) { +void av1_idct32x32_1_add_sse2(const int16_t *input, uint8_t *dest, int stride) { __m128i dc_value; const __m128i zero = _mm_setzero_si128(); int a, i; @@ -3484,7 +3482,7 @@ static INLINE __m128i clamp_high_sse2(__m128i value, int bd) { } void av1_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[4 * 4]; tran_low_t *outptr = out; int i, j; @@ -3599,7 +3597,7 @@ void av1_highbd_idct4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[8 * 8]; tran_low_t *outptr = out; int i, j, test; @@ -3699,7 +3697,7 @@ void av1_highbd_idct8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct8x8_10_add_sse2(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[8 * 8] = { 0 }; tran_low_t *outptr = out; int i, j, test; @@ -3802,7 +3800,7 @@ void av1_highbd_idct8x8_10_add_sse2(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[16 * 16]; tran_low_t *outptr = out; int i, j, test; @@ -3915,7 +3913,7 @@ void av1_highbd_idct16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest8, } void av1_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8, - int stride, int bd) { + int stride, int bd) { tran_low_t out[16 * 16] = { 0 }; tran_low_t *outptr = out; int i, j, test; diff --git a/av1/common/x86/idct_intrin_sse2.c b/av1/common/x86/idct_intrin_sse2.c index 2247b67fa..964d3b914 100644 --- a/av1/common/x86/idct_intrin_sse2.c +++ b/av1/common/x86/idct_intrin_sse2.c @@ -14,7 +14,7 @@ #include "aom_ports/mem.h" void av1_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, - int tx_type) { + int tx_type) { __m128i in[2]; const __m128i zero = _mm_setzero_si128(); const __m128i eight = _mm_set1_epi16(8); @@ -77,7 +77,7 @@ void av1_iht4x4_16_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, } void av1_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, - int tx_type) { + int tx_type) { __m128i in[8]; const __m128i zero = _mm_setzero_si128(); const __m128i final_rounding = _mm_set1_epi16(1 << 4); @@ -142,7 +142,7 @@ void av1_iht8x8_64_add_sse2(const tran_low_t *input, uint8_t *dest, int stride, } void av1_iht16x16_256_add_sse2(const tran_low_t *input, uint8_t *dest, - int stride, int tx_type) { + int stride, int tx_type) { __m128i in0[16], in1[16]; load_buffer_8x16(input, in0); diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c index ff62c299c..2128cbcc9 100644 --- a/av1/decoder/decodeframe.c +++ b/av1/decoder/decodeframe.c @@ -238,19 +238,19 @@ static void inverse_transform_block_inter(MACROBLOCKD *xd, int plane, switch (tx_size) { case TX_4X4: av1_highbd_inv_txfm_add_4x4(dqcoeff, dst, stride, eob, xd->bd, - tx_type, xd->lossless[seg_id]); + tx_type, xd->lossless[seg_id]); break; case TX_8X8: av1_highbd_inv_txfm_add_8x8(dqcoeff, dst, stride, eob, xd->bd, - tx_type); + tx_type); break; case TX_16X16: av1_highbd_inv_txfm_add_16x16(dqcoeff, dst, stride, eob, xd->bd, - tx_type); + tx_type); break; case TX_32X32: av1_highbd_inv_txfm_add_32x32(dqcoeff, dst, stride, eob, xd->bd, - tx_type); + tx_type); break; default: assert(0 && "Invalid transform size"); return; } @@ -259,7 +259,7 @@ static void inverse_transform_block_inter(MACROBLOCKD *xd, int plane, switch (tx_size) { case TX_4X4: av1_inv_txfm_add_4x4(dqcoeff, dst, stride, eob, tx_type, - xd->lossless[seg_id]); + xd->lossless[seg_id]); break; case TX_8X8: av1_inv_txfm_add_8x8(dqcoeff, dst, stride, eob, tx_type); @@ -302,19 +302,19 @@ static void inverse_transform_block_intra(MACROBLOCKD *xd, int plane, switch (tx_size) { case TX_4X4: av1_highbd_inv_txfm_add_4x4(dqcoeff, dst, stride, eob, xd->bd, - tx_type, xd->lossless[seg_id]); + tx_type, xd->lossless[seg_id]); break; case TX_8X8: av1_highbd_inv_txfm_add_8x8(dqcoeff, dst, stride, eob, xd->bd, - tx_type); + tx_type); break; case TX_16X16: av1_highbd_inv_txfm_add_16x16(dqcoeff, dst, stride, eob, xd->bd, - tx_type); + tx_type); break; case TX_32X32: av1_highbd_inv_txfm_add_32x32(dqcoeff, dst, stride, eob, xd->bd, - tx_type); + tx_type); break; default: assert(0 && "Invalid transform size"); return; } @@ -323,7 +323,7 @@ static void inverse_transform_block_intra(MACROBLOCKD *xd, int plane, switch (tx_size) { case TX_4X4: av1_inv_txfm_add_4x4(dqcoeff, dst, stride, eob, tx_type, - xd->lossless[seg_id]); + xd->lossless[seg_id]); break; case TX_8X8: av1_inv_txfm_add_8x8(dqcoeff, dst, stride, eob, tx_type); @@ -369,14 +369,13 @@ static void predict_and_reconstruct_intra_block(MACROBLOCKD *const xd, if (plane == 0) mode = xd->mi[0]->bmi[(row << 1) + col].as_mode; av1_predict_intra_block(xd, pd->n4_wl, pd->n4_hl, tx_size, mode, dst, - pd->dst.stride, dst, pd->dst.stride, col, row, - plane); + pd->dst.stride, dst, pd->dst.stride, col, row, plane); if (!mbmi->skip) { TX_TYPE tx_type = get_tx_type(plane_type, xd, block_idx); const scan_order *sc = get_scan(tx_size, tx_type); - const int eob = av1_decode_block_tokens(xd, plane, sc, col, row, tx_size, - r, mbmi->segment_id); + const int eob = av1_decode_block_tokens(xd, plane, sc, col, row, tx_size, r, + mbmi->segment_id); inverse_transform_block_intra(xd, plane, tx_type, tx_size, dst, pd->dst.stride, eob); } @@ -391,7 +390,7 @@ static int reconstruct_inter_block(MACROBLOCKD *const xd, aom_reader *r, TX_TYPE tx_type = get_tx_type(plane_type, xd, block_idx); const scan_order *sc = get_scan(tx_size, tx_type); const int eob = av1_decode_block_tokens(xd, plane, sc, col, row, tx_size, r, - mbmi->segment_id); + mbmi->segment_id); inverse_transform_block_inter( xd, plane, tx_size, &pd->dst.buf[4 * row * pd->dst.stride + 4 * col], @@ -629,7 +628,7 @@ static void dec_build_inter_predictors( // pixels of each superblock row can be changed by next superblock row. if (cm->frame_parallel_decode) av1_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, - AOMMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); + AOMMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); // Skip border extension if block is inside the frame. if (x0 < 0 || x0 > frame_width - 1 || x1 < 0 || x1 > frame_width - 1 || @@ -655,7 +654,7 @@ static void dec_build_inter_predictors( if (cm->frame_parallel_decode) { const int y1 = (y0_16 + (h - 1) * ys) >> SUBPEL_BITS; av1_frameworker_wait(pbi->frame_worker_owner, ref_frame_buf, - AOMMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); + AOMMAX(0, (y1 + 7)) << (plane == 0 ? 0 : 1)); } } #if CONFIG_AOM_HIGHBITDEPTH @@ -729,8 +728,8 @@ static void dec_build_inter_predictors_sb(AV1Decoder *const pbi, } } -static INLINE TX_SIZE - dec_get_uv_tx_size(const MB_MODE_INFO *mbmi, int n4_wl, int n4_hl) { +static INLINE TX_SIZE dec_get_uv_tx_size(const MB_MODE_INFO *mbmi, int n4_wl, + int n4_hl) { // get minimum log2 num4x4s dimension const int x = AOMMIN(n4_wl, n4_hl); return AOMMIN(mbmi->tx_size, x); @@ -988,10 +987,11 @@ static void decode_partition(AV1Decoder *const pbi, MACROBLOCKD *const xd, #if DERING_REFINEMENT if (bsize == BLOCK_64X64) { if (cm->dering_level != 0 && !sb_all_skip(cm, mi_row, mi_col)) { - cm->mi_grid_visible[mi_row*cm->mi_stride + mi_col]->mbmi.dering_gain = + cm->mi_grid_visible[mi_row * cm->mi_stride + mi_col]->mbmi.dering_gain = aom_read_literal(r, DERING_REFINEMENT_BITS); } else { - cm->mi_grid_visible[mi_row*cm->mi_stride + mi_col]->mbmi.dering_gain = 0; + cm->mi_grid_visible[mi_row * cm->mi_stride + mi_col]->mbmi.dering_gain = + 0; } } #endif @@ -1133,7 +1133,7 @@ static void setup_clpf(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) { #if CONFIG_DERING static void setup_dering(AV1_COMMON *cm, struct aom_read_bit_buffer *rb) { - cm->dering_level = aom_rb_read_literal(rb, DERING_LEVEL_BITS); + cm->dering_level = aom_rb_read_literal(rb, DERING_LEVEL_BITS); } #endif // CONFIG_DERING @@ -1203,8 +1203,7 @@ static void setup_segmentation_dequant(AV1_COMMON *const cm) { const int qindex = cm->base_qindex; // When segmentation is disabled, only the first value is used. The // remaining are don't cares. - cm->y_dequant[0][0] = - av1_dc_quant(qindex, cm->y_dc_delta_q, cm->bit_depth); + cm->y_dequant[0][0] = av1_dc_quant(qindex, cm->y_dc_delta_q, cm->bit_depth); cm->y_dequant[0][1] = av1_ac_quant(qindex, 0, cm->bit_depth); cm->uv_dequant[0][0] = av1_dc_quant(qindex, cm->uv_dc_delta_q, cm->bit_depth); @@ -1528,7 +1527,7 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data, // Be sure to sync as we might be resuming after a failed frame decode. winterface->sync(&pbi->lf_worker); av1_loop_filter_data_reset(lf_data, get_frame_new_buffer(cm), cm, - pbi->mb.plane); + pbi->mb.plane); } assert(tile_rows <= 4); @@ -2276,7 +2275,7 @@ static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data, #ifdef NDEBUG #define debug_check_frame_counts(cm) (void)0 -#else // !NDEBUG +#else // !NDEBUG // Counts should only be incremented when frame_parallel_decoding_mode and // error_resilient_mode are disabled. static void debug_check_frame_counts(const AV1_COMMON *const cm) { @@ -2308,10 +2307,10 @@ static void debug_check_frame_counts(const AV1_COMMON *const cm) { assert(!memcmp(&cm->counts.tx, &zero_counts.tx, sizeof(cm->counts.tx))); assert(!memcmp(cm->counts.skip, zero_counts.skip, sizeof(cm->counts.skip))); #if CONFIG_REF_MV - assert(!memcmp(&cm->counts.mv[0], &zero_counts.mv[0], - sizeof(cm->counts.mv[0]))); - assert(!memcmp(&cm->counts.mv[1], &zero_counts.mv[1], - sizeof(cm->counts.mv[0]))); + assert( + !memcmp(&cm->counts.mv[0], &zero_counts.mv[0], sizeof(cm->counts.mv[0]))); + assert( + !memcmp(&cm->counts.mv[1], &zero_counts.mv[1], sizeof(cm->counts.mv[0]))); #else assert(!memcmp(&cm->counts.mv, &zero_counts.mv, sizeof(cm->counts.mv))); #endif @@ -2349,7 +2348,7 @@ int av1_read_sync_code(struct aom_read_bit_buffer *const rb) { } void av1_read_frame_size(struct aom_read_bit_buffer *rb, int *width, - int *height) { + int *height) { *width = aom_rb_read_literal(rb, 16) + 1; *height = aom_rb_read_literal(rb, 16) + 1; } @@ -2362,7 +2361,7 @@ BITSTREAM_PROFILE av1_read_profile(struct aom_read_bit_buffer *rb) { } void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data, - const uint8_t *data_end, const uint8_t **p_data_end) { + const uint8_t *data_end, const uint8_t **p_data_end) { AV1_COMMON *const cm = &pbi->common; MACROBLOCKD *const xd = &pbi->mb; struct aom_read_bit_buffer rb; @@ -2436,9 +2435,9 @@ void av1_decode_frame(AV1Decoder *pbi, const uint8_t *data, if (!cm->skip_loop_filter) { // If multiple threads are used to decode tiles, then we use those // threads to do parallel loopfiltering. - av1_loop_filter_frame_mt(new_fb, cm, pbi->mb.plane, - cm->lf.filter_level, 0, 0, pbi->tile_workers, - pbi->num_tile_workers, &pbi->lf_row_sync); + av1_loop_filter_frame_mt(new_fb, cm, pbi->mb.plane, cm->lf.filter_level, + 0, 0, pbi->tile_workers, pbi->num_tile_workers, + &pbi->lf_row_sync); } } else { aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME, diff --git a/av1/decoder/decodemv.c b/av1/decoder/decodemv.c index 580e93775..33feaed1a 100644 --- a/av1/decoder/decodemv.c +++ b/av1/decoder/decodemv.c @@ -56,44 +56,34 @@ static PREDICTION_MODE read_inter_mode(AV1_COMMON *cm, MACROBLOCKD *xd, aom_prob mode_prob = cm->fc->newmv_prob[mode_ctx]; if (aom_read(r, mode_prob) == 0) { - if (counts) - ++counts->newmv_mode[mode_ctx][0]; + if (counts) ++counts->newmv_mode[mode_ctx][0]; return NEWMV; } - if (counts) - ++counts->newmv_mode[mode_ctx][1]; + if (counts) ++counts->newmv_mode[mode_ctx][1]; - if (ctx & (1 << ALL_ZERO_FLAG_OFFSET)) - return ZEROMV; + if (ctx & (1 << ALL_ZERO_FLAG_OFFSET)) return ZEROMV; mode_ctx = (ctx >> ZEROMV_OFFSET) & ZEROMV_CTX_MASK; mode_prob = cm->fc->zeromv_prob[mode_ctx]; if (aom_read(r, mode_prob) == 0) { - if (counts) - ++counts->zeromv_mode[mode_ctx][0]; + if (counts) ++counts->zeromv_mode[mode_ctx][0]; return ZEROMV; } - if (counts) - ++counts->zeromv_mode[mode_ctx][1]; + if (counts) ++counts->zeromv_mode[mode_ctx][1]; mode_ctx = (ctx >> REFMV_OFFSET) & REFMV_CTX_MASK; - if (ctx & (1 << SKIP_NEARESTMV_OFFSET)) - mode_ctx = 6; - if (ctx & (1 << SKIP_NEARMV_OFFSET)) - mode_ctx = 7; - if (ctx & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) - mode_ctx = 8; + if (ctx & (1 << SKIP_NEARESTMV_OFFSET)) mode_ctx = 6; + if (ctx & (1 << SKIP_NEARMV_OFFSET)) mode_ctx = 7; + if (ctx & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) mode_ctx = 8; mode_prob = cm->fc->refmv_prob[mode_ctx]; if (aom_read(r, mode_prob) == 0) { - if (counts) - ++counts->refmv_mode[mode_ctx][0]; + if (counts) ++counts->refmv_mode[mode_ctx][0]; return NEARESTMV; } else { - if (counts) - ++counts->refmv_mode[mode_ctx][1]; + if (counts) ++counts->refmv_mode[mode_ctx][1]; return NEARMV; } @@ -110,10 +100,8 @@ static PREDICTION_MODE read_inter_mode(AV1_COMMON *cm, MACROBLOCKD *xd, } #if CONFIG_REF_MV -static void read_drl_idx(const AV1_COMMON *cm, - MACROBLOCKD *xd, - MB_MODE_INFO *mbmi, - aom_reader *r) { +static void read_drl_idx(const AV1_COMMON *cm, MACROBLOCKD *xd, + MB_MODE_INFO *mbmi, aom_reader *r) { uint8_t ref_frame_type = av1_ref_frame_type(mbmi->ref_frame); mbmi->ref_mv_idx = 0; @@ -125,13 +113,11 @@ static void read_drl_idx(const AV1_COMMON *cm, aom_prob drl_prob = cm->fc->drl_prob[drl_ctx]; if (!aom_read(r, drl_prob)) { mbmi->ref_mv_idx = idx; - if (xd->counts) - ++xd->counts->drl_mode[drl_ctx][0]; + if (xd->counts) ++xd->counts->drl_mode[drl_ctx][0]; return; } mbmi->ref_mv_idx = idx + 1; - if (xd->counts) - ++xd->counts->drl_mode[drl_ctx][1]; + if (xd->counts) ++xd->counts->drl_mode[drl_ctx][1]; } } } @@ -147,13 +133,11 @@ static void read_drl_idx(const AV1_COMMON *cm, aom_prob drl_prob = cm->fc->drl_prob[drl_ctx]; if (!aom_read(r, drl_prob)) { mbmi->ref_mv_idx = idx - 1; - if (xd->counts) - ++xd->counts->drl_mode[drl_ctx][0]; + if (xd->counts) ++xd->counts->drl_mode[drl_ctx][0]; return; } mbmi->ref_mv_idx = idx; - if (xd->counts) - ++xd->counts->drl_mode[drl_ctx][1]; + if (xd->counts) ++xd->counts->drl_mode[drl_ctx][1]; } } } @@ -559,8 +543,8 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd, #if CONFIG_REF_MV MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi; BLOCK_SIZE bsize = mbmi->sb_type; - int_mv *pred_mv = (bsize >= BLOCK_8X8) ? - mbmi->pred_mv : xd->mi[0]->bmi[block].pred_mv; + int_mv *pred_mv = + (bsize >= BLOCK_8X8) ? mbmi->pred_mv : xd->mi[0]->bmi[block].pred_mv; #else (void)block; #endif @@ -595,8 +579,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd, if (is_compound) mv[1].as_int = nearest_mv[1].as_int; #if CONFIG_REF_MV pred_mv[0].as_int = nearest_mv[0].as_int; - if (is_compound) - pred_mv[1].as_int = nearest_mv[1].as_int; + if (is_compound) pred_mv[1].as_int = nearest_mv[1].as_int; #endif break; } @@ -605,8 +588,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd, if (is_compound) mv[1].as_int = near_mv[1].as_int; #if CONFIG_REF_MV pred_mv[0].as_int = near_mv[0].as_int; - if (is_compound) - pred_mv[1].as_int = near_mv[1].as_int; + if (is_compound) pred_mv[1].as_int = near_mv[1].as_int; #endif break; } @@ -615,8 +597,7 @@ static INLINE int assign_mv(AV1_COMMON *cm, MACROBLOCKD *xd, if (is_compound) mv[1].as_int = 0; #if CONFIG_REF_MV pred_mv[0].as_int = 0; - if (is_compound) - pred_mv[1].as_int = 0; + if (is_compound) pred_mv[1].as_int = 0; #endif break; } @@ -641,7 +622,7 @@ static int read_is_inter_block(AV1_COMMON *const cm, MACROBLOCKD *const xd, static void fpm_sync(void *const data, int mi_row) { AV1Decoder *const pbi = (AV1Decoder *)data; av1_frameworker_wait(pbi->frame_worker_owner, pbi->common.prev_frame, - mi_row << MI_BLOCK_SIZE_LOG2); + mi_row << MI_BLOCK_SIZE_LOG2); } static void read_inter_block_mode_info(AV1Decoder *const pbi, @@ -676,20 +657,17 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi, for (ref_frame = LAST_FRAME; ref_frame <= ALTREF_FRAME; ++ref_frame) { av1_find_mv_refs(cm, xd, mi, ref_frame, #if CONFIG_REF_MV - &xd->ref_mv_count[ref_frame], - xd->ref_mv_stack[ref_frame], + &xd->ref_mv_count[ref_frame], xd->ref_mv_stack[ref_frame], #endif - ref_mvs[ref_frame], mi_row, mi_col, - fpm_sync, (void *)pbi, inter_mode_ctx); + ref_mvs[ref_frame], mi_row, mi_col, fpm_sync, (void *)pbi, + inter_mode_ctx); } #if CONFIG_REF_MV for (; ref_frame < MODE_CTX_REF_FRAMES; ++ref_frame) { - av1_find_mv_refs(cm, xd, mi, ref_frame, - &xd->ref_mv_count[ref_frame], - xd->ref_mv_stack[ref_frame], - ref_mvs[ref_frame], mi_row, mi_col, - fpm_sync, (void *)pbi, inter_mode_ctx); + av1_find_mv_refs(cm, xd, mi, ref_frame, &xd->ref_mv_count[ref_frame], + xd->ref_mv_stack[ref_frame], ref_mvs[ref_frame], mi_row, + mi_col, fpm_sync, (void *)pbi, inter_mode_ctx); if (xd->ref_mv_count[ref_frame] < 2) { MV_REFERENCE_FRAME rf[2]; @@ -704,8 +682,8 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi, inter_mode_ctx[ref_frame] &= ~(1 << ALL_ZERO_FLAG_OFFSET); } } - mode_ctx = av1_mode_context_analyzer(inter_mode_ctx, - mbmi->ref_frame, bsize, -1); + mode_ctx = + av1_mode_context_analyzer(inter_mode_ctx, mbmi->ref_frame, bsize, -1); mbmi->ref_mv_idx = 0; #else mode_ctx = inter_mode_ctx[mbmi->ref_frame[0]]; @@ -731,7 +709,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi, if (bsize < BLOCK_8X8 || mbmi->mode != ZEROMV) { for (ref = 0; ref < 1 + is_compound; ++ref) { av1_find_best_ref_mvs(allow_hp, ref_mvs[mbmi->ref_frame[ref]], - &nearestmv[ref], &nearmv[ref]); + &nearestmv[ref], &nearmv[ref]); } } @@ -752,8 +730,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi, nearestmv[0] = xd->ref_mv_stack[ref_frame_type][0].this_mv; nearestmv[1] = xd->ref_mv_stack[ref_frame_type][0].comp_mv; - for (i = 0; i < 2; ++i) - lower_mv_precision(&nearestmv[i].as_mv, allow_hp); + for (i = 0; i < 2; ++i) lower_mv_precision(&nearestmv[i].as_mv, allow_hp); } if (xd->ref_mv_count[ref_frame_type] > 1) { @@ -787,8 +764,7 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi, int_mv block[2]; const int j = idy * 2 + idx; #if CONFIG_REF_MV - mode_ctx = av1_mode_context_analyzer(inter_mode_ctx, - mbmi->ref_frame, + mode_ctx = av1_mode_context_analyzer(inter_mode_ctx, mbmi->ref_frame, bsize, j); #endif b_mode = read_inter_mode(cm, xd, r, mode_ctx); @@ -796,8 +772,8 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi, if (b_mode == NEARESTMV || b_mode == NEARMV) { for (ref = 0; ref < 1 + is_compound; ++ref) av1_append_sub8x8_mvs_for_idx(cm, xd, j, ref, mi_row, mi_col, - &nearest_sub8x8[ref], - &near_sub8x8[ref]); + &nearest_sub8x8[ref], + &near_sub8x8[ref]); } if (!assign_mv(cm, xd, b_mode, j, block, nearestmv, nearest_sub8x8, @@ -828,9 +804,10 @@ static void read_inter_block_mode_info(AV1Decoder *const pbi, int_mv ref_mv = nearestmv[ref]; uint8_t ref_frame_type = av1_ref_frame_type(mbmi->ref_frame); if (xd->ref_mv_count[ref_frame_type] > 1) { - ref_mv = (ref == 0) ? - xd->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx].this_mv : - xd->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx].comp_mv; + ref_mv = + (ref == 0) + ? xd->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx].this_mv + : xd->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx].comp_mv; clamp_mv_ref(&ref_mv.as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); lower_mv_precision(&ref_mv.as_mv, allow_hp); } @@ -883,7 +860,7 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi, } void av1_read_mode_info(AV1Decoder *const pbi, MACROBLOCKD *xd, int mi_row, - int mi_col, aom_reader *r, int x_mis, int y_mis) { + int mi_col, aom_reader *r, int x_mis, int y_mis) { AV1_COMMON *const cm = &pbi->common; MODE_INFO *const mi = xd->mi[0]; MV_REF *frame_mvs = cm->cur_frame->mvs + mi_row * cm->mi_cols + mi_col; diff --git a/av1/decoder/decoder.c b/av1/decoder/decoder.c index 0291a7a51..e798c1ac3 100644 --- a/av1/decoder/decoder.c +++ b/av1/decoder/decoder.c @@ -151,8 +151,8 @@ static int equal_dimensions(const YV12_BUFFER_CONFIG *a, } aom_codec_err_t av1_copy_reference_dec(AV1Decoder *pbi, - AOM_REFFRAME ref_frame_flag, - YV12_BUFFER_CONFIG *sd) { + AOM_REFFRAME ref_frame_flag, + YV12_BUFFER_CONFIG *sd) { AV1_COMMON *cm = &pbi->common; /* TODO(jkoleszar): The decoder doesn't have any real knowledge of what the @@ -180,8 +180,8 @@ aom_codec_err_t av1_copy_reference_dec(AV1Decoder *pbi, } aom_codec_err_t av1_set_reference_dec(AV1_COMMON *cm, - AOM_REFFRAME ref_frame_flag, - YV12_BUFFER_CONFIG *sd) { + AOM_REFFRAME ref_frame_flag, + YV12_BUFFER_CONFIG *sd) { RefBuffer *ref_buf = NULL; RefCntBuffer *const frame_bufs = cm->buffer_pool->frame_bufs; @@ -266,7 +266,7 @@ static void swap_frame_buffers(AV1Decoder *pbi) { } int av1_receive_compressed_data(AV1Decoder *pbi, size_t size, - const uint8_t **psource) { + const uint8_t **psource) { AV1_COMMON *volatile const cm = &pbi->common; BufferPool *volatile const pool = cm->buffer_pool; RefCntBuffer *volatile const frame_bufs = cm->buffer_pool->frame_bufs; @@ -424,9 +424,9 @@ int av1_get_raw_frame(AV1Decoder *pbi, YV12_BUFFER_CONFIG *sd) { } aom_codec_err_t av1_parse_superframe_index(const uint8_t *data, size_t data_sz, - uint32_t sizes[8], int *count, - aom_decrypt_cb decrypt_cb, - void *decrypt_state) { + uint32_t sizes[8], int *count, + aom_decrypt_cb decrypt_cb, + void *decrypt_state) { // A chunk ending with a byte matching 0xc0 is an invalid chunk unless // it is a super frame index. If the last byte of real video compression // data is 0xc0 the encoder must add a 0 byte. If we have the marker but diff --git a/av1/decoder/detokenize.c b/av1/decoder/detokenize.c index 8b1bd6ac2..d0b3e7433 100644 --- a/av1/decoder/detokenize.c +++ b/av1/decoder/detokenize.c @@ -259,8 +259,8 @@ static void dec_set_contexts(const MACROBLOCKD *xd, } int av1_decode_block_tokens(MACROBLOCKD *xd, int plane, const scan_order *sc, - int x, int y, TX_SIZE tx_size, aom_reader *r, - int seg_id) { + int x, int y, TX_SIZE tx_size, aom_reader *r, + int seg_id) { struct macroblockd_plane *const pd = &xd->plane[plane]; const int16_t *const dequant = pd->seg_dequant[seg_id]; const int ctx = @@ -276,5 +276,3 @@ int av1_decode_block_tokens(MACROBLOCKD *xd, int plane, const scan_order *sc, dec_set_contexts(xd, pd, tx_size, eob > 0, x, y); return eob; } - - diff --git a/av1/decoder/dthread.c b/av1/decoder/dthread.c index 34cec2dd5..8f92265f8 100644 --- a/av1/decoder/dthread.c +++ b/av1/decoder/dthread.c @@ -61,7 +61,7 @@ void av1_frameworker_signal_stats(AVxWorker *const worker) { // TODO(hkuang): Remove worker parameter as it is only used in debug code. void av1_frameworker_wait(AVxWorker *const worker, RefCntBuffer *const ref_buf, - int row) { + int row) { #if CONFIG_MULTITHREAD if (!ref_buf) return; @@ -135,7 +135,7 @@ void av1_frameworker_broadcast(RefCntBuffer *const buf, int row) { } void av1_frameworker_copy_context(AVxWorker *const dst_worker, - AVxWorker *const src_worker) { + AVxWorker *const src_worker) { #if CONFIG_MULTITHREAD FrameWorkerData *const src_worker_data = (FrameWorkerData *)src_worker->data1; FrameWorkerData *const dst_worker_data = (FrameWorkerData *)dst_worker->data1; diff --git a/av1/encoder/aq_complexity.c b/av1/encoder/aq_complexity.c index 9b6216e4e..b08c7cc00 100644 --- a/av1/encoder/aq_complexity.c +++ b/av1/encoder/aq_complexity.c @@ -112,7 +112,7 @@ void av1_setup_in_frame_q_adj(AV1_COMP *cpi) { // The choice of segment for a block depends on the ratio of the projected // bits for the block vs a target average and its spatial complexity. void av1_caq_select_segment(AV1_COMP *cpi, MACROBLOCK *mb, BLOCK_SIZE bs, - int mi_row, int mi_col, int projected_rate) { + int mi_row, int mi_col, int projected_rate) { AV1_COMMON *const cm = &cpi->common; const int mi_offset = mi_row * cm->mi_cols + mi_col; diff --git a/av1/encoder/aq_cyclicrefresh.c b/av1/encoder/aq_cyclicrefresh.c index 81a49bd2c..6f9247f9f 100644 --- a/av1/encoder/aq_cyclicrefresh.c +++ b/av1/encoder/aq_cyclicrefresh.c @@ -138,7 +138,7 @@ static int compute_deltaq(const AV1_COMP *cpi, int q, double rate_factor) { const CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; const RATE_CONTROL *const rc = &cpi->rc; int deltaq = av1_compute_qdelta_by_rate(rc, cpi->common.frame_type, q, - rate_factor, cpi->common.bit_depth); + rate_factor, cpi->common.bit_depth); if ((-deltaq) > cr->max_qdelta_perc * q / 100) { deltaq = -cr->max_qdelta_perc * q / 100; } @@ -150,7 +150,7 @@ static int compute_deltaq(const AV1_COMP *cpi, int q, double rate_factor) { // (with different delta-q). Note this function is called in the postencode // (called from rc_update_rate_correction_factors()). int av1_cyclic_refresh_estimate_bits_at_q(const AV1_COMP *cpi, - double correction_factor) { + double correction_factor) { const AV1_COMMON *const cm = &cpi->common; const CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; int estimated_bits; @@ -164,15 +164,15 @@ int av1_cyclic_refresh_estimate_bits_at_q(const AV1_COMP *cpi, estimated_bits = (int)((1.0 - weight_segment1 - weight_segment2) * av1_estimate_bits_at_q(cm->frame_type, cm->base_qindex, mbs, - correction_factor, cm->bit_depth) + + correction_factor, cm->bit_depth) + weight_segment1 * av1_estimate_bits_at_q(cm->frame_type, - cm->base_qindex + cr->qindex_delta[1], - mbs, correction_factor, cm->bit_depth) + + cm->base_qindex + cr->qindex_delta[1], + mbs, correction_factor, cm->bit_depth) + weight_segment2 * av1_estimate_bits_at_q(cm->frame_type, - cm->base_qindex + cr->qindex_delta[2], - mbs, correction_factor, cm->bit_depth)); + cm->base_qindex + cr->qindex_delta[2], + mbs, correction_factor, cm->bit_depth)); return estimated_bits; } @@ -182,7 +182,7 @@ int av1_cyclic_refresh_estimate_bits_at_q(const AV1_COMP *cpi, // Note: the segment map is set to either 0/CR_SEGMENT_ID_BASE (no refresh) or // to 1/CR_SEGMENT_ID_BOOST1 (refresh) for each superblock, prior to encoding. int av1_cyclic_refresh_rc_bits_per_mb(const AV1_COMP *cpi, int i, - double correction_factor) { + double correction_factor) { const AV1_COMMON *const cm = &cpi->common; CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; int bits_per_mb; @@ -197,13 +197,12 @@ int av1_cyclic_refresh_rc_bits_per_mb(const AV1_COMP *cpi, int i, // Compute delta-q corresponding to qindex i. int deltaq = compute_deltaq(cpi, i, cr->rate_ratio_qdelta); // Take segment weighted average for bits per mb. - bits_per_mb = - (int)((1.0 - weight_segment) * av1_rc_bits_per_mb(cm->frame_type, i, - correction_factor, - cm->bit_depth) + - weight_segment * av1_rc_bits_per_mb(cm->frame_type, i + deltaq, - correction_factor, - cm->bit_depth)); + bits_per_mb = (int)((1.0 - weight_segment) * + av1_rc_bits_per_mb(cm->frame_type, i, + correction_factor, cm->bit_depth) + + weight_segment * + av1_rc_bits_per_mb(cm->frame_type, i + deltaq, + correction_factor, cm->bit_depth)); return bits_per_mb; } @@ -211,9 +210,9 @@ int av1_cyclic_refresh_rc_bits_per_mb(const AV1_COMP *cpi, int i, // check if we should reset the segment_id, and update the cyclic_refresh map // and segmentation map. void av1_cyclic_refresh_update_segment(AV1_COMP *const cpi, - MB_MODE_INFO *const mbmi, int mi_row, - int mi_col, BLOCK_SIZE bsize, - int64_t rate, int64_t dist, int skip) { + MB_MODE_INFO *const mbmi, int mi_row, + int mi_col, BLOCK_SIZE bsize, + int64_t rate, int64_t dist, int skip) { const AV1_COMMON *const cm = &cpi->common; CYCLIC_REFRESH *const cr = cpi->cyclic_refresh; const int bw = num_8x8_blocks_wide_lookup[bsize]; diff --git a/av1/encoder/aq_variance.c b/av1/encoder/aq_variance.c index b2eb17a93..e1ce5b977 100644 --- a/av1/encoder/aq_variance.c +++ b/av1/encoder/aq_variance.c @@ -61,7 +61,7 @@ void av1_vaq_frame_setup(AV1_COMP *cpi) { for (i = 0; i < MAX_SEGMENTS; ++i) { int qindex_delta = av1_compute_qdelta_by_rate(&cpi->rc, cm->frame_type, cm->base_qindex, - rate_ratio[i], cm->bit_depth); + rate_ratio[i], cm->bit_depth); // We don't allow qindex 0 in a segment if the base value is not 0. // Q index 0 (lossless) implies 4x4 encoding only and in AQ mode a segment diff --git a/av1/encoder/arm/neon/dct_neon.c b/av1/encoder/arm/neon/dct_neon.c index bfcb0b48b..62da07f73 100644 --- a/av1/encoder/arm/neon/dct_neon.c +++ b/av1/encoder/arm/neon/dct_neon.c @@ -18,17 +18,19 @@ #include "av1/common/blockd.h" #include "aom_dsp/txfm_common.h" -void av1_fdct8x8_quant_neon( - const int16_t* input, int stride, int16_t* coeff_ptr, intptr_t n_coeffs, - int skip_block, const int16_t* zbin_ptr, const int16_t* round_ptr, - const int16_t* quant_ptr, const int16_t* quant_shift_ptr, - int16_t* qcoeff_ptr, int16_t* dqcoeff_ptr, const int16_t* dequant_ptr, - uint16_t* eob_ptr, const int16_t* scan_ptr, const int16_t* iscan_ptr) { +void av1_fdct8x8_quant_neon(const int16_t* input, int stride, + int16_t* coeff_ptr, intptr_t n_coeffs, + int skip_block, const int16_t* zbin_ptr, + const int16_t* round_ptr, const int16_t* quant_ptr, + const int16_t* quant_shift_ptr, int16_t* qcoeff_ptr, + int16_t* dqcoeff_ptr, const int16_t* dequant_ptr, + uint16_t* eob_ptr, const int16_t* scan_ptr, + const int16_t* iscan_ptr) { int16_t temp_buffer[64]; (void)coeff_ptr; aom_fdct8x8_neon(input, temp_buffer, stride); av1_quantize_fp_neon(temp_buffer, n_coeffs, skip_block, zbin_ptr, round_ptr, - quant_ptr, quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, - dequant_ptr, eob_ptr, scan_ptr, iscan_ptr); + quant_ptr, quant_shift_ptr, qcoeff_ptr, dqcoeff_ptr, + dequant_ptr, eob_ptr, scan_ptr, iscan_ptr); } diff --git a/av1/encoder/arm/neon/error_neon.c b/av1/encoder/arm/neon/error_neon.c index 0c89f2e60..fe5233f89 100644 --- a/av1/encoder/arm/neon/error_neon.c +++ b/av1/encoder/arm/neon/error_neon.c @@ -15,7 +15,7 @@ #include "./av1_rtcd.h" int64_t av1_block_error_fp_neon(const int16_t *coeff, const int16_t *dqcoeff, - int block_size) { + int block_size) { int64x2_t error = vdupq_n_s64(0); assert(block_size >= 8); diff --git a/av1/encoder/arm/neon/quantize_neon.c b/av1/encoder/arm/neon/quantize_neon.c index 6abf63955..565009494 100644 --- a/av1/encoder/arm/neon/quantize_neon.c +++ b/av1/encoder/arm/neon/quantize_neon.c @@ -23,12 +23,12 @@ #include "av1/encoder/rd.h" void av1_quantize_fp_neon(const int16_t *coeff_ptr, intptr_t count, - int skip_block, const int16_t *zbin_ptr, - const int16_t *round_ptr, const int16_t *quant_ptr, - const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr, - int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, - uint16_t *eob_ptr, const int16_t *scan, - const int16_t *iscan) { + int skip_block, const int16_t *zbin_ptr, + const int16_t *round_ptr, const int16_t *quant_ptr, + const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr, + int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, + uint16_t *eob_ptr, const int16_t *scan, + const int16_t *iscan) { // TODO(jingning) Decide the need of these arguments after the // quantization process is completed. (void)zbin_ptr; diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index a1459e898..5de127973 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c @@ -68,9 +68,8 @@ static void write_intra_mode(aom_writer *w, PREDICTION_MODE mode, av1_write_token(w, av1_intra_mode_tree, probs, &intra_mode_encodings[mode]); } -static void write_inter_mode(AV1_COMMON *cm, - aom_writer *w, PREDICTION_MODE mode, - const int16_t mode_ctx) { +static void write_inter_mode(AV1_COMMON *cm, aom_writer *w, + PREDICTION_MODE mode, const int16_t mode_ctx) { #if CONFIG_REF_MV const int16_t newmv_ctx = mode_ctx & NEWMV_CTX_MASK; const aom_prob newmv_prob = cm->fc->newmv_prob[newmv_ctx]; @@ -90,12 +89,9 @@ static void write_inter_mode(AV1_COMMON *cm, int16_t refmv_ctx = (mode_ctx >> REFMV_OFFSET) & REFMV_CTX_MASK; aom_prob refmv_prob; - if (mode_ctx & (1 << SKIP_NEARESTMV_OFFSET)) - refmv_ctx = 6; - if (mode_ctx & (1 << SKIP_NEARMV_OFFSET)) - refmv_ctx = 7; - if (mode_ctx & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) - refmv_ctx = 8; + if (mode_ctx & (1 << SKIP_NEARESTMV_OFFSET)) refmv_ctx = 6; + if (mode_ctx & (1 << SKIP_NEARMV_OFFSET)) refmv_ctx = 7; + if (mode_ctx & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) refmv_ctx = 8; refmv_prob = cm->fc->refmv_prob[refmv_ctx]; aom_write(w, mode != NEARESTMV, refmv_prob); @@ -105,15 +101,13 @@ static void write_inter_mode(AV1_COMMON *cm, const aom_prob *const inter_probs = cm->fc->inter_mode_probs[mode_ctx]; assert(is_inter_mode(mode)); av1_write_token(w, av1_inter_mode_tree, inter_probs, - &inter_mode_encodings[INTER_OFFSET(mode)]); + &inter_mode_encodings[INTER_OFFSET(mode)]); #endif } #if CONFIG_REF_MV -static void write_drl_idx(const AV1_COMMON *cm, - const MB_MODE_INFO *mbmi, - const MB_MODE_INFO_EXT *mbmi_ext, - aom_writer *w) { +static void write_drl_idx(const AV1_COMMON *cm, const MB_MODE_INFO *mbmi, + const MB_MODE_INFO_EXT *mbmi_ext, aom_writer *w) { uint8_t ref_frame_type = av1_ref_frame_type(mbmi->ref_frame); assert(mbmi->ref_mv_idx < 3); @@ -127,8 +121,7 @@ static void write_drl_idx(const AV1_COMMON *cm, aom_prob drl_prob = cm->fc->drl_prob[drl_ctx]; aom_write(w, mbmi->ref_mv_idx != idx, drl_prob); - if (mbmi->ref_mv_idx == idx) - return; + if (mbmi->ref_mv_idx == idx) return; } } return; @@ -144,8 +137,7 @@ static void write_drl_idx(const AV1_COMMON *cm, aom_prob drl_prob = cm->fc->drl_prob[drl_ctx]; aom_write(w, mbmi->ref_mv_idx != (idx - 1), drl_prob); - if (mbmi->ref_mv_idx == (idx - 1)) - return; + if (mbmi->ref_mv_idx == (idx - 1)) return; } } return; @@ -210,17 +202,14 @@ static void update_inter_mode_probs(AV1_COMMON *cm, aom_writer *w, FRAME_COUNTS *counts) { int i; for (i = 0; i < NEWMV_MODE_CONTEXTS; ++i) - av1_cond_prob_diff_update(w, &cm->fc->newmv_prob[i], - counts->newmv_mode[i]); + av1_cond_prob_diff_update(w, &cm->fc->newmv_prob[i], counts->newmv_mode[i]); for (i = 0; i < ZEROMV_MODE_CONTEXTS; ++i) av1_cond_prob_diff_update(w, &cm->fc->zeromv_prob[i], counts->zeromv_mode[i]); for (i = 0; i < REFMV_MODE_CONTEXTS; ++i) - av1_cond_prob_diff_update(w, &cm->fc->refmv_prob[i], - counts->refmv_mode[i]); + av1_cond_prob_diff_update(w, &cm->fc->refmv_prob[i], counts->refmv_mode[i]); for (i = 0; i < DRL_MODE_CONTEXTS; ++i) - av1_cond_prob_diff_update(w, &cm->fc->drl_prob[i], - counts->drl_mode[i]); + av1_cond_prob_diff_update(w, &cm->fc->drl_prob[i], counts->drl_mode[i]); } #endif @@ -336,8 +325,8 @@ static void pack_mb_tokens(aom_writer *w, TOKENEXTRA **tp, int bits = v >> (n - len); av1_write_tree(w, av1_coef_tree, p->context_tree, bits, len, i); av1_write_tree(w, av1_coef_con_tree, - av1_pareto8_full[p->context_tree[PIVOT_NODE] - 1], v, - n - len, 0); + av1_pareto8_full[p->context_tree[PIVOT_NODE] - 1], v, + n - len, 0); } else { av1_write_tree(w, av1_coef_tree, p->context_tree, v, n, i); } @@ -502,8 +491,8 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi, if (cm->interp_filter == SWITCHABLE) { const int ctx = av1_get_pred_context_switchable_interp(xd); av1_write_token(w, av1_switchable_interp_tree, - cm->fc->switchable_interp_prob[ctx], - &switchable_interp_encodings[mbmi->interp_filter]); + cm->fc->switchable_interp_prob[ctx], + &switchable_interp_encodings[mbmi->interp_filter]); ++cpi->interp_filter_selected[0][mbmi->interp_filter]; } else { assert(mbmi->interp_filter == cm->interp_filter); @@ -531,8 +520,8 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi, const nmv_context *nmvc = &cm->fc->nmvc[nmv_ctx]; #endif av1_encode_mv(cpi, w, &mi->bmi[j].as_mv[ref].as_mv, - &mbmi_ext->ref_mvs[mbmi->ref_frame[ref]][0].as_mv, - nmvc, allow_hp); + &mbmi_ext->ref_mvs[mbmi->ref_frame[ref]][0].as_mv, + nmvc, allow_hp); } } } @@ -548,8 +537,8 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi, const nmv_context *nmvc = &cm->fc->nmvc[nmv_ctx]; #endif ref_mv = mbmi_ext->ref_mvs[mbmi->ref_frame[ref]][0]; - av1_encode_mv(cpi, w, &mbmi->mv[ref].as_mv, - &ref_mv.as_mv, nmvc, allow_hp); + av1_encode_mv(cpi, w, &mbmi->mv[ref].as_mv, &ref_mv.as_mv, nmvc, + allow_hp); } } } @@ -559,8 +548,8 @@ static void pack_inter_mode_mvs(AV1_COMP *cpi, const MODE_INFO *mi, !segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) { if (is_inter) { av1_write_token(w, av1_ext_tx_tree, - cm->fc->inter_ext_tx_prob[mbmi->tx_size], - &ext_tx_encodings[mbmi->tx_type]); + cm->fc->inter_ext_tx_prob[mbmi->tx_size], + &ext_tx_encodings[mbmi->tx_type]); } else { av1_write_token( w, av1_ext_tx_tree, @@ -740,7 +729,8 @@ static void write_modes_sb(AV1_COMP *cpi, const TileInfo *const tile, if (bsize == BLOCK_64X64 && cm->dering_level != 0 && !sb_all_skip(cm, mi_row, mi_col)) { aom_write_literal( - w, cm->mi_grid_visible[mi_row*cm->mi_stride + mi_col]->mbmi.dering_gain, + w, + cm->mi_grid_visible[mi_row * cm->mi_stride + mi_col]->mbmi.dering_gain, DERING_REFINEMENT_BITS); } #endif @@ -774,8 +764,8 @@ static void build_tree_distribution(AV1_COMP *cpi, TX_SIZE tx_size, for (k = 0; k < COEF_BANDS; ++k) { for (l = 0; l < BAND_COEFF_CONTEXTS(k); ++l) { av1_tree_probs_from_distribution(av1_coef_tree, - coef_branch_ct[i][j][k][l], - coef_counts[i][j][k][l]); + coef_branch_ct[i][j][k][l], + coef_counts[i][j][k][l]); coef_branch_ct[i][j][k][l][0][1] = eob_branch_ct[i][j][k][l] - coef_branch_ct[i][j][k][l][0][0]; for (m = 0; m < UNCONSTRAINED_NODES; ++m) @@ -984,8 +974,7 @@ static void encode_loopfilter(struct loopfilter *lf, } #if CONFIG_CLPF -static void encode_clpf(const AV1_COMMON *cm, - struct aom_write_bit_buffer *wb) { +static void encode_clpf(const AV1_COMMON *cm, struct aom_write_bit_buffer *wb) { aom_wb_write_literal(wb, cm->clpf, 1); } #endif @@ -1106,7 +1095,7 @@ static void update_seg_probs(AV1_COMP *cpi, aom_writer *w) { for (i = 0; i < PREDICTION_PROBS; i++) av1_cond_prob_diff_update(w, &cm->fc->seg.pred_probs[i], - cm->counts.seg.pred[i]); + cm->counts.seg.pred[i]); prob_diff_update(av1_segment_tree, cm->fc->seg.tree_probs, cm->counts.seg.tree_mispred, MAX_SEGMENTS, w); @@ -1145,14 +1134,14 @@ static void update_txfm_probs(AV1_COMMON *cm, aom_writer *w, av1_tx_counts_to_branch_counts_16x16(counts->tx.p16x16[i], ct_16x16p); for (j = 0; j < TX_SIZES - 2; j++) av1_cond_prob_diff_update(w, &cm->fc->tx_probs.p16x16[i][j], - ct_16x16p[j]); + ct_16x16p[j]); } for (i = 0; i < TX_SIZE_CONTEXTS; i++) { av1_tx_counts_to_branch_counts_32x32(counts->tx.p32x32[i], ct_32x32p); for (j = 0; j < TX_SIZES - 1; j++) av1_cond_prob_diff_update(w, &cm->fc->tx_probs.p32x32[i][j], - ct_32x32p[j]); + ct_32x32p[j]); } } } @@ -1544,7 +1533,7 @@ static size_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) { for (i = 0; i < INTRA_INTER_CONTEXTS; i++) av1_cond_prob_diff_update(&header_bc, &fc->intra_inter_prob[i], - counts->intra_inter[i]); + counts->intra_inter[i]); if (cpi->allow_comp_inter_inter) { const int use_hybrid_pred = cm->reference_mode == REFERENCE_MODE_SELECT; @@ -1557,29 +1546,29 @@ static size_t write_compressed_header(AV1_COMP *cpi, uint8_t *data) { if (use_hybrid_pred) for (i = 0; i < COMP_INTER_CONTEXTS; i++) av1_cond_prob_diff_update(&header_bc, &fc->comp_inter_prob[i], - counts->comp_inter[i]); + counts->comp_inter[i]); } #else if (use_hybrid_pred) for (i = 0; i < COMP_INTER_CONTEXTS; i++) av1_cond_prob_diff_update(&header_bc, &fc->comp_inter_prob[i], - counts->comp_inter[i]); + counts->comp_inter[i]); #endif } if (cm->reference_mode != COMPOUND_REFERENCE) { for (i = 0; i < REF_CONTEXTS; i++) { av1_cond_prob_diff_update(&header_bc, &fc->single_ref_prob[i][0], - counts->single_ref[i][0]); + counts->single_ref[i][0]); av1_cond_prob_diff_update(&header_bc, &fc->single_ref_prob[i][1], - counts->single_ref[i][1]); + counts->single_ref[i][1]); } } if (cm->reference_mode != SINGLE_REFERENCE) for (i = 0; i < REF_CONTEXTS; i++) av1_cond_prob_diff_update(&header_bc, &fc->comp_ref_prob[i], - counts->comp_ref[i]); + counts->comp_ref[i]); for (i = 0; i < BLOCK_SIZE_GROUPS; ++i) prob_diff_update(av1_intra_mode_tree, cm->fc->y_mode_prob[i], diff --git a/av1/encoder/blockiness.c b/av1/encoder/blockiness.c index 49c5dad32..113ceb29d 100644 --- a/av1/encoder/blockiness.c +++ b/av1/encoder/blockiness.c @@ -121,8 +121,8 @@ static int blockiness_horizontal(const uint8_t *s, int sp, const uint8_t *r, // This function returns the blockiness for the entire frame currently by // looking at all borders in steps of 4. double av1_get_blockiness(const unsigned char *img1, int img1_pitch, - const unsigned char *img2, int img2_pitch, int width, - int height) { + const unsigned char *img2, int img2_pitch, int width, + int height) { double blockiness = 0; int i, j; aom_clear_system_state(); diff --git a/av1/encoder/dct.c b/av1/encoder/dct.c index 06837886b..a989f5b48 100644 --- a/av1/encoder/dct.c +++ b/av1/encoder/dct.c @@ -989,7 +989,7 @@ static const transform_2d FHT_16[] = { }; void av1_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { if (tx_type == DCT_DCT) { aom_fdct4x4_c(input, output, stride); } else { @@ -1016,18 +1016,18 @@ void av1_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, } void av1_fdct8x8_quant_c(const int16_t *input, int stride, - tran_low_t *coeff_ptr, intptr_t n_coeffs, - int skip_block, const int16_t *zbin_ptr, - const int16_t *round_ptr, const int16_t *quant_ptr, - const int16_t *quant_shift_ptr, - tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, - const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan + tran_low_t *coeff_ptr, intptr_t n_coeffs, + int skip_block, const int16_t *zbin_ptr, + const int16_t *round_ptr, const int16_t *quant_ptr, + const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, + tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, + uint16_t *eob_ptr, const int16_t *scan, + const int16_t *iscan #if CONFIG_AOM_QM - , - const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr + , + const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr #endif - ) { + ) { int eob = -1; int i, j; @@ -1142,7 +1142,7 @@ void av1_fdct8x8_quant_c(const int16_t *input, int stride, } void av1_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { if (tx_type == DCT_DCT) { aom_fdct8x8_c(input, output, stride); } else { @@ -1225,7 +1225,7 @@ void av1_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride) { } void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { if (tx_type == DCT_DCT) { aom_fdct16x16_c(input, output, stride); } else { @@ -1253,22 +1253,22 @@ void av1_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, #if CONFIG_AOM_HIGHBITDEPTH void av1_highbd_fht4x4_c(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { av1_fht4x4_c(input, output, stride, tx_type); } void av1_highbd_fht8x8_c(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { av1_fht8x8_c(input, output, stride, tx_type); } void av1_highbd_fwht4x4_c(const int16_t *input, tran_low_t *output, - int stride) { + int stride) { av1_fwht4x4_c(input, output, stride); } -void av1_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, - int stride, int tx_type) { +void av1_highbd_fht16x16_c(const int16_t *input, tran_low_t *output, int stride, + int tx_type) { av1_fht16x16_c(input, output, stride, tx_type); } #endif // CONFIG_AOM_HIGHBITDEPTH diff --git a/av1/encoder/encodeframe.c b/av1/encoder/encodeframe.c index 55f926da4..de1b386be 100644 --- a/av1/encoder/encodeframe.c +++ b/av1/encoder/encodeframe.c @@ -98,8 +98,8 @@ static const uint16_t AV1_HIGH_VAR_OFFS_12[64] = { #endif // CONFIG_AOM_HIGHBITDEPTH unsigned int av1_get_sby_perpixel_variance(AV1_COMP *cpi, - const struct buf_2d *ref, - BLOCK_SIZE bs) { + const struct buf_2d *ref, + BLOCK_SIZE bs) { unsigned int sse; const unsigned int var = cpi->fn_ptr[bs].vf(ref->buf, ref->stride, AV1_VAR_OFFS, 0, &sse); @@ -108,8 +108,8 @@ unsigned int av1_get_sby_perpixel_variance(AV1_COMP *cpi, #if CONFIG_AOM_HIGHBITDEPTH unsigned int av1_high_get_sby_perpixel_variance(AV1_COMP *cpi, - const struct buf_2d *ref, - BLOCK_SIZE bs, int bd) { + const struct buf_2d *ref, + BLOCK_SIZE bs, int bd) { unsigned int var, sse; switch (bd) { case 10: @@ -148,9 +148,8 @@ static unsigned int get_sby_perpixel_diff_variance(AV1_COMP *cpi, return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]); } -static BLOCK_SIZE get_rd_var_based_fixed_partition(AV1_COMP *cpi, - MACROBLOCK *x, int mi_row, - int mi_col) { +static BLOCK_SIZE get_rd_var_based_fixed_partition(AV1_COMP *cpi, MACROBLOCK *x, + int mi_row, int mi_col) { unsigned int var = get_sby_perpixel_diff_variance( cpi, &x->plane[0].src, mi_row, mi_col, BLOCK_64X64); if (var < 8) @@ -671,7 +670,7 @@ static int choose_partitioning(AV1_COMP *cpi, const TileInfo *const tile, if (yv12_g && yv12_g != yv12) { av1_setup_pre_planes(xd, 0, yv12_g, mi_row, mi_col, - &cm->frame_refs[GOLDEN_FRAME - 1].sf); + &cm->frame_refs[GOLDEN_FRAME - 1].sf); y_sad_g = cpi->fn_ptr[bsize].sdf( x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].pre[0].buf, xd->plane[0].pre[0].stride); @@ -680,7 +679,7 @@ static int choose_partitioning(AV1_COMP *cpi, const TileInfo *const tile, } av1_setup_pre_planes(xd, 0, yv12, mi_row, mi_col, - &cm->frame_refs[LAST_FRAME - 1].sf); + &cm->frame_refs[LAST_FRAME - 1].sf); mbmi->ref_frame[0] = LAST_FRAME; mbmi->ref_frame[1] = NONE; mbmi->sb_type = BLOCK_64X64; @@ -690,7 +689,7 @@ static int choose_partitioning(AV1_COMP *cpi, const TileInfo *const tile, y_sad = av1_int_pro_motion_estimation(cpi, x, bsize, mi_row, mi_col); if (y_sad_g < y_sad) { av1_setup_pre_planes(xd, 0, yv12_g, mi_row, mi_col, - &cm->frame_refs[GOLDEN_FRAME - 1].sf); + &cm->frame_refs[GOLDEN_FRAME - 1].sf); mbmi->ref_frame[0] = GOLDEN_FRAME; mbmi->mv[0].as_int = 0; y_sad = y_sad_g; @@ -927,13 +926,13 @@ static void update_state(AV1_COMP *cpi, ThreadData *td, PICK_MODE_CONTEXT *ctx, #if CONFIG_REF_MV rf_type = av1_ref_frame_type(mbmi->ref_frame); - if (x->mbmi_ext->ref_mv_count[rf_type] > 1 && - mbmi->sb_type >= BLOCK_8X8 && + if (x->mbmi_ext->ref_mv_count[rf_type] > 1 && mbmi->sb_type >= BLOCK_8X8 && mbmi->mode == NEWMV) { for (i = 0; i < 1 + has_second_ref(mbmi); ++i) { - int_mv this_mv = (i == 0) ? - x->mbmi_ext->ref_mv_stack[rf_type][mbmi->ref_mv_idx].this_mv : - x->mbmi_ext->ref_mv_stack[rf_type][mbmi->ref_mv_idx].comp_mv; + int_mv this_mv = + (i == 0) + ? x->mbmi_ext->ref_mv_stack[rf_type][mbmi->ref_mv_idx].this_mv + : x->mbmi_ext->ref_mv_stack[rf_type][mbmi->ref_mv_idx].comp_mv; clamp_mv_ref(&this_mv.as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); lower_mv_precision(&this_mv.as_mv, cm->allow_high_precision_mv); x->mbmi_ext->ref_mvs[mbmi->ref_frame[i]][0] = this_mv; @@ -955,7 +954,7 @@ static void update_state(AV1_COMP *cpi, ThreadData *td, PICK_MODE_CONTEXT *ctx, // and then update the quantizer. if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) { av1_cyclic_refresh_update_segment(cpi, &xd->mi[0]->mbmi, mi_row, mi_col, - bsize, ctx->rate, ctx->dist, x->skip); + bsize, ctx->rate, ctx->dist, x->skip); } } @@ -1048,7 +1047,7 @@ static void update_state(AV1_COMP *cpi, ThreadData *td, PICK_MODE_CONTEXT *ctx, } void av1_setup_src_planes(MACROBLOCK *x, const YV12_BUFFER_CONFIG *src, - int mi_row, int mi_col) { + int mi_row, int mi_col) { uint8_t *const buffers[3] = { src->y_buffer, src->u_buffer, src->v_buffer }; const int strides[3] = { src->y_stride, src->uv_stride, src->uv_stride }; int i; @@ -1158,13 +1157,13 @@ static void rd_pick_sb_modes(AV1_COMP *cpi, TileDataEnc *tile_data, if (bsize >= BLOCK_8X8) { if (segfeature_active(&cm->seg, mbmi->segment_id, SEG_LVL_SKIP)) av1_rd_pick_inter_mode_sb_seg_skip(cpi, tile_data, x, rd_cost, bsize, - ctx, best_rd); + ctx, best_rd); else av1_rd_pick_inter_mode_sb(cpi, tile_data, x, mi_row, mi_col, rd_cost, - bsize, ctx, best_rd); + bsize, ctx, best_rd); } else { av1_rd_pick_inter_mode_sub8x8(cpi, tile_data, x, mi_row, mi_col, rd_cost, - bsize, ctx, best_rd); + bsize, ctx, best_rd); } } @@ -1187,8 +1186,7 @@ static void rd_pick_sb_modes(AV1_COMP *cpi, TileDataEnc *tile_data, } #if CONFIG_REF_MV -static void update_inter_mode_stats(FRAME_COUNTS *counts, - PREDICTION_MODE mode, +static void update_inter_mode_stats(FRAME_COUNTS *counts, PREDICTION_MODE mode, const int16_t mode_context) { int16_t mode_ctx = mode_context & NEWMV_CTX_MASK; if (mode == NEWMV) { @@ -1197,8 +1195,7 @@ static void update_inter_mode_stats(FRAME_COUNTS *counts, } else { ++counts->newmv_mode[mode_ctx][1]; - if (mode_context & (1 << ALL_ZERO_FLAG_OFFSET)) - return; + if (mode_context & (1 << ALL_ZERO_FLAG_OFFSET)) return; mode_ctx = (mode_context >> ZEROMV_OFFSET) & ZEROMV_CTX_MASK; if (mode == ZEROMV) { @@ -1208,12 +1205,9 @@ static void update_inter_mode_stats(FRAME_COUNTS *counts, ++counts->zeromv_mode[mode_ctx][1]; mode_ctx = (mode_context >> REFMV_OFFSET) & REFMV_CTX_MASK; - if (mode_context & (1 << SKIP_NEARESTMV_OFFSET)) - mode_ctx = 6; - if (mode_context & (1 << SKIP_NEARMV_OFFSET)) - mode_ctx = 7; - if (mode_context & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) - mode_ctx = 8; + if (mode_context & (1 << SKIP_NEARESTMV_OFFSET)) mode_ctx = 6; + if (mode_context & (1 << SKIP_NEARMV_OFFSET)) mode_ctx = 7; + if (mode_context & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) mode_ctx = 8; ++counts->refmv_mode[mode_ctx][mode != NEARESTMV]; } @@ -1276,8 +1270,7 @@ static void update_stats(AV1_COMMON *cm, ThreadData *td) { av1_drl_ctx(mbmi_ext->ref_mv_stack[ref_frame_type], idx); ++counts->drl_mode[drl_ctx][mbmi->ref_mv_idx != idx]; - if (mbmi->ref_mv_idx == idx) - break; + if (mbmi->ref_mv_idx == idx) break; } } } @@ -1292,8 +1285,7 @@ static void update_stats(AV1_COMMON *cm, ThreadData *td) { av1_drl_ctx(mbmi_ext->ref_mv_stack[ref_frame_type], idx); ++counts->drl_mode[drl_ctx][mbmi->ref_mv_idx != idx - 1]; - if (mbmi->ref_mv_idx == idx - 1) - break; + if (mbmi->ref_mv_idx == idx - 1) break; } } } @@ -1394,10 +1386,9 @@ static void encode_b(AV1_COMP *cpi, const TileInfo *const tile, ThreadData *td, } } -static void encode_sb(AV1_COMP *cpi, ThreadData *td, - const TileInfo *const tile, TOKENEXTRA **tp, int mi_row, - int mi_col, int output_enabled, BLOCK_SIZE bsize, - PC_TREE *pc_tree) { +static void encode_sb(AV1_COMP *cpi, ThreadData *td, const TileInfo *const tile, + TOKENEXTRA **tp, int mi_row, int mi_col, + int output_enabled, BLOCK_SIZE bsize, PC_TREE *pc_tree) { AV1_COMMON *const cm = &cpi->common; MACROBLOCK *const x = &td->mb; MACROBLOCKD *const xd = &x->e_mbd; @@ -2616,7 +2607,7 @@ void av1_init_tile_data(AV1_COMP *cpi) { } void av1_encode_tile(AV1_COMP *cpi, ThreadData *td, int tile_row, - int tile_col) { + int tile_col) { AV1_COMMON *const cm = &cpi->common; const int tile_cols = 1 << cm->log2_tile_cols; TileDataEnc *this_tile = &cpi->tile_data[tile_row * tile_cols + tile_col]; @@ -2702,8 +2693,8 @@ static void encode_frame_internal(AV1_COMP *cpi) { init_encode_frame_mb_context(cpi); cm->use_prev_frame_mvs = !cm->error_resilient_mode && cm->width == cm->last_width && - cm->height == cm->last_height && !cm->intra_only && - cm->last_show_frame && (cm->last_frame_type != KEY_FRAME); + cm->height == cm->last_height && !cm->intra_only && cm->last_show_frame && + (cm->last_frame_type != KEY_FRAME); // Special case: set prev_mi to NULL when the previous mode info // context cannot be used. cm->prev_mi = @@ -2958,14 +2949,14 @@ static void encode_superblock(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t, YV12_BUFFER_CONFIG *cfg = get_ref_frame_buffer(cpi, mbmi->ref_frame[ref]); assert(cfg != NULL); av1_setup_pre_planes(xd, ref, cfg, mi_row, mi_col, - &xd->block_refs[ref]->sf); + &xd->block_refs[ref]->sf); } if (!(cpi->sf.reuse_inter_pred_sby && ctx->pred_pixel_ready) || seg_skip) av1_build_inter_predictors_sby(xd, mi_row, mi_col, - AOMMAX(bsize, BLOCK_8X8)); + AOMMAX(bsize, BLOCK_8X8)); av1_build_inter_predictors_sbuv(xd, mi_row, mi_col, - AOMMAX(bsize, BLOCK_8X8)); + AOMMAX(bsize, BLOCK_8X8)); av1_encode_sb(x, AOMMAX(bsize, BLOCK_8X8)); av1_tokenize_sb(cpi, td, t, !output_enabled, AOMMAX(bsize, BLOCK_8X8)); diff --git a/av1/encoder/encodemb.c b/av1/encoder/encodemb.c index b56a7ac08..fdf9b1a01 100644 --- a/av1/encoder/encodemb.c +++ b/av1/encoder/encodemb.c @@ -141,8 +141,7 @@ static int optimize_b(MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size, tokens[eob][1] = tokens[eob][0]; for (i = 0; i < eob; i++) - token_cache[scan[i]] = - av1_pt_energy_class[av1_get_token(qcoeff[scan[i]])]; + token_cache[scan[i]] = av1_pt_energy_class[av1_get_token(qcoeff[scan[i]])]; for (i = eob; i-- > 0;) { int base_bits, d2, dx; @@ -352,22 +351,16 @@ static INLINE void highbd_fdct32x32(int rd_transform, const int16_t *src, #endif // CONFIG_AOM_HIGHBITDEPTH void av1_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff, - int diff_stride, TX_TYPE tx_type, int lossless) { + int diff_stride, TX_TYPE tx_type, int lossless) { if (lossless) { av1_fwht4x4(src_diff, coeff, diff_stride); } else { switch (tx_type) { - case DCT_DCT: - aom_fdct4x4(src_diff, coeff, diff_stride); - break; + case DCT_DCT: aom_fdct4x4(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: - case ADST_ADST: - av1_fht4x4(src_diff, coeff, diff_stride, tx_type); - break; - default: - assert(0); - break; + case ADST_ADST: av1_fht4x4(src_diff, coeff, diff_stride, tx_type); break; + default: assert(0); break; } } } @@ -378,12 +371,8 @@ static void fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff, case DCT_DCT: case ADST_DCT: case DCT_ADST: - case ADST_ADST: - av1_fht8x8(src_diff, coeff, diff_stride, tx_type); - break; - default: - assert(0); - break; + case ADST_ADST: av1_fht8x8(src_diff, coeff, diff_stride, tx_type); break; + default: assert(0); break; } } @@ -393,12 +382,8 @@ static void fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff, case DCT_DCT: case ADST_DCT: case DCT_ADST: - case ADST_ADST: - av1_fht16x16(src_diff, coeff, diff_stride, tx_type); - break; - default: - assert(0); - break; + case ADST_ADST: av1_fht16x16(src_diff, coeff, diff_stride, tx_type); break; + default: assert(0); break; } } @@ -406,39 +391,29 @@ static void fwd_txfm_32x32(int rd_transform, const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type) { switch (tx_type) { - case DCT_DCT: - fdct32x32(rd_transform, src_diff, coeff, diff_stride); - break; + case DCT_DCT: fdct32x32(rd_transform, src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: - case ADST_ADST: - assert(0); - break; - default: - assert(0); - break; + case ADST_ADST: assert(0); break; + default: assert(0); break; } } #if CONFIG_AOM_HIGHBITDEPTH void av1_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff, - int diff_stride, TX_TYPE tx_type, int lossless) { + int diff_stride, TX_TYPE tx_type, int lossless) { if (lossless) { assert(tx_type == DCT_DCT); av1_highbd_fwht4x4(src_diff, coeff, diff_stride); } else { switch (tx_type) { - case DCT_DCT: - aom_highbd_fdct4x4(src_diff, coeff, diff_stride); - break; + case DCT_DCT: aom_highbd_fdct4x4(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: case ADST_ADST: av1_highbd_fht4x4(src_diff, coeff, diff_stride, tx_type); break; - default: - assert(0); - break; + default: assert(0); break; } } } @@ -446,34 +421,26 @@ void av1_highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff, static void highbd_fwd_txfm_8x8(const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type) { switch (tx_type) { - case DCT_DCT: - aom_highbd_fdct8x8(src_diff, coeff, diff_stride); - break; + case DCT_DCT: aom_highbd_fdct8x8(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: case ADST_ADST: av1_highbd_fht8x8(src_diff, coeff, diff_stride, tx_type); break; - default: - assert(0); - break; + default: assert(0); break; } } static void highbd_fwd_txfm_16x16(const int16_t *src_diff, tran_low_t *coeff, int diff_stride, TX_TYPE tx_type) { switch (tx_type) { - case DCT_DCT: - aom_highbd_fdct16x16(src_diff, coeff, diff_stride); - break; + case DCT_DCT: aom_highbd_fdct16x16(src_diff, coeff, diff_stride); break; case ADST_DCT: case DCT_ADST: case ADST_ADST: av1_highbd_fht16x16(src_diff, coeff, diff_stride, tx_type); break; - default: - assert(0); - break; + default: assert(0); break; } } @@ -486,18 +453,14 @@ static void highbd_fwd_txfm_32x32(int rd_transform, const int16_t *src_diff, break; case ADST_DCT: case DCT_ADST: - case ADST_ADST: - assert(0); - break; - default: - assert(0); - break; + case ADST_ADST: assert(0); break; + default: assert(0); break; } } #endif // CONFIG_AOM_HIGHBITDEPTH void av1_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, - int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { + int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { MACROBLOCKD *const xd = &x->e_mbd; const struct macroblock_plane *const p = &x->plane[plane]; const struct macroblockd_plane *const pd = &xd->plane[plane]; @@ -523,36 +486,35 @@ void av1_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, switch (tx_size) { case TX_32X32: highbd_fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); - av1_highbd_quantize_fp_32x32(coeff, 1024, x->skip_block, p->zbin, - p->round_fp, p->quant_fp, p->quant_shift, - qcoeff, dqcoeff, pd->dequant, eob, - scan_order->scan, + av1_highbd_quantize_fp_32x32( + coeff, 1024, x->skip_block, p->zbin, p->round_fp, p->quant_fp, + p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; case TX_16X16: aom_highbd_fdct16x16(src_diff, coeff, diff_stride); av1_highbd_quantize_fp(coeff, 256, x->skip_block, p->zbin, p->round_fp, - p->quant_fp, p->quant_shift, qcoeff, dqcoeff, - pd->dequant, eob, scan_order->scan, + p->quant_fp, p->quant_shift, qcoeff, dqcoeff, + pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; case TX_8X8: aom_highbd_fdct8x8(src_diff, coeff, diff_stride); av1_highbd_quantize_fp(coeff, 64, x->skip_block, p->zbin, p->round_fp, - p->quant_fp, p->quant_shift, qcoeff, dqcoeff, - pd->dequant, eob, scan_order->scan, + p->quant_fp, p->quant_shift, qcoeff, dqcoeff, + pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; case TX_4X4: @@ -562,16 +524,15 @@ void av1_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, aom_highbd_fdct4x4(src_diff, coeff, diff_stride); } av1_highbd_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp, - p->quant_fp, p->quant_shift, qcoeff, dqcoeff, - pd->dequant, eob, scan_order->scan, + p->quant_fp, p->quant_shift, qcoeff, dqcoeff, + pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; - default: - assert(0); + default: assert(0); } return; } @@ -581,33 +542,33 @@ void av1_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, case TX_32X32: fdct32x32(x->use_lp32x32fdct, src_diff, coeff, diff_stride); av1_quantize_fp_32x32(coeff, 1024, x->skip_block, p->zbin, p->round_fp, - p->quant_fp, p->quant_shift, qcoeff, dqcoeff, - pd->dequant, eob, scan_order->scan, + p->quant_fp, p->quant_shift, qcoeff, dqcoeff, + pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; case TX_16X16: aom_fdct16x16(src_diff, coeff, diff_stride); av1_quantize_fp(coeff, 256, x->skip_block, p->zbin, p->round_fp, - p->quant_fp, p->quant_shift, qcoeff, dqcoeff, - pd->dequant, eob, scan_order->scan, + p->quant_fp, p->quant_shift, qcoeff, dqcoeff, pd->dequant, + eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; case TX_8X8: av1_fdct8x8_quant(src_diff, diff_stride, coeff, 64, x->skip_block, - p->zbin, p->round_fp, p->quant_fp, p->quant_shift, - qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, + p->zbin, p->round_fp, p->quant_fp, p->quant_shift, + qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; case TX_4X4: @@ -617,22 +578,20 @@ void av1_xform_quant_fp(MACROBLOCK *x, int plane, int block, int blk_row, aom_fdct4x4(src_diff, coeff, diff_stride); } av1_quantize_fp(coeff, 16, x->skip_block, p->zbin, p->round_fp, - p->quant_fp, p->quant_shift, qcoeff, dqcoeff, - pd->dequant, eob, scan_order->scan, + p->quant_fp, p->quant_shift, qcoeff, dqcoeff, pd->dequant, + eob, scan_order->scan, #if !CONFIG_AOM_QM - scan_order->iscan); + scan_order->iscan); #else - scan_order->iscan, qmatrix, iqmatrix); + scan_order->iscan, qmatrix, iqmatrix); #endif break; - default: - assert(0); - break; + default: assert(0); break; } } void av1_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, - int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { + int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { MACROBLOCKD *const xd = &x->e_mbd; const struct macroblock_plane *const p = &x->plane[plane]; const struct macroblockd_plane *const pd = &xd->plane[plane]; @@ -698,8 +657,7 @@ void av1_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, eob, qmatrix, iqmatrix); #endif break; - default: - assert(0); + default: assert(0); } return; } @@ -750,14 +708,12 @@ void av1_xform_quant_dc(MACROBLOCK *x, int plane, int block, int blk_row, eob, qmatrix, iqmatrix); #endif break; - default: - assert(0); - break; + default: assert(0); break; } } void av1_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, - int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { + int blk_col, BLOCK_SIZE plane_bsize, TX_SIZE tx_size) { MACROBLOCKD *const xd = &x->e_mbd; const struct macroblock_plane *const p = &x->plane[plane]; const struct macroblockd_plane *const pd = &xd->plane[plane]; @@ -817,7 +773,7 @@ void av1_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, break; case TX_4X4: av1_highbd_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, - xd->lossless[seg_id]); + xd->lossless[seg_id]); aom_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -827,8 +783,7 @@ void av1_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, scan_order->iscan, qmatrix, iqmatrix); #endif break; - default: - assert(0); + default: assert(0); } return; } @@ -870,7 +825,7 @@ void av1_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, break; case TX_4X4: av1_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, - xd->lossless[seg_id]); + xd->lossless[seg_id]); aom_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -880,9 +835,7 @@ void av1_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row, scan_order->iscan, qmatrix, iqmatrix); #endif break; - default: - assert(0); - break; + default: assert(0); break; } } @@ -920,7 +873,7 @@ static void encode_block(int plane, int block, int blk_row, int blk_col, return; } else { av1_xform_quant_fp(x, plane, block, blk_row, blk_col, plane_bsize, - tx_size); + tx_size); } } else { if (max_txsize_lookup[plane_bsize] == tx_size) { @@ -928,11 +881,11 @@ static void encode_block(int plane, int block, int blk_row, int blk_col, if (x->skip_txfm[txfm_blk_index] == SKIP_TXFM_NONE) { // full forward transform and quantization av1_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, - tx_size); + tx_size); } else if (x->skip_txfm[txfm_blk_index] == SKIP_TXFM_AC_ONLY) { // fast path forward transform and quantization av1_xform_quant_dc(x, plane, block, blk_row, blk_col, plane_bsize, - tx_size); + tx_size); } else { // skip forward transform p->eobs[block] = 0; @@ -941,7 +894,7 @@ static void encode_block(int plane, int block, int blk_row, int blk_col, } } else { av1_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, - tx_size); + tx_size); } } } @@ -961,27 +914,25 @@ static void encode_block(int plane, int block, int blk_row, int blk_col, switch (tx_size) { case TX_32X32: av1_highbd_inv_txfm_add_32x32(dqcoeff, dst, pd->dst.stride, - p->eobs[block], xd->bd, tx_type); + p->eobs[block], xd->bd, tx_type); break; case TX_16X16: av1_highbd_inv_txfm_add_16x16(dqcoeff, dst, pd->dst.stride, - p->eobs[block], xd->bd, tx_type); + p->eobs[block], xd->bd, tx_type); break; case TX_8X8: av1_highbd_inv_txfm_add_8x8(dqcoeff, dst, pd->dst.stride, - p->eobs[block], xd->bd, tx_type); + p->eobs[block], xd->bd, tx_type); break; case TX_4X4: // this is like av1_short_idct4x4 but has a special case around eob<=1 // which is significant (not just an optimization) for the lossless // case. av1_highbd_inv_txfm_add_4x4(dqcoeff, dst, pd->dst.stride, - p->eobs[block], xd->bd, tx_type, - xd->lossless[xd->mi[0]->mbmi.segment_id]); - break; - default: - assert(0 && "Invalid transform size"); + p->eobs[block], xd->bd, tx_type, + xd->lossless[xd->mi[0]->mbmi.segment_id]); break; + default: assert(0 && "Invalid transform size"); break; } return; @@ -991,26 +942,24 @@ static void encode_block(int plane, int block, int blk_row, int blk_col, switch (tx_size) { case TX_32X32: av1_inv_txfm_add_32x32(dqcoeff, dst, pd->dst.stride, p->eobs[block], - tx_type); + tx_type); break; case TX_16X16: av1_inv_txfm_add_16x16(dqcoeff, dst, pd->dst.stride, p->eobs[block], - tx_type); + tx_type); break; case TX_8X8: av1_inv_txfm_add_8x8(dqcoeff, dst, pd->dst.stride, p->eobs[block], - tx_type); + tx_type); break; case TX_4X4: // this is like av1_short_idct4x4 but has a special case around eob<=1 // which is significant (not just an optimization) for the lossless // case. av1_inv_txfm_add_4x4(dqcoeff, dst, pd->dst.stride, p->eobs[block], - tx_type, xd->lossless[xd->mi[0]->mbmi.segment_id]); - break; - default: - assert(0 && "Invalid transform size"); + tx_type, xd->lossless[xd->mi[0]->mbmi.segment_id]); break; + default: assert(0 && "Invalid transform size"); break; } } @@ -1032,10 +981,10 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col, if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { if (xd->lossless[0]) { av1_highbd_iwht4x4_add(dqcoeff, dst, pd->dst.stride, p->eobs[block], - xd->bd); + xd->bd); } else { av1_highbd_idct4x4_add(dqcoeff, dst, pd->dst.stride, p->eobs[block], - xd->bd); + xd->bd); } return; } @@ -1051,7 +1000,7 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col, void av1_encode_sby_pass1(MACROBLOCK *x, BLOCK_SIZE bsize) { av1_subtract_plane(x, bsize, 0); av1_foreach_transformed_block_in_plane(&x->e_mbd, bsize, 0, - encode_block_pass1, x); + encode_block_pass1, x); } void av1_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize) { @@ -1072,17 +1021,17 @@ void av1_encode_sb(MACROBLOCK *x, BLOCK_SIZE bsize) { const struct macroblockd_plane *const pd = &xd->plane[plane]; const TX_SIZE tx_size = plane ? get_uv_tx_size(mbmi, pd) : mbmi->tx_size; av1_get_entropy_contexts(bsize, tx_size, pd, ctx.ta[plane], - ctx.tl[plane]); + ctx.tl[plane]); } av1_foreach_transformed_block_in_plane(xd, bsize, plane, encode_block, - &arg); + &arg); } } void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, - BLOCK_SIZE plane_bsize, TX_SIZE tx_size, - void *arg) { + BLOCK_SIZE plane_bsize, TX_SIZE tx_size, + void *arg) { struct encode_b_args *const args = arg; MACROBLOCK *const x = args->x; MACROBLOCKD *const xd = &x->e_mbd; @@ -1116,7 +1065,7 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, mode = plane == 0 ? get_y_mode(xd->mi[0], block) : mbmi->uv_mode; av1_predict_intra_block(xd, bwl, bhl, tx_size, mode, dst, dst_stride, dst, - dst_stride, blk_col, blk_row, plane); + dst_stride, blk_col, blk_row, plane); #if CONFIG_AOM_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { @@ -1139,7 +1088,7 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, } if (*eob) av1_highbd_inv_txfm_add_32x32(dqcoeff, dst, dst_stride, *eob, xd->bd, - tx_type); + tx_type); break; case TX_16X16: if (!x->skip_recode) { @@ -1157,7 +1106,7 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, } if (*eob) av1_highbd_inv_txfm_add_16x16(dqcoeff, dst, dst_stride, *eob, xd->bd, - tx_type); + tx_type); break; case TX_8X8: if (!x->skip_recode) { @@ -1175,14 +1124,14 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, } if (*eob) av1_highbd_inv_txfm_add_8x8(dqcoeff, dst, dst_stride, *eob, xd->bd, - tx_type); + tx_type); break; case TX_4X4: if (!x->skip_recode) { aom_highbd_subtract_block(4, 4, src_diff, diff_stride, src, src_stride, dst, dst_stride, xd->bd); av1_highbd_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, - xd->lossless[seg_id]); + xd->lossless[seg_id]); aom_highbd_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -1198,11 +1147,9 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, // eob<=1 which is significant (not just an optimization) for the // lossless case. av1_highbd_inv_txfm_add_4x4(dqcoeff, dst, dst_stride, *eob, xd->bd, - tx_type, xd->lossless[seg_id]); + tx_type, xd->lossless[seg_id]); break; - default: - assert(0); - return; + default: assert(0); return; } if (*eob) *(args->skip) = 0; return; @@ -1225,8 +1172,7 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, scan_order->iscan, qmatrix, iqmatrix); #endif } - if (*eob) - av1_inv_txfm_add_32x32(dqcoeff, dst, dst_stride, *eob, tx_type); + if (*eob) av1_inv_txfm_add_32x32(dqcoeff, dst, dst_stride, *eob, tx_type); break; case TX_16X16: if (!x->skip_recode) { @@ -1242,8 +1188,7 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, scan_order->iscan, qmatrix, iqmatrix); #endif } - if (*eob) - av1_inv_txfm_add_16x16(dqcoeff, dst, dst_stride, *eob, tx_type); + if (*eob) av1_inv_txfm_add_16x16(dqcoeff, dst, dst_stride, *eob, tx_type); break; case TX_8X8: if (!x->skip_recode) { @@ -1266,7 +1211,7 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, aom_subtract_block(4, 4, src_diff, diff_stride, src, src_stride, dst, dst_stride); av1_fwd_txfm_4x4(src_diff, coeff, diff_stride, tx_type, - xd->lossless[seg_id]); + xd->lossless[seg_id]); aom_quantize_b(coeff, 16, x->skip_block, p->zbin, p->round, p->quant, p->quant_shift, qcoeff, dqcoeff, pd->dequant, eob, scan_order->scan, @@ -1282,12 +1227,10 @@ void av1_encode_block_intra(int plane, int block, int blk_row, int blk_col, // which is significant (not just an optimization) for the lossless // case. av1_inv_txfm_add_4x4(dqcoeff, dst, dst_stride, *eob, tx_type, - xd->lossless[seg_id]); + xd->lossless[seg_id]); } break; - default: - assert(0); - break; + default: assert(0); break; } if (*eob) *(args->skip) = 0; } @@ -1297,5 +1240,5 @@ void av1_encode_intra_block_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { struct encode_b_args arg = { x, NULL, &xd->mi[0]->mbmi.skip }; av1_foreach_transformed_block_in_plane(xd, bsize, plane, - av1_encode_block_intra, &arg); + av1_encode_block_intra, &arg); } diff --git a/av1/encoder/encodemv.c b/av1/encoder/encodemv.c index 7936f1d0a..c65971339 100644 --- a/av1/encoder/encodemv.c +++ b/av1/encoder/encodemv.c @@ -49,12 +49,12 @@ static void encode_mv_component(aom_writer *w, int comp, // Class av1_write_token(w, av1_mv_class_tree, mvcomp->classes, - &mv_class_encodings[mv_class]); + &mv_class_encodings[mv_class]); // Integer bits if (mv_class == MV_CLASS_0) { av1_write_token(w, av1_mv_class0_tree, mvcomp->class0, - &mv_class0_encodings[d]); + &mv_class0_encodings[d]); } else { int i; const int n = mv_class + CLASS0_BITS - 1; // number of bits @@ -63,8 +63,8 @@ static void encode_mv_component(aom_writer *w, int comp, // Fractional bits av1_write_token(w, av1_mv_fp_tree, - mv_class == MV_CLASS_0 ? mvcomp->class0_fp[d] : mvcomp->fp, - &mv_fp_encodings[fr]); + mv_class == MV_CLASS_0 ? mvcomp->class0_fp[d] : mvcomp->fp, + &mv_fp_encodings[fr]); // High precision bit if (usehp) @@ -165,15 +165,15 @@ static void write_mv_update(const aom_tree_index *tree, } void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w, - nmv_context_counts *const nmv_counts) { + nmv_context_counts *const nmv_counts) { int i, j; #if CONFIG_REF_MV int nmv_ctx = 0; for (nmv_ctx = 0; nmv_ctx < NMV_CONTEXTS; ++nmv_ctx) { nmv_context *const mvc = &cm->fc->nmvc[nmv_ctx]; nmv_context_counts *const counts = &nmv_counts[nmv_ctx]; - write_mv_update(av1_mv_joint_tree, mvc->joints, counts->joints, - MV_JOINTS, w); + write_mv_update(av1_mv_joint_tree, mvc->joints, counts->joints, MV_JOINTS, + w); for (i = 0; i < 2; ++i) { nmv_component *comp = &mvc->comps[i]; @@ -209,8 +209,7 @@ void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w, nmv_context *const mvc = &cm->fc->nmvc; nmv_context_counts *const counts = nmv_counts; - write_mv_update(av1_mv_joint_tree, mvc->joints, counts->joints, MV_JOINTS, - w); + write_mv_update(av1_mv_joint_tree, mvc->joints, counts->joints, MV_JOINTS, w); for (i = 0; i < 2; ++i) { nmv_component *comp = &mvc->comps[i]; @@ -244,15 +243,13 @@ void av1_write_nmv_probs(AV1_COMMON *cm, int usehp, aom_writer *w, #endif } - void av1_encode_mv(AV1_COMP *cpi, aom_writer *w, const MV *mv, const MV *ref, - const nmv_context *mvctx, int usehp) { + const nmv_context *mvctx, int usehp) { const MV diff = { mv->row - ref->row, mv->col - ref->col }; const MV_JOINT_TYPE j = av1_get_mv_joint(&diff); usehp = usehp && av1_use_mv_hp(ref); - av1_write_token(w, av1_mv_joint_tree, mvctx->joints, - &mv_joint_encodings[j]); + av1_write_token(w, av1_mv_joint_tree, mvctx->joints, &mv_joint_encodings[j]); if (mv_joint_vertical(j)) encode_mv_component(w, diff.row, &mvctx->comps[0], usehp); @@ -268,7 +265,7 @@ void av1_encode_mv(AV1_COMP *cpi, aom_writer *w, const MV *mv, const MV *ref, } void av1_build_nmv_cost_table(int *mvjoint, int *mvcost[2], - const nmv_context *ctx, int usehp) { + const nmv_context *ctx, int usehp) { av1_cost_tokens(mvjoint, ctx->joints, av1_mv_joint_tree); build_nmv_component_cost_table(mvcost[0], &ctx->comps[0], usehp); build_nmv_component_cost_table(mvcost[1], &ctx->comps[1], usehp); diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c index 35fb8b698..e8ce3d8f2 100644 --- a/av1/encoder/encoder.c +++ b/av1/encoder/encoder.c @@ -151,7 +151,7 @@ static void apply_active_map(AV1_COMP *cpi) { // Setting the data to -MAX_LOOP_FILTER will result in the computed loop // filter level being zero regardless of the value of seg->abs_delta. av1_set_segdata(seg, AM_SEGMENT_ID_INACTIVE, SEG_LVL_ALT_LF, - -MAX_LOOP_FILTER); + -MAX_LOOP_FILTER); } else { av1_disable_segfeature(seg, AM_SEGMENT_ID_INACTIVE, SEG_LVL_SKIP); av1_disable_segfeature(seg, AM_SEGMENT_ID_INACTIVE, SEG_LVL_ALT_LF); @@ -165,7 +165,7 @@ static void apply_active_map(AV1_COMP *cpi) { } int av1_set_active_map(AV1_COMP *cpi, unsigned char *new_map_16x16, int rows, - int cols) { + int cols) { if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols) { unsigned char *const active_map_8x8 = cpi->active_map.map; const int mi_rows = cpi->common.mi_rows; @@ -192,7 +192,7 @@ int av1_set_active_map(AV1_COMP *cpi, unsigned char *new_map_16x16, int rows, } int av1_get_active_map(AV1_COMP *cpi, unsigned char *new_map_16x16, int rows, - int cols) { + int cols) { if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols && new_map_16x16) { unsigned char *const seg_map_8x8 = cpi->segmentation_map; @@ -430,10 +430,10 @@ static void save_coding_context(AV1_COMP *cpi) { int i; #endif - // Stores a snapshot of key state variables which can subsequently be - // restored with a call to av1_restore_coding_context. These functions are - // intended for use in a re-code loop in av1_compress_frame where the - // quantizer value is adjusted between loop iterations. +// Stores a snapshot of key state variables which can subsequently be +// restored with a call to av1_restore_coding_context. These functions are +// intended for use in a re-code loop in av1_compress_frame where the +// quantizer value is adjusted between loop iterations. #if CONFIG_REF_MV for (i = 0; i < NMV_CONTEXTS; ++i) { av1_copy(cc->nmv_vec_cost[i], cpi->td.mb.nmv_vec_cost[i]); @@ -479,8 +479,8 @@ static void restore_coding_context(AV1_COMP *cpi) { int i; #endif - // Restore key state variables to the snapshot state stored in the - // previous call to av1_save_coding_context. +// Restore key state variables to the snapshot state stored in the +// previous call to av1_save_coding_context. #if CONFIG_REF_MV for (i = 0; i < NMV_CONTEXTS; ++i) { av1_copy(cpi->td.mb.nmv_vec_cost[i], cc->nmv_vec_cost[i]); @@ -582,8 +582,8 @@ static void configure_static_seg_features(AV1_COMP *cpi) { seg->update_data = 1; seg->abs_delta = SEGMENT_DELTADATA; - qi_delta = av1_compute_qdelta(rc, rc->avg_q, rc->avg_q * 1.125, - cm->bit_depth); + qi_delta = + av1_compute_qdelta(rc, rc->avg_q, rc->avg_q * 1.125, cm->bit_depth); av1_set_segdata(seg, 1, SEG_LVL_ALT_Q, qi_delta + 2); av1_enable_segfeature(seg, 1, SEG_LVL_ALT_Q); @@ -663,11 +663,11 @@ static void alloc_raw_frame_buffers(AV1_COMP *cpi) { if (!cpi->lookahead) cpi->lookahead = av1_lookahead_init(oxcf->width, oxcf->height, - cm->subsampling_x, cm->subsampling_y, + cm->subsampling_x, cm->subsampling_y, #if CONFIG_AOM_HIGHBITDEPTH - cm->use_highbitdepth, + cm->use_highbitdepth, #endif - oxcf->lag_in_frames); + oxcf->lag_in_frames); if (!cpi->lookahead) aom_internal_error(&cm->error, AOM_CODEC_MEM_ERROR, "Failed to allocate lag buffers"); @@ -1427,7 +1427,7 @@ static void cal_nmvsadcosts_hp(int *mvsadcost[2]) { } AV1_COMP *av1_create_compressor(AV1EncoderConfig *oxcf, - BufferPool *const pool) { + BufferPool *const pool) { unsigned int i; AV1_COMP *volatile const cpi = aom_memalign(32, sizeof(AV1_COMP)); AV1_COMMON *volatile const cm = cpi != NULL ? &cpi->common : NULL; @@ -1899,7 +1899,7 @@ static YV12_BUFFER_CONFIG *get_av1_ref_frame_buffer( } int av1_copy_reference_enc(AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag, - YV12_BUFFER_CONFIG *sd) { + YV12_BUFFER_CONFIG *sd) { YV12_BUFFER_CONFIG *cfg = get_av1_ref_frame_buffer(cpi, ref_frame_flag); if (cfg) { aom_yv12_copy_frame(cfg, sd); @@ -1910,7 +1910,7 @@ int av1_copy_reference_enc(AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag, } int av1_set_reference_enc(AV1_COMP *cpi, AOM_REFFRAME ref_frame_flag, - YV12_BUFFER_CONFIG *sd) { + YV12_BUFFER_CONFIG *sd) { YV12_BUFFER_CONFIG *cfg = get_av1_ref_frame_buffer(cpi, ref_frame_flag); if (cfg) { aom_yv12_copy_frame(sd, cfg); @@ -2047,15 +2047,15 @@ static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src, #if CONFIG_AOM_HIGHBITDEPTH if (src->flags & YV12_FLAG_HIGHBITDEPTH) { av1_highbd_resize_plane(srcs[i], src_heights[i], src_widths[i], - src_strides[i], dsts[i], dst_heights[i], - dst_widths[i], dst_strides[i], bd); + src_strides[i], dsts[i], dst_heights[i], + dst_widths[i], dst_strides[i], bd); } else { av1_resize_plane(srcs[i], src_heights[i], src_widths[i], src_strides[i], - dsts[i], dst_heights[i], dst_widths[i], dst_strides[i]); + dsts[i], dst_heights[i], dst_widths[i], dst_strides[i]); } #else av1_resize_plane(srcs[i], src_heights[i], src_widths[i], src_strides[i], - dsts[i], dst_heights[i], dst_widths[i], dst_strides[i]); + dsts[i], dst_heights[i], dst_widths[i], dst_strides[i]); #endif // CONFIG_AOM_HIGHBITDEPTH } aom_extend_frame_borders(dst); @@ -2136,8 +2136,8 @@ static int scale_down(AV1_COMP *cpi, int q) { // Function to test for conditions that indicate we should loop // back and recode a frame. -static int recode_loop_test(AV1_COMP *cpi, int high_limit, int low_limit, - int q, int maxq, int minq) { +static int recode_loop_test(AV1_COMP *cpi, int high_limit, int low_limit, int q, + int maxq, int minq) { const RATE_CONTROL *const rc = &cpi->rc; const AV1EncoderConfig *const oxcf = &cpi->oxcf; const int frame_is_kfgfarf = frame_is_kf_gf_arf(cpi); @@ -2256,8 +2256,8 @@ static void loopfilter_frame(AV1_COMP *cpi, AV1_COMMON *cm) { if (lf->filter_level > 0) { if (cpi->num_workers > 1) av1_loop_filter_frame_mt(cm->frame_to_show, cm, xd->plane, - lf->filter_level, 0, 0, cpi->workers, - cpi->num_workers, &cpi->lf_row_sync); + lf->filter_level, 0, 0, cpi->workers, + cpi->num_workers, &cpi->lf_row_sync); else av1_loop_filter_frame(cm->frame_to_show, cm, xd, lf->filter_level, 0, 0); } @@ -2266,8 +2266,8 @@ static void loopfilter_frame(AV1_COMP *cpi, AV1_COMMON *cm) { if (is_lossless_requested(&cpi->oxcf)) { cm->dering_level = 0; } else { - cm->dering_level = av1_dering_search(cm->frame_to_show, cpi->Source, cm, - xd); + cm->dering_level = + av1_dering_search(cm->frame_to_show, cpi->Source, cm, xd); av1_dering_frame(cm->frame_to_show, cm, xd, cm->dering_level); } #endif // CONFIG_DERING @@ -2624,11 +2624,11 @@ static void set_frame_size(AV1_COMP *cpi) { ((oxcf->resize_mode == RESIZE_FIXED && cm->current_video_frame == 0) || (oxcf->resize_mode == RESIZE_DYNAMIC && cpi->resize_pending))) { av1_calculate_coded_size(cpi, &oxcf->scaled_frame_width, - &oxcf->scaled_frame_height); + &oxcf->scaled_frame_height); // There has been a change in frame size. av1_set_size_literal(cpi, oxcf->scaled_frame_width, - oxcf->scaled_frame_height); + oxcf->scaled_frame_height); } if (oxcf->pass == 0 && oxcf->rc_mode == AOM_CBR && @@ -2646,7 +2646,7 @@ static void set_frame_size(AV1_COMP *cpi) { if (cpi->resize_pending != 0) { // There has been a change in frame size. av1_set_size_literal(cpi, oxcf->scaled_frame_width, - oxcf->scaled_frame_height); + oxcf->scaled_frame_height); // TODO(agrange) Scale cpi->max_mv_magnitude if frame-size has changed. set_mv_search_params(cpi); @@ -2686,8 +2686,8 @@ static void set_frame_size(AV1_COMP *cpi) { cm->height, (buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0); #else av1_setup_scale_factors_for_frame(&ref_buf->sf, buf->y_crop_width, - buf->y_crop_height, cm->width, - cm->height); + buf->y_crop_height, cm->width, + cm->height); #endif // CONFIG_AOM_HIGHBITDEPTH if (av1_is_scaled(&ref_buf->sf)) aom_extend_frame_borders(buf); } else { @@ -2713,7 +2713,7 @@ static void encode_without_recode_loop(AV1_COMP *cpi) { cpi->un_scaled_source->y_width == (cm->width << 1) && cpi->un_scaled_source->y_height == (cm->height << 1)) { cpi->Source = av1_scale_if_required_fast(cm, cpi->un_scaled_source, - &cpi->scaled_source); + &cpi->scaled_source); if (cpi->unscaled_last_source != NULL) cpi->Last_Source = av1_scale_if_required_fast( cm, cpi->unscaled_last_source, &cpi->scaled_last_source); @@ -2722,7 +2722,7 @@ static void encode_without_recode_loop(AV1_COMP *cpi) { av1_scale_if_required(cm, cpi->un_scaled_source, &cpi->scaled_source); if (cpi->unscaled_last_source != NULL) cpi->Last_Source = av1_scale_if_required(cm, cpi->unscaled_last_source, - &cpi->scaled_last_source); + &cpi->scaled_last_source); } if (frame_is_intra_only(cm) == 0) { @@ -2807,8 +2807,8 @@ static void encode_with_recode_loop(AV1_COMP *cpi, size_t *size, // Decide frame size bounds first time through. if (loop_count == 0) { av1_rc_compute_frame_size_bounds(cpi, rc->this_frame_target, - &frame_under_shoot_limit, - &frame_over_shoot_limit); + &frame_under_shoot_limit, + &frame_over_shoot_limit); } cpi->Source = @@ -2816,7 +2816,7 @@ static void encode_with_recode_loop(AV1_COMP *cpi, size_t *size, if (cpi->unscaled_last_source != NULL) cpi->Last_Source = av1_scale_if_required(cm, cpi->unscaled_last_source, - &cpi->scaled_last_source); + &cpi->scaled_last_source); if (frame_is_intra_only(cm) == 0) { if (loop_count > 0) { @@ -2954,12 +2954,12 @@ static void encode_with_recode_loop(AV1_COMP *cpi, size_t *size, av1_rc_update_rate_correction_factors(cpi); q = av1_rc_regulate_q(cpi, rc->this_frame_target, bottom_index, - AOMMAX(q_high, top_index)); + AOMMAX(q_high, top_index)); while (q < q_low && retries < 10) { av1_rc_update_rate_correction_factors(cpi); q = av1_rc_regulate_q(cpi, rc->this_frame_target, bottom_index, - AOMMAX(q_high, top_index)); + AOMMAX(q_high, top_index)); retries++; } } @@ -2975,7 +2975,7 @@ static void encode_with_recode_loop(AV1_COMP *cpi, size_t *size, } else { av1_rc_update_rate_correction_factors(cpi); q = av1_rc_regulate_q(cpi, rc->this_frame_target, bottom_index, - top_index); + top_index); // Special case reset for qlow for constrained quality. // This should only trigger where there is very substantial // undershoot on a frame and the auto cq level is above @@ -2987,7 +2987,7 @@ static void encode_with_recode_loop(AV1_COMP *cpi, size_t *size, while (q > q_high && retries < 10) { av1_rc_update_rate_correction_factors(cpi); q = av1_rc_regulate_q(cpi, rc->this_frame_target, bottom_index, - top_index); + top_index); retries++; } } @@ -3056,8 +3056,8 @@ static void set_ext_overrides(AV1_COMP *cpi) { } YV12_BUFFER_CONFIG *av1_scale_if_required_fast(AV1_COMMON *cm, - YV12_BUFFER_CONFIG *unscaled, - YV12_BUFFER_CONFIG *scaled) { + YV12_BUFFER_CONFIG *unscaled, + YV12_BUFFER_CONFIG *scaled) { if (cm->mi_cols * MI_SIZE != unscaled->y_width || cm->mi_rows * MI_SIZE != unscaled->y_height) { // For 2x2 scaling down. @@ -3070,8 +3070,8 @@ YV12_BUFFER_CONFIG *av1_scale_if_required_fast(AV1_COMMON *cm, } YV12_BUFFER_CONFIG *av1_scale_if_required(AV1_COMMON *cm, - YV12_BUFFER_CONFIG *unscaled, - YV12_BUFFER_CONFIG *scaled) { + YV12_BUFFER_CONFIG *unscaled, + YV12_BUFFER_CONFIG *scaled) { if (cm->mi_cols * MI_SIZE != unscaled->y_width || cm->mi_rows * MI_SIZE != unscaled->y_height) { #if CONFIG_AOM_HIGHBITDEPTH @@ -3369,8 +3369,8 @@ static void check_initial_width(AV1_COMP *cpi, } int av1_receive_raw_frame(AV1_COMP *cpi, unsigned int frame_flags, - YV12_BUFFER_CONFIG *sd, int64_t time_stamp, - int64_t end_time) { + YV12_BUFFER_CONFIG *sd, int64_t time_stamp, + int64_t end_time) { AV1_COMMON *cm = &cpi->common; struct aom_usec_timer timer; int res = 0; @@ -3387,9 +3387,9 @@ int av1_receive_raw_frame(AV1_COMP *cpi, unsigned int frame_flags, if (av1_lookahead_push(cpi->lookahead, sd, time_stamp, end_time, #if CONFIG_AOM_HIGHBITDEPTH - use_highbitdepth, + use_highbitdepth, #endif // CONFIG_AOM_HIGHBITDEPTH - frame_flags)) + frame_flags)) res = -1; aom_usec_timer_mark(&timer); cpi->time_receive_data += aom_usec_timer_elapsed(&timer); @@ -3502,8 +3502,8 @@ static void check_src_altref(AV1_COMP *cpi, #if CONFIG_INTERNAL_STATS extern double av1_get_blockiness(const unsigned char *img1, int img1_pitch, - const unsigned char *img2, int img2_pitch, - int width, int height); + const unsigned char *img2, int img2_pitch, + int width, int height); static void adjust_image_stat(double y, double u, double v, double all, ImageStat *s) { @@ -3615,8 +3615,8 @@ static void compute_internal_stats(AV1_COMP *cpi) { #endif // CONFIG_INTERNAL_STATS int av1_get_compressed_data(AV1_COMP *cpi, unsigned int *frame_flags, - size_t *size, uint8_t *dest, int64_t *time_stamp, - int64_t *time_end, int flush) { + size_t *size, uint8_t *dest, int64_t *time_stamp, + int64_t *time_end, int flush) { const AV1EncoderConfig *const oxcf = &cpi->oxcf; AV1_COMMON *const cm = &cpi->common; BufferPool *const pool = cm->buffer_pool; @@ -3833,7 +3833,7 @@ int av1_get_preview_raw_frame(AV1_COMP *cpi, YV12_BUFFER_CONFIG *dest) { } int av1_set_internal_size(AV1_COMP *cpi, AOM_SCALING horiz_mode, - AOM_SCALING vert_mode) { + AOM_SCALING vert_mode) { AV1_COMMON *cm = &cpi->common; int hr = 0, hs = 0, vr = 0, vs = 0; @@ -3854,7 +3854,7 @@ int av1_set_internal_size(AV1_COMP *cpi, AOM_SCALING horiz_mode, } int av1_set_size_literal(AV1_COMP *cpi, unsigned int width, - unsigned int height) { + unsigned int height) { AV1_COMMON *cm = &cpi->common; #if CONFIG_AOM_HIGHBITDEPTH check_initial_width(cpi, cm->use_highbitdepth, 1, 1); diff --git a/av1/encoder/extend.c b/av1/encoder/extend.c index 9999c1082..03eead36b 100644 --- a/av1/encoder/extend.c +++ b/av1/encoder/extend.c @@ -103,7 +103,7 @@ static void highbd_copy_and_extend_plane(const uint8_t *src8, int src_pitch, #endif // CONFIG_AOM_HIGHBITDEPTH void av1_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src, - YV12_BUFFER_CONFIG *dst) { + YV12_BUFFER_CONFIG *dst) { // Extend src frame in buffer // Altref filtering assumes 16 pixel extension const int et_y = 16; @@ -155,8 +155,8 @@ void av1_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src, } void av1_copy_and_extend_frame_with_rect(const YV12_BUFFER_CONFIG *src, - YV12_BUFFER_CONFIG *dst, int srcy, - int srcx, int srch, int srcw) { + YV12_BUFFER_CONFIG *dst, int srcy, + int srcx, int srch, int srcw) { // If the side is not touching the bounder then don't extend. const int et_y = srcy ? 0 : dst->border; const int el_y = srcx ? 0 : dst->border; diff --git a/av1/encoder/firstpass.c b/av1/encoder/firstpass.c index 0edb673fd..2afd979e0 100644 --- a/av1/encoder/firstpass.c +++ b/av1/encoder/firstpass.c @@ -1129,7 +1129,7 @@ void av1_init_subsampling(AV1_COMP *cpi) { } void av1_calculate_coded_size(AV1_COMP *cpi, int *scaled_frame_width, - int *scaled_frame_height) { + int *scaled_frame_height) { RATE_CONTROL *const rc = &cpi->rc; *scaled_frame_width = rc->frame_width[rc->frame_size_selector]; *scaled_frame_height = rc->frame_height[rc->frame_size_selector]; @@ -1330,8 +1330,7 @@ static void accumulate_frame_motion_stats(const FIRSTPASS_STATS *stats, } #define BASELINE_ERR_PER_MB 1000.0 -static double calc_frame_boost(AV1_COMP *cpi, - const FIRSTPASS_STATS *this_frame, +static double calc_frame_boost(AV1_COMP *cpi, const FIRSTPASS_STATS *this_frame, double this_frame_mv_in_out, double max_boost) { double frame_boost; const double lq = av1_convert_qindex_to_q( @@ -1360,8 +1359,8 @@ static double calc_frame_boost(AV1_COMP *cpi, return AOMMIN(frame_boost, max_boost * boost_q_correction); } -static int calc_arf_boost(AV1_COMP *cpi, int offset, int f_frames, - int b_frames, int *f_boost, int *b_boost) { +static int calc_arf_boost(AV1_COMP *cpi, int offset, int f_frames, int b_frames, + int *f_boost, int *b_boost) { TWO_PASS *const twopass = &cpi->twopass; int i; double boost_score = 0.0; @@ -1748,10 +1747,10 @@ static void define_gf_group(AV1_COMP *cpi, FIRSTPASS_STATS *this_frame) { // Set a maximum and minimum interval for the GF group. // If the image appears almost completely static we can extend beyond this. { - int int_max_q = (int)(av1_convert_qindex_to_q( - twopass->active_worst_quality, cpi->common.bit_depth)); + int int_max_q = (int)(av1_convert_qindex_to_q(twopass->active_worst_quality, + cpi->common.bit_depth)); int int_lbq = (int)(av1_convert_qindex_to_q(rc->last_boosted_qindex, - cpi->common.bit_depth)); + cpi->common.bit_depth)); active_min_gf_interval = rc->min_gf_interval + AOMMIN(2, int_max_q / 200); if (active_min_gf_interval > rc->max_gf_interval) active_min_gf_interval = rc->max_gf_interval; diff --git a/av1/encoder/lookahead.c b/av1/encoder/lookahead.c index e71d158d1..237f8a8a5 100644 --- a/av1/encoder/lookahead.c +++ b/av1/encoder/lookahead.c @@ -44,13 +44,13 @@ void av1_lookahead_destroy(struct lookahead_ctx *ctx) { } struct lookahead_ctx *av1_lookahead_init(unsigned int width, - unsigned int height, - unsigned int subsampling_x, - unsigned int subsampling_y, + unsigned int height, + unsigned int subsampling_x, + unsigned int subsampling_y, #if CONFIG_AOM_HIGHBITDEPTH - int use_highbitdepth, + int use_highbitdepth, #endif - unsigned int depth) { + unsigned int depth) { struct lookahead_ctx *ctx = NULL; // Clamp the lookahead queue depth @@ -85,11 +85,11 @@ bail: #define USE_PARTIAL_COPY 0 int av1_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, - int64_t ts_start, int64_t ts_end, + int64_t ts_start, int64_t ts_end, #if CONFIG_AOM_HIGHBITDEPTH - int use_highbitdepth, + int use_highbitdepth, #endif - unsigned int flags) { + unsigned int flags) { struct lookahead_entry *buf; #if USE_PARTIAL_COPY int row, col, active_end; @@ -147,7 +147,7 @@ int av1_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, // Only copy this active region. av1_copy_and_extend_frame_with_rect(src, &buf->img, row << 4, col << 4, - 16, (active_end - col) << 4); + 16, (active_end - col) << 4); // Start again from the end of this active region. col = active_end; @@ -190,7 +190,7 @@ int av1_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src, } struct lookahead_entry *av1_lookahead_pop(struct lookahead_ctx *ctx, - int drain) { + int drain) { struct lookahead_entry *buf = NULL; if (ctx && ctx->sz && (drain || ctx->sz == ctx->max_sz - MAX_PRE_FRAMES)) { @@ -201,7 +201,7 @@ struct lookahead_entry *av1_lookahead_pop(struct lookahead_ctx *ctx, } struct lookahead_entry *av1_lookahead_peek(struct lookahead_ctx *ctx, - int index) { + int index) { struct lookahead_entry *buf = NULL; if (index >= 0) { diff --git a/av1/encoder/mbgraph.c b/av1/encoder/mbgraph.c index 82d9b1293..53b5822aa 100644 --- a/av1/encoder/mbgraph.c +++ b/av1/encoder/mbgraph.c @@ -49,7 +49,7 @@ static unsigned int do_16x16_motion_iteration(AV1_COMP *cpi, const MV *ref_mv, /*cpi->sf.search_method == HEX*/ av1_hex_search(x, &ref_full, step_param, x->errorperbit, 0, - cond_cost_list(cpi, cost_list), &v_fn_ptr, 0, ref_mv, dst_mv); + cond_cost_list(cpi, cost_list), &v_fn_ptr, 0, ref_mv, dst_mv); // Try sub-pixel MC // if (bestsme > error_thresh && bestsme < INT_MAX) @@ -143,8 +143,8 @@ static int find_best_16x16_intra(AV1_COMP *cpi, PREDICTION_MODE *pbest_mode) { xd->mi[0]->mbmi.mode = mode; av1_predict_intra_block(xd, 2, 2, TX_16X16, mode, x->plane[0].src.buf, - x->plane[0].src.stride, xd->plane[0].dst.buf, - xd->plane[0].dst.stride, 0, 0, 0); + x->plane[0].src.stride, xd->plane[0].dst.buf, + xd->plane[0].dst.stride, 0, 0, 0); err = aom_sad16x16(x->plane[0].src.buf, x->plane[0].src.stride, xd->plane[0].dst.buf, xd->plane[0].dst.stride); diff --git a/av1/encoder/mcomp.c b/av1/encoder/mcomp.c index 27d755715..1ddecbc02 100644 --- a/av1/encoder/mcomp.c +++ b/av1/encoder/mcomp.c @@ -70,7 +70,7 @@ static INLINE int mv_cost(const MV *mv, const int *joint_cost, } int av1_mv_bit_cost(const MV *mv, const MV *ref, const int *mvjcost, - int *mvcost[2], int weight) { + int *mvcost[2], int weight) { const MV diff = { mv->row - ref->row, mv->col - ref->col }; return ROUND_POWER_OF_TWO(mv_cost(&diff, mvjcost, mvcost) * weight, 7); } @@ -93,11 +93,9 @@ static int mv_err_cost(const MV *mv, const MV *ref, const int *mvjcost, static int mvsad_err_cost(const MACROBLOCK *x, const MV *mv, const MV *ref, int sad_per_bit) { #if CONFIG_REF_MV - const MV diff = { (mv->row - ref->row) << 3, - (mv->col - ref->col) << 3 }; + const MV diff = { (mv->row - ref->row) << 3, (mv->col - ref->col) << 3 }; return ROUND_POWER_OF_TWO( - (unsigned)mv_cost(&diff, x->nmvjointsadcost, x->mvsadcost) * - sad_per_bit, + (unsigned)mv_cost(&diff, x->nmvjointsadcost, x->mvsadcost) * sad_per_bit, AV1_PROB_COST_SHIFT); #else const MV diff = { mv->row - ref->row, mv->col - ref->col }; @@ -588,13 +586,13 @@ static const MV search_step_table[12] = { }; int av1_find_best_sub_pixel_tree(const MACROBLOCK *x, MV *bestmv, - const MV *ref_mv, int allow_hp, - int error_per_bit, - const aom_variance_fn_ptr_t *vfp, - int forced_stop, int iters_per_step, - int *cost_list, int *mvjcost, int *mvcost[2], - int *distortion, unsigned int *sse1, - const uint8_t *second_pred, int w, int h) { + const MV *ref_mv, int allow_hp, + int error_per_bit, + const aom_variance_fn_ptr_t *vfp, + int forced_stop, int iters_per_step, + int *cost_list, int *mvjcost, int *mvcost[2], + int *distortion, unsigned int *sse1, + const uint8_t *second_pred, int w, int h) { const uint8_t *const z = x->plane[0].src.buf; const uint8_t *const src_address = z; const int src_stride = x->plane[0].src.stride; @@ -1256,8 +1254,8 @@ static int av1_pattern_search_sad( } int av1_get_mvpred_var(const MACROBLOCK *x, const MV *best_mv, - const MV *center_mv, const aom_variance_fn_ptr_t *vfp, - int use_mvcost) { + const MV *center_mv, const aom_variance_fn_ptr_t *vfp, + int use_mvcost) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; const struct buf_2d *const in_what = &xd->plane[0].pre[0]; @@ -1272,8 +1270,8 @@ int av1_get_mvpred_var(const MACROBLOCK *x, const MV *best_mv, } int av1_get_mvpred_av_var(const MACROBLOCK *x, const MV *best_mv, - const MV *center_mv, const uint8_t *second_pred, - const aom_variance_fn_ptr_t *vfp, int use_mvcost) { + const MV *center_mv, const uint8_t *second_pred, + const aom_variance_fn_ptr_t *vfp, int use_mvcost) { const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; const struct buf_2d *const in_what = &xd->plane[0].pre[0]; @@ -1288,9 +1286,9 @@ int av1_get_mvpred_av_var(const MACROBLOCK *x, const MV *best_mv, } int av1_hex_search(const MACROBLOCK *x, MV *ref_mv, int search_param, - int sad_per_bit, int do_init_search, int *cost_list, - const aom_variance_fn_ptr_t *vfp, int use_mvcost, - const MV *center_mv, MV *best_mv) { + int sad_per_bit, int do_init_search, int *cost_list, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, + const MV *center_mv, MV *best_mv) { // First scale has 8-closest points, the rest have 6 points in hex shape // at increasing scales static const int hex_num_candidates[MAX_PATTERN_SCALES] = { 8, 6, 6, 6, 6, 6, @@ -1352,9 +1350,9 @@ int av1_hex_search(const MACROBLOCK *x, MV *ref_mv, int search_param, } int av1_bigdia_search(const MACROBLOCK *x, MV *ref_mv, int search_param, - int sad_per_bit, int do_init_search, int *cost_list, - const aom_variance_fn_ptr_t *vfp, int use_mvcost, - const MV *center_mv, MV *best_mv) { + int sad_per_bit, int do_init_search, int *cost_list, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, + const MV *center_mv, MV *best_mv) { // First scale has 4-closest points, the rest have 8 points in diamond // shape at increasing scales static const int bigdia_num_candidates[MAX_PATTERN_SCALES] = { @@ -1451,9 +1449,9 @@ int av1_bigdia_search(const MACROBLOCK *x, MV *ref_mv, int search_param, } int av1_square_search(const MACROBLOCK *x, MV *ref_mv, int search_param, - int sad_per_bit, int do_init_search, int *cost_list, - const aom_variance_fn_ptr_t *vfp, int use_mvcost, - const MV *center_mv, MV *best_mv) { + int sad_per_bit, int do_init_search, int *cost_list, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, + const MV *center_mv, MV *best_mv) { // All scales have 8 closest points in square shape static const int square_num_candidates[MAX_PATTERN_SCALES] = { 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, @@ -1556,19 +1554,19 @@ int av1_square_search(const MACROBLOCK *x, MV *ref_mv, int search_param, } int av1_fast_hex_search(const MACROBLOCK *x, MV *ref_mv, int search_param, - int sad_per_bit, - int do_init_search, // must be zero for fast_hex - int *cost_list, const aom_variance_fn_ptr_t *vfp, - int use_mvcost, const MV *center_mv, MV *best_mv) { - return av1_hex_search( - x, ref_mv, AOMMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit, - do_init_search, cost_list, vfp, use_mvcost, center_mv, best_mv); + int sad_per_bit, + int do_init_search, // must be zero for fast_hex + int *cost_list, const aom_variance_fn_ptr_t *vfp, + int use_mvcost, const MV *center_mv, MV *best_mv) { + return av1_hex_search(x, ref_mv, AOMMAX(MAX_MVSEARCH_STEPS - 2, search_param), + sad_per_bit, do_init_search, cost_list, vfp, use_mvcost, + center_mv, best_mv); } int av1_fast_dia_search(const MACROBLOCK *x, MV *ref_mv, int search_param, - int sad_per_bit, int do_init_search, int *cost_list, - const aom_variance_fn_ptr_t *vfp, int use_mvcost, - const MV *center_mv, MV *best_mv) { + int sad_per_bit, int do_init_search, int *cost_list, + const aom_variance_fn_ptr_t *vfp, int use_mvcost, + const MV *center_mv, MV *best_mv) { return av1_bigdia_search( x, ref_mv, AOMMAX(MAX_MVSEARCH_STEPS - 2, search_param), sad_per_bit, do_init_search, cost_list, vfp, use_mvcost, center_mv, best_mv); @@ -1664,11 +1662,11 @@ static int exhuastive_mesh_search(const MACROBLOCK *x, MV *ref_mv, MV *best_mv, return best_sad; } -int av1_diamond_search_sad_c(const MACROBLOCK *x, - const search_site_config *cfg, MV *ref_mv, - MV *best_mv, int search_param, int sad_per_bit, - int *num00, const aom_variance_fn_ptr_t *fn_ptr, - const MV *center_mv) { +int av1_diamond_search_sad_c(const MACROBLOCK *x, const search_site_config *cfg, + MV *ref_mv, MV *best_mv, int search_param, + int sad_per_bit, int *num00, + const aom_variance_fn_ptr_t *fn_ptr, + const MV *center_mv) { int i, j, step; const MACROBLOCKD *const xd = &x->e_mbd; @@ -1875,8 +1873,8 @@ static const MV search_pos[4] = { }; unsigned int av1_int_pro_motion_estimation(const AV1_COMP *cpi, MACROBLOCK *x, - BLOCK_SIZE bsize, int mi_row, - int mi_col) { + BLOCK_SIZE bsize, int mi_row, + int mi_col) { MACROBLOCKD *xd = &x->e_mbd; MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi; struct buf_2d backup_yv12[MAX_MB_PLANE] = { { 0, 0 } }; @@ -2007,10 +2005,10 @@ unsigned int av1_int_pro_motion_estimation(const AV1_COMP *cpi, MACROBLOCK *x, point as the best match, we will do a final 1-away diamond refining search */ int av1_full_pixel_diamond(const AV1_COMP *cpi, MACROBLOCK *x, MV *mvp_full, - int step_param, int sadpb, int further_steps, - int do_refine, int *cost_list, - const aom_variance_fn_ptr_t *fn_ptr, - const MV *ref_mv, MV *dst_mv) { + int step_param, int sadpb, int further_steps, + int do_refine, int *cost_list, + const aom_variance_fn_ptr_t *fn_ptr, + const MV *ref_mv, MV *dst_mv) { MV temp_mv; int thissme, n, num00 = 0; int bestsme = cpi->diamond_search_sad(x, &cpi->ss_cfg, mvp_full, &temp_mv, @@ -2050,7 +2048,7 @@ int av1_full_pixel_diamond(const AV1_COMP *cpi, MACROBLOCK *x, MV *mvp_full, const int search_range = 8; MV best_mv = *dst_mv; thissme = av1_refining_search_sad(x, &best_mv, sadpb, search_range, fn_ptr, - ref_mv); + ref_mv); if (thissme < INT_MAX) thissme = av1_get_mvpred_var(x, &best_mv, ref_mv, fn_ptr, 1); if (thissme < bestsme) { @@ -2129,9 +2127,9 @@ static int full_pixel_exhaustive(AV1_COMP *cpi, MACROBLOCK *x, } int av1_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, - int sad_per_bit, int distance, - const aom_variance_fn_ptr_t *fn_ptr, - const MV *center_mv, MV *best_mv) { + int sad_per_bit, int distance, + const aom_variance_fn_ptr_t *fn_ptr, + const MV *center_mv, MV *best_mv) { int r, c; const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -2164,9 +2162,9 @@ int av1_full_search_sad_c(const MACROBLOCK *x, const MV *ref_mv, } int av1_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv, - int sad_per_bit, int distance, - const aom_variance_fn_ptr_t *fn_ptr, - const MV *center_mv, MV *best_mv) { + int sad_per_bit, int distance, + const aom_variance_fn_ptr_t *fn_ptr, + const MV *center_mv, MV *best_mv) { int r; const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -2230,9 +2228,9 @@ int av1_full_search_sadx3(const MACROBLOCK *x, const MV *ref_mv, } int av1_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv, - int sad_per_bit, int distance, - const aom_variance_fn_ptr_t *fn_ptr, - const MV *center_mv, MV *best_mv) { + int sad_per_bit, int distance, + const aom_variance_fn_ptr_t *fn_ptr, + const MV *center_mv, MV *best_mv) { int r; const MACROBLOCKD *const xd = &x->e_mbd; const struct buf_2d *const what = &x->plane[0].src; @@ -2320,9 +2318,9 @@ int av1_full_search_sadx8(const MACROBLOCK *x, const MV *ref_mv, } int av1_refining_search_sad(const MACROBLOCK *x, MV *ref_mv, int error_per_bit, - int search_range, - const aom_variance_fn_ptr_t *fn_ptr, - const MV *center_mv) { + int search_range, + const aom_variance_fn_ptr_t *fn_ptr, + const MV *center_mv) { const MACROBLOCKD *const xd = &x->e_mbd; const MV neighbors[4] = { { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 } }; const struct buf_2d *const what = &x->plane[0].src; @@ -2394,10 +2392,10 @@ int av1_refining_search_sad(const MACROBLOCK *x, MV *ref_mv, int error_per_bit, // This function is called when we do joint motion search in comp_inter_inter // mode. -int av1_refining_search_8p_c(const MACROBLOCK *x, MV *ref_mv, - int error_per_bit, int search_range, - const aom_variance_fn_ptr_t *fn_ptr, - const MV *center_mv, const uint8_t *second_pred) { +int av1_refining_search_8p_c(const MACROBLOCK *x, MV *ref_mv, int error_per_bit, + int search_range, + const aom_variance_fn_ptr_t *fn_ptr, + const MV *center_mv, const uint8_t *second_pred) { const MV neighbors[8] = { { -1, 0 }, { 0, -1 }, { 0, 1 }, { 1, 0 }, { -1, -1 }, { 1, -1 }, { -1, 1 }, { 1, 1 } }; const MACROBLOCKD *const xd = &x->e_mbd; @@ -2454,9 +2452,9 @@ static int is_exhaustive_allowed(AV1_COMP *cpi, MACROBLOCK *x) { } int av1_full_pixel_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, - MV *mvp_full, int step_param, int error_per_bit, - int *cost_list, const MV *ref_mv, MV *tmp_mv, - int var_max, int rd) { + MV *mvp_full, int step_param, int error_per_bit, + int *cost_list, const MV *ref_mv, MV *tmp_mv, + int var_max, int rd) { const SPEED_FEATURES *const sf = &cpi->sf; const SEARCH_METHODS method = sf->mv.search_method; aom_variance_fn_ptr_t *fn_ptr = &cpi->fn_ptr[bsize]; @@ -2475,28 +2473,28 @@ int av1_full_pixel_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, switch (method) { case FAST_DIAMOND: var = av1_fast_dia_search(x, mvp_full, step_param, error_per_bit, 0, - cost_list, fn_ptr, 1, ref_mv, tmp_mv); + cost_list, fn_ptr, 1, ref_mv, tmp_mv); break; case FAST_HEX: var = av1_fast_hex_search(x, mvp_full, step_param, error_per_bit, 0, - cost_list, fn_ptr, 1, ref_mv, tmp_mv); + cost_list, fn_ptr, 1, ref_mv, tmp_mv); break; case HEX: - var = av1_hex_search(x, mvp_full, step_param, error_per_bit, 1, - cost_list, fn_ptr, 1, ref_mv, tmp_mv); + var = av1_hex_search(x, mvp_full, step_param, error_per_bit, 1, cost_list, + fn_ptr, 1, ref_mv, tmp_mv); break; case SQUARE: var = av1_square_search(x, mvp_full, step_param, error_per_bit, 1, - cost_list, fn_ptr, 1, ref_mv, tmp_mv); + cost_list, fn_ptr, 1, ref_mv, tmp_mv); break; case BIGDIA: var = av1_bigdia_search(x, mvp_full, step_param, error_per_bit, 1, - cost_list, fn_ptr, 1, ref_mv, tmp_mv); + cost_list, fn_ptr, 1, ref_mv, tmp_mv); break; case NSTEP: var = av1_full_pixel_diamond(cpi, x, mvp_full, step_param, error_per_bit, - MAX_MVSEARCH_STEPS - 1 - step_param, 1, - cost_list, fn_ptr, ref_mv, tmp_mv); + MAX_MVSEARCH_STEPS - 1 - step_param, 1, + cost_list, fn_ptr, ref_mv, tmp_mv); // Should we allow a follow on exhaustive search? if (is_exhaustive_allowed(cpi, x)) { diff --git a/av1/encoder/mips/msa/error_msa.c b/av1/encoder/mips/msa/error_msa.c index 1890528d0..8d13af7ad 100644 --- a/av1/encoder/mips/msa/error_msa.c +++ b/av1/encoder/mips/msa/error_msa.c @@ -88,8 +88,8 @@ BLOCK_ERROR_BLOCKSIZE_MSA(1024) /* clang-format on */ int64_t av1_block_error_msa(const tran_low_t *coeff_ptr, - const tran_low_t *dq_coeff_ptr, intptr_t blk_size, - int64_t *ssz) { + const tran_low_t *dq_coeff_ptr, intptr_t blk_size, + int64_t *ssz) { int64_t err; const int16_t *coeff = (const int16_t *)coeff_ptr; const int16_t *dq_coeff = (const int16_t *)dq_coeff_ptr; diff --git a/av1/encoder/mips/msa/fdct16x16_msa.c b/av1/encoder/mips/msa/fdct16x16_msa.c index 469b0f9f7..eea578d04 100644 --- a/av1/encoder/mips/msa/fdct16x16_msa.c +++ b/av1/encoder/mips/msa/fdct16x16_msa.c @@ -405,7 +405,7 @@ static void postproc_fdct16x8_1d_row(int16_t *intermediate, int16_t *output) { } void av1_fht16x16_msa(const int16_t *input, int16_t *output, int32_t stride, - int32_t tx_type) { + int32_t tx_type) { DECLARE_ALIGNED(32, int16_t, tmp[256]); DECLARE_ALIGNED(32, int16_t, trans_buf[256]); DECLARE_ALIGNED(32, int16_t, tmp_buf[128]); diff --git a/av1/encoder/mips/msa/fdct4x4_msa.c b/av1/encoder/mips/msa/fdct4x4_msa.c index 767247cda..da1ac74f0 100644 --- a/av1/encoder/mips/msa/fdct4x4_msa.c +++ b/av1/encoder/mips/msa/fdct4x4_msa.c @@ -15,7 +15,7 @@ #include "av1/encoder/mips/msa/fdct_msa.h" void av1_fwht4x4_msa(const int16_t *input, int16_t *output, - int32_t src_stride) { + int32_t src_stride) { v8i16 in0, in1, in2, in3, in4; LD_SH4(input, src_stride, in0, in1, in2, in3); @@ -47,7 +47,7 @@ void av1_fwht4x4_msa(const int16_t *input, int16_t *output, } void av1_fht4x4_msa(const int16_t *input, int16_t *output, int32_t stride, - int32_t tx_type) { + int32_t tx_type) { v8i16 in0, in1, in2, in3; LD_SH4(input, stride, in0, in1, in2, in3); diff --git a/av1/encoder/mips/msa/fdct8x8_msa.c b/av1/encoder/mips/msa/fdct8x8_msa.c index 1a8fc3d8b..4cbf60a11 100644 --- a/av1/encoder/mips/msa/fdct8x8_msa.c +++ b/av1/encoder/mips/msa/fdct8x8_msa.c @@ -15,7 +15,7 @@ #include "av1/encoder/mips/msa/fdct_msa.h" void av1_fht8x8_msa(const int16_t *input, int16_t *output, int32_t stride, - int32_t tx_type) { + int32_t tx_type) { v8i16 in0, in1, in2, in3, in4, in5, in6, in7; LD_SH8(input, stride, in0, in1, in2, in3, in4, in5, in6, in7); diff --git a/av1/encoder/mips/msa/temporal_filter_msa.c b/av1/encoder/mips/msa/temporal_filter_msa.c index 9f0c8b7fb..4ec679642 100644 --- a/av1/encoder/mips/msa/temporal_filter_msa.c +++ b/av1/encoder/mips/msa/temporal_filter_msa.c @@ -267,10 +267,10 @@ static void temporal_filter_apply_16size_msa(uint8_t *frm1_ptr, uint32_t stride, } void av1_temporal_filter_apply_msa(uint8_t *frame1_ptr, uint32_t stride, - uint8_t *frame2_ptr, uint32_t blk_w, - uint32_t blk_h, int32_t strength, - int32_t filt_wgt, uint32_t *accu, - uint16_t *cnt) { + uint8_t *frame2_ptr, uint32_t blk_w, + uint32_t blk_h, int32_t strength, + int32_t filt_wgt, uint32_t *accu, + uint16_t *cnt) { if (8 == (blk_w * blk_h)) { temporal_filter_apply_8size_msa(frame1_ptr, stride, frame2_ptr, strength, filt_wgt, accu, cnt); @@ -279,6 +279,6 @@ void av1_temporal_filter_apply_msa(uint8_t *frame1_ptr, uint32_t stride, filt_wgt, accu, cnt); } else { av1_temporal_filter_apply_c(frame1_ptr, stride, frame2_ptr, blk_w, blk_h, - strength, filt_wgt, accu, cnt); + strength, filt_wgt, accu, cnt); } } diff --git a/av1/encoder/pickdering.c b/av1/encoder/pickdering.c index aa240d4c7..a3d917284 100644 --- a/av1/encoder/pickdering.c +++ b/av1/encoder/pickdering.c @@ -19,63 +19,61 @@ #include "aom/aom_integer.h" static double compute_dist(int16_t *x, int xstride, int16_t *y, int ystride, - int nhb, int nvb, int coeff_shift) { + int nhb, int nvb, int coeff_shift) { int i, j; double sum; sum = 0; for (i = 0; i < nvb << 3; i++) { for (j = 0; j < nhb << 3; j++) { double tmp; - tmp = x[i*xstride + j] - y[i*ystride + j]; - sum += tmp*tmp; + tmp = x[i * xstride + j] - y[i * ystride + j]; + sum += tmp * tmp; } } - return sum/(double)(1 << 2*coeff_shift); + return sum / (double)(1 << 2 * coeff_shift); } int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, - AV1_COMMON *cm, - MACROBLOCKD *xd) { + AV1_COMMON *cm, MACROBLOCKD *xd) { int r, c; int sbr, sbc; int nhsb, nvsb; od_dering_in *src; int16_t *ref_coeff; unsigned char *bskip; - int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = {{0}}; + int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = { { 0 } }; int stride; int bsize[3]; int dec[3]; int pli; - int (*mse)[MAX_DERING_LEVEL]; - double tot_mse[MAX_DERING_LEVEL] = {0}; + int(*mse)[MAX_DERING_LEVEL]; + double tot_mse[MAX_DERING_LEVEL] = { 0 }; int level; int best_level; int global_level; double best_tot_mse = 1e15; int coeff_shift = AOMMAX(cm->bit_depth - 8, 0); - src = aom_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64); - ref_coeff = aom_malloc(sizeof(*ref_coeff)*cm->mi_rows*cm->mi_cols*64); - bskip = aom_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols); + src = aom_malloc(sizeof(*src) * cm->mi_rows * cm->mi_cols * 64); + ref_coeff = aom_malloc(sizeof(*ref_coeff) * cm->mi_rows * cm->mi_cols * 64); + bskip = aom_malloc(sizeof(*bskip) * cm->mi_rows * cm->mi_cols); av1_setup_dst_planes(xd->plane, frame, 0, 0); for (pli = 0; pli < 3; pli++) { dec[pli] = xd->plane[pli].subsampling_x; bsize[pli] = 8 >> dec[pli]; } - stride = bsize[0]*cm->mi_cols; - for (r = 0; r < bsize[0]*cm->mi_rows; ++r) { - for (c = 0; c < bsize[0]*cm->mi_cols; ++c) { + stride = bsize[0] * cm->mi_cols; + for (r = 0; r < bsize[0] * cm->mi_rows; ++r) { + for (c = 0; c < bsize[0] * cm->mi_cols; ++c) { #if CONFIG_AOM_HIGHBITDEPTH if (cm->use_highbitdepth) { - src[r * stride + c] = - CONVERT_TO_SHORTPTR(xd->plane[0].dst.buf) - [r*xd->plane[0].dst.stride + c]; + src[r * stride + c] = CONVERT_TO_SHORTPTR( + xd->plane[0].dst.buf)[r * xd->plane[0].dst.stride + c]; ref_coeff[r * stride + c] = CONVERT_TO_SHORTPTR(ref->y_buffer)[r * ref->y_stride + c]; } else { #endif src[r * stride + c] = - xd->plane[0].dst.buf[r*xd->plane[0].dst.stride + c]; + xd->plane[0].dst.buf[r * xd->plane[0].dst.stride + c]; ref_coeff[r * stride + c] = ref->y_buffer[r * ref->y_stride + c]; #if CONFIG_AOM_HIGHBITDEPTH } @@ -89,34 +87,32 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, bskip[r * cm->mi_cols + c] = mbmi->skip; } } - nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; - nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; - mse = aom_malloc(nvsb*nhsb*sizeof(*mse)); + nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE; + nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE; + mse = aom_malloc(nvsb * nhsb * sizeof(*mse)); for (sbr = 0; sbr < nvsb; sbr++) { for (sbc = 0; sbc < nhsb; sbc++) { int nvb, nhb; - int16_t dst[MI_BLOCK_SIZE*MI_BLOCK_SIZE*8*8]; - nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc); - nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr); + int16_t dst[MI_BLOCK_SIZE * MI_BLOCK_SIZE * 8 * 8]; + nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE * sbc); + nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE * sbr); for (level = 0; level < 64; level++) { int cur_mse; int threshold; threshold = level << coeff_shift; od_dering( - &OD_DERING_VTBL_C, - dst, - MI_BLOCK_SIZE*bsize[0], - &src[sbr*stride*bsize[0]*MI_BLOCK_SIZE + - sbc*bsize[0]*MI_BLOCK_SIZE], - cm->mi_cols*bsize[0], nhb, nvb, sbc, sbr, nhsb, nvsb, 0, dir, 0, - &bskip[MI_BLOCK_SIZE*sbr*cm->mi_cols + MI_BLOCK_SIZE*sbc], + &OD_DERING_VTBL_C, dst, MI_BLOCK_SIZE * bsize[0], + &src[sbr * stride * bsize[0] * MI_BLOCK_SIZE + + sbc * bsize[0] * MI_BLOCK_SIZE], + cm->mi_cols * bsize[0], nhb, nvb, sbc, sbr, nhsb, nvsb, 0, dir, 0, + &bskip[MI_BLOCK_SIZE * sbr * cm->mi_cols + MI_BLOCK_SIZE * sbc], cm->mi_cols, threshold, OD_DERING_NO_CHECK_OVERLAP, coeff_shift); - cur_mse = (int)compute_dist( - dst, MI_BLOCK_SIZE*bsize[0], - &ref_coeff[sbr*stride*bsize[0]*MI_BLOCK_SIZE + - sbc*bsize[0]*MI_BLOCK_SIZE], + cur_mse = (int)compute_dist( + dst, MI_BLOCK_SIZE * bsize[0], + &ref_coeff[sbr * stride * bsize[0] * MI_BLOCK_SIZE + + sbc * bsize[0] * MI_BLOCK_SIZE], stride, nhb, nvb, coeff_shift); - mse[nhsb*sbr+sbc][level] = cur_mse; + mse[nhsb * sbr + sbc][level] = cur_mse; tot_mse[level] += cur_mse; } } @@ -129,11 +125,11 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, for (sbr = 0; sbr < nvsb; sbr++) { for (sbc = 0; sbc < nhsb; sbc++) { int gi; - int best_mse = mse[nhsb*sbr+sbc][0]; + int best_mse = mse[nhsb * sbr + sbc][0]; for (gi = 1; gi < 4; gi++) { level = compute_level_from_index(global_level, gi); - if (mse[nhsb*sbr+sbc][level] < best_mse) { - best_mse = mse[nhsb*sbr+sbc][level]; + if (mse[nhsb * sbr + sbc][level] < best_mse) { + best_mse = mse[nhsb * sbr + sbc][level]; } } tot_mse += best_mse; @@ -148,24 +144,25 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref, for (sbc = 0; sbc < nhsb; sbc++) { int gi; int best_gi; - int best_mse = mse[nhsb*sbr+sbc][0]; + int best_mse = mse[nhsb * sbr + sbc][0]; best_gi = 0; for (gi = 1; gi < DERING_REFINEMENT_LEVELS; gi++) { level = compute_level_from_index(best_level, gi); - if (mse[nhsb*sbr+sbc][level] < best_mse) { + if (mse[nhsb * sbr + sbc][level] < best_mse) { best_gi = gi; - best_mse = mse[nhsb*sbr+sbc][level]; + best_mse = mse[nhsb * sbr + sbc][level]; } } - cm->mi_grid_visible[MI_BLOCK_SIZE*sbr*cm->mi_stride + MI_BLOCK_SIZE*sbc]-> - mbmi.dering_gain = best_gi; + cm->mi_grid_visible[MI_BLOCK_SIZE * sbr * cm->mi_stride + + MI_BLOCK_SIZE * sbc] + ->mbmi.dering_gain = best_gi; } } #else - best_level = 0; - for (level = 0; level < MAX_DERING_LEVEL; level++) { - if (tot_mse[level] < tot_mse[best_level]) best_level = level; - } + best_level = 0; + for (level = 0; level < MAX_DERING_LEVEL; level++) { + if (tot_mse[level] < tot_mse[best_level]) best_level = level; + } #endif aom_free(src); aom_free(ref_coeff); diff --git a/av1/encoder/picklpf.c b/av1/encoder/picklpf.c index 9d8349c1e..e3cd63841 100644 --- a/av1/encoder/picklpf.c +++ b/av1/encoder/picklpf.c @@ -44,11 +44,11 @@ static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd, if (cpi->num_workers > 1) av1_loop_filter_frame_mt(cm->frame_to_show, cm, cpi->td.mb.e_mbd.plane, - filt_level, 1, partial_frame, cpi->workers, - cpi->num_workers, &cpi->lf_row_sync); + filt_level, 1, partial_frame, cpi->workers, + cpi->num_workers, &cpi->lf_row_sync); else av1_loop_filter_frame(cm->frame_to_show, cm, &cpi->td.mb.e_mbd, filt_level, - 1, partial_frame); + 1, partial_frame); #if CONFIG_AOM_HIGHBITDEPTH if (cm->use_highbitdepth) { @@ -147,7 +147,7 @@ static int search_filter_level(const YV12_BUFFER_CONFIG *sd, AV1_COMP *cpi, } void av1_pick_filter_level(const YV12_BUFFER_CONFIG *sd, AV1_COMP *cpi, - LPF_PICK_METHOD method) { + LPF_PICK_METHOD method) { AV1_COMMON *const cm = &cpi->common; struct loopfilter *const lf = &cm->lf; diff --git a/av1/encoder/quantize.c b/av1/encoder/quantize.c index bedfe7580..8f113edfd 100644 --- a/av1/encoder/quantize.c +++ b/av1/encoder/quantize.c @@ -22,17 +22,17 @@ #include "av1/encoder/rd.h" void av1_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, - int skip_block, const int16_t *zbin_ptr, - const int16_t *round_ptr, const int16_t *quant_ptr, - const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, - tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, - uint16_t *eob_ptr, const int16_t *scan, - const int16_t *iscan + int skip_block, const int16_t *zbin_ptr, + const int16_t *round_ptr, const int16_t *quant_ptr, + const int16_t *quant_shift_ptr, tran_low_t *qcoeff_ptr, + tran_low_t *dqcoeff_ptr, const int16_t *dequant_ptr, + uint16_t *eob_ptr, const int16_t *scan, + const int16_t *iscan #if CONFIG_AOM_QM - , - const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr + , + const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr #endif - ) { + ) { int i, eob = -1; // TODO(jingning) Decide the need of these arguments after the // quantization process is completed. @@ -79,18 +79,18 @@ void av1_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, #if CONFIG_AOM_HIGHBITDEPTH void av1_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count, - int skip_block, const int16_t *zbin_ptr, - const int16_t *round_ptr, - const int16_t *quant_ptr, - const int16_t *quant_shift_ptr, - tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, - const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan + int skip_block, const int16_t *zbin_ptr, + const int16_t *round_ptr, + const int16_t *quant_ptr, + const int16_t *quant_shift_ptr, + tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, + const int16_t *dequant_ptr, uint16_t *eob_ptr, + const int16_t *scan, const int16_t *iscan #if CONFIG_AOM_QM - , - const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr + , + const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr #endif - ) { + ) { int i; int eob = -1; // TODO(jingning) Decide the need of these arguments after the @@ -138,18 +138,17 @@ void av1_highbd_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t count, // TODO(jingning) Refactor this file and combine functions with similar // operations. void av1_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs, - int skip_block, const int16_t *zbin_ptr, - const int16_t *round_ptr, - const int16_t *quant_ptr, - const int16_t *quant_shift_ptr, - tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, - const int16_t *dequant_ptr, uint16_t *eob_ptr, - const int16_t *scan, const int16_t *iscan + int skip_block, const int16_t *zbin_ptr, + const int16_t *round_ptr, const int16_t *quant_ptr, + const int16_t *quant_shift_ptr, + tran_low_t *qcoeff_ptr, tran_low_t *dqcoeff_ptr, + const int16_t *dequant_ptr, uint16_t *eob_ptr, + const int16_t *scan, const int16_t *iscan #if CONFIG_AOM_QM - , - const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr + , + const qm_val_t *qm_ptr, const qm_val_t *iqm_ptr #endif - ) { + ) { int i, eob = -1; (void)zbin_ptr; (void)quant_shift_ptr; @@ -260,7 +259,7 @@ void av1_highbd_quantize_fp_32x32_c( #endif void av1_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, - const int16_t *scan, const int16_t *iscan) { + const int16_t *scan, const int16_t *iscan) { MACROBLOCKD *const xd = &x->e_mbd; struct macroblock_plane *p = &x->plane[plane]; struct macroblockd_plane *pd = &xd->plane[plane]; @@ -280,8 +279,7 @@ void av1_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, #if !CONFIG_AOM_QM &p->eobs[block], scan, iscan); #else - &p->eobs[block], scan, iscan, - qmatrix, iqmatrix); + &p->eobs[block], scan, iscan, qmatrix, iqmatrix); #endif return; } @@ -291,10 +289,9 @@ void av1_regular_quantize_b_4x4(MACROBLOCK *x, int plane, int block, BLOCK_OFFSET(p->qcoeff, block), BLOCK_OFFSET(pd->dqcoeff, block), pd->dequant, &p->eobs[block], #if !CONFIG_AOM_QM - scan, iscan); + scan, iscan); #else - scan, iscan, - qmatrix, iqmatrix); + scan, iscan, qmatrix, iqmatrix); #endif } @@ -312,12 +309,9 @@ static int get_qzbin_factor(int q, aom_bit_depth_t bit_depth) { const int quant = av1_dc_quant(q, 0, bit_depth); #if CONFIG_AOM_HIGHBITDEPTH switch (bit_depth) { - case AOM_BITS_8: - return q == 0 ? 64 : (quant < 148 ? 84 : 80); - case AOM_BITS_10: - return q == 0 ? 64 : (quant < 592 ? 84 : 80); - case AOM_BITS_12: - return q == 0 ? 64 : (quant < 2368 ? 84 : 80); + case AOM_BITS_8: return q == 0 ? 64 : (quant < 148 ? 84 : 80); + case AOM_BITS_10: return q == 0 ? 64 : (quant < 592 ? 84 : 80); + case AOM_BITS_12: return q == 0 ? 64 : (quant < 2368 ? 84 : 80); default: assert(0 && "bit_depth should be AOM_BITS_8, AOM_BITS_10 or AOM_BITS_12"); return -1; diff --git a/av1/encoder/ratectrl.c b/av1/encoder/ratectrl.c index 9e65009f6..9ff1b5f8f 100644 --- a/av1/encoder/ratectrl.c +++ b/av1/encoder/ratectrl.c @@ -165,7 +165,7 @@ double av1_convert_qindex_to_q(int qindex, aom_bit_depth_t bit_depth) { } int av1_rc_bits_per_mb(FRAME_TYPE frame_type, int qindex, - double correction_factor, aom_bit_depth_t bit_depth) { + double correction_factor, aom_bit_depth_t bit_depth) { const double q = av1_convert_qindex_to_q(qindex, bit_depth); int enumerator = frame_type == KEY_FRAME ? 2700000 : 1800000; @@ -178,8 +178,8 @@ int av1_rc_bits_per_mb(FRAME_TYPE frame_type, int qindex, } int av1_estimate_bits_at_q(FRAME_TYPE frame_type, int q, int mbs, - double correction_factor, - aom_bit_depth_t bit_depth) { + double correction_factor, + aom_bit_depth_t bit_depth) { const int bpm = (int)(av1_rc_bits_per_mb(frame_type, q, correction_factor, bit_depth)); return AOMMAX(FRAME_OVERHEAD_BITS, @@ -239,7 +239,7 @@ static void update_buffer_level(AV1_COMP *cpi, int encoded_frame_size) { } int av1_rc_get_default_min_gf_interval(int width, int height, - double framerate) { + double framerate) { // Assume we do not need any constraint lower than 4K 20 fps static const double factor_safe = 3840 * 2160 * 20.0; const double factor = width * height * framerate; @@ -424,8 +424,8 @@ void av1_rc_update_rate_correction_factors(AV1_COMP *cpi) { av1_cyclic_refresh_estimate_bits_at_q(cpi, rate_correction_factor); } else { projected_size_based_on_q = - av1_estimate_bits_at_q(cpi->common.frame_type, cm->base_qindex, - cm->MBs, rate_correction_factor, cm->bit_depth); + av1_estimate_bits_at_q(cpi->common.frame_type, cm->base_qindex, cm->MBs, + rate_correction_factor, cm->bit_depth); } // Work out a size correction factor. if (projected_size_based_on_q > FRAME_OVERHEAD_BITS) @@ -470,7 +470,7 @@ void av1_rc_update_rate_correction_factors(AV1_COMP *cpi) { } int av1_rc_regulate_q(const AV1_COMP *cpi, int target_bits_per_frame, - int active_best_quality, int active_worst_quality) { + int active_best_quality, int active_worst_quality) { const AV1_COMMON *const cm = &cpi->common; int q = active_worst_quality; int last_error = INT_MAX; @@ -723,7 +723,7 @@ static int rc_pick_q_and_bounds_one_pass_cbr(const AV1_COMP *cpi, q = rc->last_boosted_qindex; } else { q = av1_rc_regulate_q(cpi, rc->this_frame_target, active_best_quality, - active_worst_quality); + active_worst_quality); if (q > *top_index) { // Special case when we are targeting the max allowed rate if (rc->this_frame_target >= rc->max_frame_bandwidth) @@ -888,7 +888,7 @@ static int rc_pick_q_and_bounds_one_pass_vbr(const AV1_COMP *cpi, q = rc->last_boosted_qindex; } else { q = av1_rc_regulate_q(cpi, rc->this_frame_target, active_best_quality, - active_worst_quality); + active_worst_quality); if (q > *top_index) { // Special case when we are targeting the max allowed rate if (rc->this_frame_target >= rc->max_frame_bandwidth) @@ -919,13 +919,13 @@ int av1_frame_type_qdelta(const AV1_COMP *cpi, int rf_level, int q) { const AV1_COMMON *const cm = &cpi->common; int qdelta = av1_compute_qdelta_by_rate(&cpi->rc, frame_type[rf_level], q, - rate_factor_deltas[rf_level], cm->bit_depth); + rate_factor_deltas[rf_level], cm->bit_depth); return qdelta; } #define STATIC_MOTION_THRESH 95 -static int rc_pick_q_and_bounds_two_pass(const AV1_COMP *cpi, - int *bottom_index, int *top_index) { +static int rc_pick_q_and_bounds_two_pass(const AV1_COMP *cpi, int *bottom_index, + int *top_index) { const AV1_COMMON *const cm = &cpi->common; const RATE_CONTROL *const rc = &cpi->rc; const AV1EncoderConfig *const oxcf = &cpi->oxcf; @@ -950,15 +950,15 @@ static int rc_pick_q_and_bounds_two_pass(const AV1_COMP *cpi, qindex = AOMMIN(rc->last_kf_qindex, rc->last_boosted_qindex); active_best_quality = qindex; last_boosted_q = av1_convert_qindex_to_q(qindex, cm->bit_depth); - delta_qindex = av1_compute_qdelta( - rc, last_boosted_q, last_boosted_q * 1.25, cm->bit_depth); + delta_qindex = av1_compute_qdelta(rc, last_boosted_q, + last_boosted_q * 1.25, cm->bit_depth); active_worst_quality = AOMMIN(qindex + delta_qindex, active_worst_quality); } else { qindex = rc->last_boosted_qindex; last_boosted_q = av1_convert_qindex_to_q(qindex, cm->bit_depth); - delta_qindex = av1_compute_qdelta( - rc, last_boosted_q, last_boosted_q * 0.75, cm->bit_depth); + delta_qindex = av1_compute_qdelta(rc, last_boosted_q, + last_boosted_q * 0.75, cm->bit_depth); active_best_quality = AOMMAX(qindex + delta_qindex, rc->best_quality); } } else { @@ -1053,8 +1053,8 @@ static int rc_pick_q_and_bounds_two_pass(const AV1_COMP *cpi, // Static forced key frames Q restrictions dealt with elsewhere. if (!(frame_is_intra_only(cm)) || !rc->this_key_frame_forced || (cpi->twopass.last_kfgroup_zeromotion_pct < STATIC_MOTION_THRESH)) { - int qdelta = av1_frame_type_qdelta( - cpi, gf_group->rf_level[gf_group->index], active_worst_quality); + int qdelta = av1_frame_type_qdelta(cpi, gf_group->rf_level[gf_group->index], + active_worst_quality); active_worst_quality = AOMMAX(active_worst_quality + qdelta, active_best_quality); } @@ -1085,7 +1085,7 @@ static int rc_pick_q_and_bounds_two_pass(const AV1_COMP *cpi, } } else { q = av1_rc_regulate_q(cpi, rc->this_frame_target, active_best_quality, - active_worst_quality); + active_worst_quality); if (q > active_worst_quality) { // Special case when we are targeting the max allowed rate. if (rc->this_frame_target >= rc->max_frame_bandwidth) @@ -1107,7 +1107,7 @@ static int rc_pick_q_and_bounds_two_pass(const AV1_COMP *cpi, } int av1_rc_pick_q_and_bounds(const AV1_COMP *cpi, int *bottom_index, - int *top_index) { + int *top_index) { int q; if (cpi->oxcf.pass == 0) { if (cpi->oxcf.rc_mode == AOM_CBR) @@ -1122,8 +1122,8 @@ int av1_rc_pick_q_and_bounds(const AV1_COMP *cpi, int *bottom_index, } void av1_rc_compute_frame_size_bounds(const AV1_COMP *cpi, int frame_target, - int *frame_under_shoot_limit, - int *frame_over_shoot_limit) { + int *frame_under_shoot_limit, + int *frame_over_shoot_limit) { if (cpi->oxcf.rc_mode == AOM_Q) { *frame_under_shoot_limit = 0; *frame_over_shoot_limit = INT_MAX; @@ -1470,7 +1470,7 @@ void av1_rc_get_one_pass_cbr_params(AV1_COMP *cpi) { } int av1_compute_qdelta(const RATE_CONTROL *rc, double qstart, double qtarget, - aom_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { int start_index = rc->worst_quality; int target_index = rc->worst_quality; int i; @@ -1491,8 +1491,8 @@ int av1_compute_qdelta(const RATE_CONTROL *rc, double qstart, double qtarget, } int av1_compute_qdelta_by_rate(const RATE_CONTROL *rc, FRAME_TYPE frame_type, - int qindex, double rate_target_ratio, - aom_bit_depth_t bit_depth) { + int qindex, double rate_target_ratio, + aom_bit_depth_t bit_depth) { int target_index = rc->worst_quality; int i; @@ -1515,7 +1515,7 @@ int av1_compute_qdelta_by_rate(const RATE_CONTROL *rc, FRAME_TYPE frame_type, } void av1_rc_set_gf_interval_range(const AV1_COMP *const cpi, - RATE_CONTROL *const rc) { + RATE_CONTROL *const rc) { const AV1EncoderConfig *const oxcf = &cpi->oxcf; // Special case code for 1 pass fixed Q mode tests @@ -1703,7 +1703,7 @@ int av1_resize_one_pass_cbr(AV1_COMP *cpi) { : rc->this_frame_target / tot_scale_change; active_worst_quality = calc_active_worst_quality_one_pass_cbr(cpi); qindex = av1_rc_regulate_q(cpi, target_bits_per_frame, rc->best_quality, - active_worst_quality); + active_worst_quality); // If resize is down, check if projected q index is close to worst_quality, // and if so, reduce the rate correction factor (since likely can afford // lower q for resized frame). diff --git a/av1/encoder/rd.c b/av1/encoder/rd.c index d7e94f922..67343bce9 100644 --- a/av1/encoder/rd.c +++ b/av1/encoder/rd.c @@ -73,26 +73,25 @@ static void fill_mode_costs(AV1_COMP *cpi) { for (i = 0; i < INTRA_MODES; ++i) for (j = 0; j < INTRA_MODES; ++j) av1_cost_tokens(cpi->y_mode_costs[i][j], av1_kf_y_mode_prob[i][j], - av1_intra_mode_tree); + av1_intra_mode_tree); av1_cost_tokens(cpi->mbmode_cost, fc->y_mode_prob[1], av1_intra_mode_tree); for (i = 0; i < INTRA_MODES; ++i) av1_cost_tokens(cpi->intra_uv_mode_cost[i], fc->uv_mode_prob[i], - av1_intra_mode_tree); + av1_intra_mode_tree); for (i = 0; i < SWITCHABLE_FILTER_CONTEXTS; ++i) av1_cost_tokens(cpi->switchable_interp_costs[i], - fc->switchable_interp_prob[i], - av1_switchable_interp_tree); + fc->switchable_interp_prob[i], av1_switchable_interp_tree); for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { for (j = 0; j < TX_TYPES; ++j) av1_cost_tokens(cpi->intra_tx_type_costs[i][j], - fc->intra_ext_tx_prob[i][j], av1_ext_tx_tree); + fc->intra_ext_tx_prob[i][j], av1_ext_tx_tree); } for (i = TX_4X4; i < EXT_TX_SIZES; ++i) { av1_cost_tokens(cpi->inter_tx_type_costs[i], fc->inter_ext_tx_prob[i], - av1_ext_tx_tree); + av1_ext_tx_tree); } } @@ -109,7 +108,7 @@ static void fill_token_costs(av1_coeff_cost *c, av1_model_to_full_probs(p[t][i][j][k][l], probs); av1_cost_tokens((int *)c[t][i][j][k][0][l], probs, av1_coef_tree); av1_cost_tokens_skip((int *)c[t][i][j][k][1][l], probs, - av1_coef_tree); + av1_coef_tree); assert(c[t][i][j][k][0][l][EOB_TOKEN] == c[t][i][j][k][1][l][EOB_TOKEN]); } @@ -296,7 +295,7 @@ void av1_initialize_rd_consts(AV1_COMP *cpi) { cm->frame_type == KEY_FRAME) { for (i = 0; i < PARTITION_CONTEXTS; ++i) av1_cost_tokens(cpi->partition_cost[i], cm->fc->partition_prob[i], - av1_partition_tree); + av1_partition_tree); } fill_mode_costs(cpi); @@ -305,21 +304,21 @@ void av1_initialize_rd_consts(AV1_COMP *cpi) { #if CONFIG_REF_MV int nmv_ctx; for (nmv_ctx = 0; nmv_ctx < NMV_CONTEXTS; ++nmv_ctx) { - av1_build_nmv_cost_table(x->nmv_vec_cost[nmv_ctx], - cm->allow_high_precision_mv ? - x->nmvcost_hp[nmv_ctx] : x->nmvcost[nmv_ctx], - &cm->fc->nmvc[nmv_ctx], - cm->allow_high_precision_mv); + av1_build_nmv_cost_table( + x->nmv_vec_cost[nmv_ctx], + cm->allow_high_precision_mv ? x->nmvcost_hp[nmv_ctx] + : x->nmvcost[nmv_ctx], + &cm->fc->nmvc[nmv_ctx], cm->allow_high_precision_mv); } x->mvcost = x->mv_cost_stack[0]; x->nmvjointcost = x->nmv_vec_cost[0]; x->mvsadcost = x->mvcost; x->nmvjointsadcost = x->nmvjointcost; #else - av1_build_nmv_cost_table(x->nmvjointcost, - cm->allow_high_precision_mv ? x->nmvcost_hp - : x->nmvcost, - &cm->fc->nmvc, cm->allow_high_precision_mv); + av1_build_nmv_cost_table( + x->nmvjointcost, + cm->allow_high_precision_mv ? x->nmvcost_hp : x->nmvcost, &cm->fc->nmvc, + cm->allow_high_precision_mv); #endif #if CONFIG_REF_MV @@ -344,7 +343,7 @@ void av1_initialize_rd_consts(AV1_COMP *cpi) { #else for (i = 0; i < INTER_MODE_CONTEXTS; ++i) av1_cost_tokens((int *)cpi->inter_mode_cost[i], - cm->fc->inter_mode_probs[i], av1_inter_mode_tree); + cm->fc->inter_mode_probs[i], av1_inter_mode_tree); #endif } } @@ -416,8 +415,8 @@ static void model_rd_norm(int xsq_q10, int *r_q10, int *d_q10) { } void av1_model_rd_from_var_lapndz(unsigned int var, unsigned int n_log2, - unsigned int qstep, int *rate, - int64_t *dist) { + unsigned int qstep, int *rate, + int64_t *dist) { // This function models the rate and distortion for a Laplacian // source with given variance when quantized with a uniform quantizer // with given stepsize. The closed form expressions are in: @@ -440,9 +439,9 @@ void av1_model_rd_from_var_lapndz(unsigned int var, unsigned int n_log2, } void av1_get_entropy_contexts(BLOCK_SIZE bsize, TX_SIZE tx_size, - const struct macroblockd_plane *pd, - ENTROPY_CONTEXT t_above[16], - ENTROPY_CONTEXT t_left[16]) { + const struct macroblockd_plane *pd, + ENTROPY_CONTEXT t_above[16], + ENTROPY_CONTEXT t_left[16]) { const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, pd); const int num_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize]; const int num_4x4_h = num_4x4_blocks_high_lookup[plane_bsize]; @@ -478,7 +477,7 @@ void av1_get_entropy_contexts(BLOCK_SIZE bsize, TX_SIZE tx_size, } void av1_mv_pred(AV1_COMP *cpi, MACROBLOCK *x, uint8_t *ref_y_buffer, - int ref_y_stride, int ref_frame, BLOCK_SIZE block_size) { + int ref_y_stride, int ref_frame, BLOCK_SIZE block_size) { int i; int zero_seen = 0; int best_index = 0; @@ -531,10 +530,10 @@ void av1_mv_pred(AV1_COMP *cpi, MACROBLOCK *x, uint8_t *ref_y_buffer, } void av1_setup_pred_block(const MACROBLOCKD *xd, - struct buf_2d dst[MAX_MB_PLANE], - const YV12_BUFFER_CONFIG *src, int mi_row, - int mi_col, const struct scale_factors *scale, - const struct scale_factors *scale_uv) { + struct buf_2d dst[MAX_MB_PLANE], + const YV12_BUFFER_CONFIG *src, int mi_row, int mi_col, + const struct scale_factors *scale, + const struct scale_factors *scale_uv) { int i; dst[0].buf = src->y_buffer; @@ -551,21 +550,21 @@ void av1_setup_pred_block(const MACROBLOCKD *xd, } int av1_raster_block_offset(BLOCK_SIZE plane_bsize, int raster_block, - int stride) { + int stride) { const int bw = b_width_log2_lookup[plane_bsize]; const int y = 4 * (raster_block >> bw); const int x = 4 * (raster_block & ((1 << bw) - 1)); return y * stride + x; } -int16_t *av1_raster_block_offset_int16(BLOCK_SIZE plane_bsize, - int raster_block, int16_t *base) { +int16_t *av1_raster_block_offset_int16(BLOCK_SIZE plane_bsize, int raster_block, + int16_t *base) { const int stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize]; return base + av1_raster_block_offset(plane_bsize, raster_block, stride); } YV12_BUFFER_CONFIG *av1_get_scaled_ref_frame(const AV1_COMP *cpi, - int ref_frame) { + int ref_frame) { const AV1_COMMON *const cm = &cpi->common; const int scaled_idx = cpi->scaled_ref_idx[ref_frame - 1]; const int ref_idx = get_ref_frame_buf_idx(cpi, ref_frame); @@ -574,8 +573,7 @@ YV12_BUFFER_CONFIG *av1_get_scaled_ref_frame(const AV1_COMP *cpi, : NULL; } -int av1_get_switchable_rate(const AV1_COMP *cpi, - const MACROBLOCKD *const xd) { +int av1_get_switchable_rate(const AV1_COMP *cpi, const MACROBLOCKD *const xd) { const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; const int ctx = av1_get_pred_context_switchable_interp(xd); return SWITCHABLE_INTERP_RATE_FACTOR * @@ -647,7 +645,7 @@ void av1_set_rd_speed_thresholds_sub8x8(AV1_COMP *cpi) { } void av1_update_rd_thresh_fact(int (*factor_buf)[MAX_MODES], int rd_thresh, - int bsize, int best_mode_index) { + int bsize, int best_mode_index) { if (rd_thresh > 0) { const int top_mode = bsize < BLOCK_8X8 ? MAX_REFS : MAX_MODES; int mode; @@ -668,7 +666,7 @@ void av1_update_rd_thresh_fact(int (*factor_buf)[MAX_MODES], int rd_thresh, } int av1_get_intra_cost_penalty(int qindex, int qdelta, - aom_bit_depth_t bit_depth) { + aom_bit_depth_t bit_depth) { const int q = av1_dc_quant(qindex, qdelta, bit_depth); #if CONFIG_AOM_HIGHBITDEPTH switch (bit_depth) { diff --git a/av1/encoder/rdopt.c b/av1/encoder/rdopt.c index 91e7e3f2d..32a745bdf 100644 --- a/av1/encoder/rdopt.c +++ b/av1/encoder/rdopt.c @@ -251,8 +251,8 @@ static void model_rd_for_sb(AV1_COMP *cpi, BLOCK_SIZE bsize, MACROBLOCK *x, dist_sum += dist; } else { av1_model_rd_from_var_lapndz(sum_sse, num_pels_log2_lookup[bs], - pd->dequant[1] >> dequant_shift, &rate, - &dist); + pd->dequant[1] >> dequant_shift, &rate, + &dist); rate_sum += rate; dist_sum += dist; } @@ -265,7 +265,7 @@ static void model_rd_for_sb(AV1_COMP *cpi, BLOCK_SIZE bsize, MACROBLOCK *x, } int64_t av1_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, - intptr_t block_size, int64_t *ssz) { + intptr_t block_size, int64_t *ssz) { int i; int64_t error = 0, sqcoeff = 0; @@ -280,7 +280,7 @@ int64_t av1_block_error_c(const tran_low_t *coeff, const tran_low_t *dqcoeff, } int64_t av1_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, - int block_size) { + int block_size) { int i; int64_t error = 0; @@ -294,8 +294,8 @@ int64_t av1_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff, #if CONFIG_AOM_HIGHBITDEPTH int64_t av1_highbd_block_error_c(const tran_low_t *coeff, - const tran_low_t *dqcoeff, - intptr_t block_size, int64_t *ssz, int bd) { + const tran_low_t *dqcoeff, intptr_t block_size, + int64_t *ssz, int bd) { int i; int64_t error = 0, sqcoeff = 0; int shift = 2 * (bd - 8); @@ -364,8 +364,8 @@ static int cost_coeffs(MACROBLOCK *x, int plane, int block, ENTROPY_CONTEXT *A, int16_t prev_t; EXTRABIT e; av1_get_token_extra(v, &prev_t, &e); - cost = (*token_costs)[0][pt][prev_t] + - av1_get_cost(prev_t, e, cat6_high_cost); + cost = + (*token_costs)[0][pt][prev_t] + av1_get_cost(prev_t, e, cat6_high_cost); token_cache[0] = av1_pt_energy_class[prev_t]; ++token_costs; @@ -382,8 +382,8 @@ static int cost_coeffs(MACROBLOCK *x, int plane, int block, ENTROPY_CONTEXT *A, av1_get_cost(t, e, cat6_high_cost); } else { pt = get_coef_context(nb, token_cache, c); - cost += (*token_costs)[!prev_t][pt][t] + - av1_get_cost(t, e, cat6_high_cost); + cost += + (*token_costs)[!prev_t][pt][t] + av1_get_cost(t, e, cat6_high_cost); token_cache[rc] = av1_pt_energy_class[t]; } prev_t = t; @@ -423,7 +423,7 @@ static void dist_block(MACROBLOCK *x, int plane, int block, TX_SIZE tx_size, #if CONFIG_AOM_HIGHBITDEPTH const int bd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? xd->bd : 8; *out_dist = av1_highbd_block_error(coeff, dqcoeff, 16 << ss_txfrm_size, - &this_sse, bd) >> + &this_sse, bd) >> shift; #else *out_dist = @@ -454,8 +454,8 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, if (!is_inter_block(mbmi)) { struct encode_b_args arg = { x, NULL, &mbmi->skip }; - av1_encode_block_intra(plane, block, blk_row, blk_col, plane_bsize, - tx_size, &arg); + av1_encode_block_intra(plane, block, blk_row, blk_col, plane_bsize, tx_size, + &arg); dist_block(x, plane, block, tx_size, &dist, &sse); } else if (max_txsize_lookup[plane_bsize] == tx_size) { if (x->skip_txfm[(plane << 2) + (block >> (tx_size << 1))] == @@ -469,7 +469,7 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col, tran_low_t *const coeff = BLOCK_OFFSET(x->plane[plane].coeff, block); tran_low_t *const dqcoeff = BLOCK_OFFSET(xd->plane[plane].dqcoeff, block); av1_xform_quant_dc(x, plane, block, blk_row, blk_col, plane_bsize, - tx_size); + tx_size); sse = x->bsse[(plane << 2) + (block >> (tx_size << 1))] << 4; dist = sse; if (x->plane[plane].eobs[block]) { @@ -548,7 +548,7 @@ static void txfm_rd_in_plane(MACROBLOCK *x, int *rate, int64_t *distortion, args.so = get_scan(tx_size, tx_type); av1_foreach_transformed_block_in_plane(xd, bsize, plane, block_rd_txfm, - &args); + &args); if (args.exit_early) { *rate = INT_MAX; *distortion = INT64_MAX; @@ -675,8 +675,7 @@ static void choose_tx_size_from_rd(AV1_COMP *cpi, MACROBLOCK *x, int *rate, for (tx_type = DCT_DCT; tx_type < TX_TYPES; ++tx_type) { #if CONFIG_REF_MV - if (mbmi->ref_mv_idx > 0 && tx_type != DCT_DCT) - continue; + if (mbmi->ref_mv_idx > 0 && tx_type != DCT_DCT) continue; #endif last_rd = INT64_MAX; @@ -846,7 +845,7 @@ static int64_t rd_pick_intra4x4block(AV1_COMP *cpi, MACROBLOCK *x, int row, tran_low_t *const coeff = BLOCK_OFFSET(x->plane[0].coeff, block); xd->mi[0]->bmi[block].as_mode = mode; av1_predict_intra_block(xd, 1, 1, TX_4X4, mode, dst, dst_stride, dst, - dst_stride, col + idx, row + idy, 0); + dst_stride, col + idx, row + idy, 0); aom_highbd_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride, xd->bd); if (xd->lossless[xd->mi[0]->mbmi.segment_id]) { @@ -860,8 +859,8 @@ static int64_t rd_pick_intra4x4block(AV1_COMP *cpi, MACROBLOCK *x, int row, if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd) goto next_highbd; av1_highbd_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), dst, - dst_stride, p->eobs[block], xd->bd, - DCT_DCT, 1); + dst_stride, p->eobs[block], xd->bd, + DCT_DCT, 1); } else { int64_t unused; TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block); @@ -873,13 +872,13 @@ static int64_t rd_pick_intra4x4block(AV1_COMP *cpi, MACROBLOCK *x, int row, cpi->sf.use_fast_coef_costing); distortion += av1_highbd_block_error(coeff, BLOCK_OFFSET(pd->dqcoeff, block), - 16, &unused, xd->bd) >> + 16, &unused, xd->bd) >> 2; if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd) goto next_highbd; av1_highbd_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), dst, - dst_stride, p->eobs[block], xd->bd, - tx_type, 0); + dst_stride, p->eobs[block], xd->bd, + tx_type, 0); } } } @@ -941,7 +940,7 @@ static int64_t rd_pick_intra4x4block(AV1_COMP *cpi, MACROBLOCK *x, int row, tran_low_t *const coeff = BLOCK_OFFSET(x->plane[0].coeff, block); xd->mi[0]->bmi[block].as_mode = mode; av1_predict_intra_block(xd, 1, 1, TX_4X4, mode, dst, dst_stride, dst, - dst_stride, col + idx, row + idy, 0); + dst_stride, col + idx, row + idy, 0); aom_subtract_block(4, 4, src_diff, 8, src, src_stride, dst, dst_stride); if (xd->lossless[xd->mi[0]->mbmi.segment_id]) { @@ -955,7 +954,7 @@ static int64_t rd_pick_intra4x4block(AV1_COMP *cpi, MACROBLOCK *x, int row, if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd) goto next; av1_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), dst, - dst_stride, p->eobs[block], DCT_DCT, 1); + dst_stride, p->eobs[block], DCT_DCT, 1); } else { int64_t unused; TX_TYPE tx_type = get_tx_type(PLANE_TYPE_Y, xd, block); @@ -965,14 +964,13 @@ static int64_t rd_pick_intra4x4block(AV1_COMP *cpi, MACROBLOCK *x, int row, ratey += cost_coeffs(x, 0, block, tempa + idx, templ + idy, TX_4X4, so->scan, so->neighbors, cpi->sf.use_fast_coef_costing); - distortion += - av1_block_error(coeff, BLOCK_OFFSET(pd->dqcoeff, block), 16, - &unused) >> - 2; + distortion += av1_block_error(coeff, BLOCK_OFFSET(pd->dqcoeff, block), + 16, &unused) >> + 2; if (RDCOST(x->rdmult, x->rddiv, ratey, distortion) >= best_rd) goto next; av1_inv_txfm_add_4x4(BLOCK_OFFSET(pd->dqcoeff, block), dst, - dst_stride, p->eobs[block], tx_type, 0); + dst_stride, p->eobs[block], tx_type, 0); } } } @@ -1262,8 +1260,7 @@ static int cost_mv_ref(const AV1_COMP *cpi, PREDICTION_MODE mode, mode_cost = cpi->newmv_mode_cost[mode_ctx][1]; mode_ctx = (mode_context >> ZEROMV_OFFSET) & ZEROMV_CTX_MASK; - if (is_all_zero_mv) - return mode_cost; + if (is_all_zero_mv) return mode_cost; if (mode == ZEROMV) { mode_cost += cpi->zeromv_mode_cost[mode_ctx][0]; @@ -1272,12 +1269,9 @@ static int cost_mv_ref(const AV1_COMP *cpi, PREDICTION_MODE mode, mode_cost += cpi->zeromv_mode_cost[mode_ctx][1]; mode_ctx = (mode_context >> REFMV_OFFSET) & REFMV_CTX_MASK; - if (mode_context & (1 << SKIP_NEARESTMV_OFFSET)) - mode_ctx = 6; - if (mode_context & (1 << SKIP_NEARMV_OFFSET)) - mode_ctx = 7; - if (mode_context & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) - mode_ctx = 8; + if (mode_context & (1 << SKIP_NEARESTMV_OFFSET)) mode_ctx = 6; + if (mode_context & (1 << SKIP_NEARMV_OFFSET)) mode_ctx = 7; + if (mode_context & (1 << SKIP_NEARESTMV_SUB8X8_OFFSET)) mode_ctx = 8; mode_cost += cpi->refmv_mode_cost[mode_ctx][mode != NEARESTMV]; return mode_cost; @@ -1309,12 +1303,11 @@ static int set_and_cost_bmi_mvs(AV1_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd, case NEWMV: this_mv[0].as_int = seg_mvs[mbmi->ref_frame[0]].as_int; thismvcost += av1_mv_bit_cost(&this_mv[0].as_mv, &best_ref_mv[0]->as_mv, - mvjcost, mvcost, MV_COST_WEIGHT_SUB); + mvjcost, mvcost, MV_COST_WEIGHT_SUB); if (is_compound) { this_mv[1].as_int = seg_mvs[mbmi->ref_frame[1]].as_int; - thismvcost += - av1_mv_bit_cost(&this_mv[1].as_mv, &best_ref_mv[1]->as_mv, mvjcost, - mvcost, MV_COST_WEIGHT_SUB); + thismvcost += av1_mv_bit_cost(&this_mv[1].as_mv, &best_ref_mv[1]->as_mv, + mvjcost, mvcost, MV_COST_WEIGHT_SUB); } break; case NEARMV: @@ -1344,8 +1337,7 @@ static int set_and_cost_bmi_mvs(AV1_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd, mbmi_ext->ref_mvs[mbmi->ref_frame[1]][0].as_int; } else { mic->bmi[i].pred_mv[0].as_int = this_mv[0].as_int; - if (is_compound) - mic->bmi[i].pred_mv[1].as_int = this_mv[1].as_int; + if (is_compound) mic->bmi[i].pred_mv[1].as_int = this_mv[1].as_int; } #endif @@ -1354,8 +1346,8 @@ static int set_and_cost_bmi_mvs(AV1_COMP *cpi, MACROBLOCK *x, MACROBLOCKD *xd, memmove(&mic->bmi[i + idy * 2 + idx], &mic->bmi[i], sizeof(mic->bmi[i])); #if CONFIG_REF_MV - mode_ctx = av1_mode_context_analyzer(mbmi_ext->mode_context, - mbmi->ref_frame, mbmi->sb_type, i); + mode_ctx = av1_mode_context_analyzer(mbmi_ext->mode_context, mbmi->ref_frame, + mbmi->sb_type, i); #endif return cost_mv_ref(cpi, mode, mode_ctx) + thismvcost; } @@ -1401,12 +1393,11 @@ static int64_t encode_inter_mb_segment(AV1_COMP *cpi, MACROBLOCK *x, #if CONFIG_AOM_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { aom_highbd_subtract_block( - height, width, - av1_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff), 8, src, - p->src.stride, dst, pd->dst.stride, xd->bd); + height, width, av1_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff), + 8, src, p->src.stride, dst, pd->dst.stride, xd->bd); } else { - aom_subtract_block(height, width, av1_raster_block_offset_int16( - BLOCK_8X8, i, p->src_diff), + aom_subtract_block(height, width, + av1_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff), 8, src, p->src.stride, dst, pd->dst.stride); } #else @@ -1496,8 +1487,7 @@ static INLINE void mi_buf_shift(MACROBLOCK *x, int i) { &p->src.buf[av1_raster_block_offset(BLOCK_8X8, i, p->src.stride)]; assert(((intptr_t)pd->pre[0].buf & 0x7) == 0); pd->pre[0].buf = - &pd->pre[0] - .buf[av1_raster_block_offset(BLOCK_8X8, i, pd->pre[0].stride)]; + &pd->pre[0].buf[av1_raster_block_offset(BLOCK_8X8, i, pd->pre[0].stride)]; if (has_second_ref(mbmi)) pd->pre[1].buf = &pd->pre[1] @@ -1529,8 +1519,8 @@ static int check_best_zero_mv(const AV1_COMP *cpi, (ref_frames[1] == NONE || frame_mv[this_mode][ref_frames[1]].as_int == 0)) { #if CONFIG_REF_MV - int16_t rfc = av1_mode_context_analyzer(mode_context, - ref_frames, bsize, block); + int16_t rfc = + av1_mode_context_analyzer(mode_context, ref_frames, bsize, block); #else int16_t rfc = mode_context[ref_frames[0]]; #endif @@ -1608,7 +1598,7 @@ static void joint_motion_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, for (i = 0; i < MAX_MB_PLANE; i++) backup_yv12[ref][i] = xd->plane[i].pre[ref]; av1_setup_pre_planes(xd, ref, scaled_ref_frame[ref], mi_row, mi_col, - NULL); + NULL); } frame_mv[refs[ref]].as_int = single_newmv[refs[ref]].as_int; @@ -1618,10 +1608,10 @@ static void joint_motion_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, // frame we must use a unit scaling factor during mode selection. #if CONFIG_AOM_HIGHBITDEPTH av1_setup_scale_factors_for_frame(&sf, cm->width, cm->height, cm->width, - cm->height, cm->use_highbitdepth); + cm->height, cm->use_highbitdepth); #else av1_setup_scale_factors_for_frame(&sf, cm->width, cm->height, cm->width, - cm->height); + cm->height); #endif // CONFIG_AOM_HIGHBITDEPTH // Allow joint search multiple times iteratively for each reference frame @@ -1656,15 +1646,15 @@ static void joint_motion_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, } else { second_pred = (uint8_t *)second_pred_alloc_16; av1_build_inter_predictor(ref_yv12[!id].buf, ref_yv12[!id].stride, - second_pred, pw, &frame_mv[refs[!id]].as_mv, - &sf, pw, ph, 0, kernel, MV_PRECISION_Q3, - mi_col * MI_SIZE, mi_row * MI_SIZE); + second_pred, pw, &frame_mv[refs[!id]].as_mv, + &sf, pw, ph, 0, kernel, MV_PRECISION_Q3, + mi_col * MI_SIZE, mi_row * MI_SIZE); } #else av1_build_inter_predictor(ref_yv12[!id].buf, ref_yv12[!id].stride, - second_pred, pw, &frame_mv[refs[!id]].as_mv, &sf, - pw, ph, 0, kernel, MV_PRECISION_Q3, - mi_col * MI_SIZE, mi_row * MI_SIZE); + second_pred, pw, &frame_mv[refs[!id]].as_mv, &sf, + pw, ph, 0, kernel, MV_PRECISION_Q3, + mi_col * MI_SIZE, mi_row * MI_SIZE); #endif // CONFIG_AOM_HIGHBITDEPTH // Do compound motion search on the current reference frame. @@ -1682,11 +1672,11 @@ static void joint_motion_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, #endif // Small-range full-pixel motion search. bestsme = av1_refining_search_8p_c(x, &tmp_mv, sadpb, search_range, - &cpi->fn_ptr[bsize], &ref_mv[id].as_mv, - second_pred); + &cpi->fn_ptr[bsize], &ref_mv[id].as_mv, + second_pred); if (bestsme < INT_MAX) bestsme = av1_get_mvpred_av_var(x, &tmp_mv, &ref_mv[id].as_mv, - second_pred, &cpi->fn_ptr[bsize], 1); + second_pred, &cpi->fn_ptr[bsize], 1); x->mv_col_min = tmp_col_min; x->mv_col_max = tmp_col_max; @@ -1725,8 +1715,8 @@ static void joint_motion_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, } *rate_mv += av1_mv_bit_cost(&frame_mv[refs[ref]].as_mv, - &x->mbmi_ext->ref_mvs[refs[ref]][0].as_mv, - x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); + &x->mbmi_ext->ref_mvs[refs[ref]][0].as_mv, + x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); } } @@ -1795,9 +1785,9 @@ static int64_t rd_pick_best_sub8x8_mode( for (ref = 0; ref < 1 + has_second_rf; ++ref) { const MV_REFERENCE_FRAME frame = mbmi->ref_frame[ref]; frame_mv[ZEROMV][frame].as_int = 0; - av1_append_sub8x8_mvs_for_idx( - cm, xd, i, ref, mi_row, mi_col, &frame_mv[NEARESTMV][frame], - &frame_mv[NEARMV][frame]); + av1_append_sub8x8_mvs_for_idx(cm, xd, i, ref, mi_row, mi_col, + &frame_mv[NEARESTMV][frame], + &frame_mv[NEARMV][frame]); } // search for the best motion vector on this segment @@ -2171,30 +2161,29 @@ static void setup_buffer_inter(AV1_COMP *cpi, MACROBLOCK *x, av1_setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col, sf, sf); // Gets an initial list of candidate vectors from neighbours and orders them - av1_find_mv_refs(cm, xd, mi, ref_frame, + av1_find_mv_refs( + cm, xd, mi, ref_frame, #if CONFIG_REF_MV - &mbmi_ext->ref_mv_count[ref_frame], - mbmi_ext->ref_mv_stack[ref_frame], + &mbmi_ext->ref_mv_count[ref_frame], mbmi_ext->ref_mv_stack[ref_frame], #endif - candidates, mi_row, mi_col, NULL, - NULL, mbmi_ext->mode_context); + candidates, mi_row, mi_col, NULL, NULL, mbmi_ext->mode_context); // Candidate refinement carried out at encoder and decoder av1_find_best_ref_mvs(cm->allow_high_precision_mv, candidates, - &frame_nearest_mv[ref_frame], - &frame_near_mv[ref_frame]); + &frame_nearest_mv[ref_frame], + &frame_near_mv[ref_frame]); // Further refinement that is encode side only to test the top few candidates // in full and choose the best as the centre point for subsequent searches. // The current implementation doesn't support scaling. if (!av1_is_scaled(sf) && block_size >= BLOCK_8X8) av1_mv_pred(cpi, x, yv12_mb[ref_frame][0].buf, yv12->y_stride, ref_frame, - block_size); + block_size); } -static void single_motion_search(AV1_COMP *cpi, MACROBLOCK *x, - BLOCK_SIZE bsize, int mi_row, int mi_col, - int_mv *tmp_mv, int *rate_mv) { +static void single_motion_search(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize, + int mi_row, int mi_col, int_mv *tmp_mv, + int *rate_mv) { MACROBLOCKD *xd = &x->e_mbd; const AV1_COMMON *cm = &cpi->common; MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi; @@ -2289,8 +2278,8 @@ static void single_motion_search(AV1_COMP *cpi, MACROBLOCK *x, mvp_full.row >>= 3; bestsme = av1_full_pixel_search(cpi, x, bsize, &mvp_full, step_param, sadpb, - cond_cost_list(cpi, cost_list), &ref_mv, - &tmp_mv->as_mv, INT_MAX, 1); + cond_cost_list(cpi, cost_list), &ref_mv, + &tmp_mv->as_mv, INT_MAX, 1); x->mv_col_min = tmp_col_min; x->mv_col_max = tmp_col_max; @@ -2306,7 +2295,7 @@ static void single_motion_search(AV1_COMP *cpi, MACROBLOCK *x, x->nmvjointcost, x->mvcost, &dis, &x->pred_sse[ref], NULL, 0, 0); } *rate_mv = av1_mv_bit_cost(&tmp_mv->as_mv, &ref_mv, x->nmvjointcost, - x->mvcost, MV_COST_WEIGHT); + x->mvcost, MV_COST_WEIGHT); if (cpi->sf.adaptive_motion_search) x->pred_mv[ref] = tmp_mv->as_mv; @@ -2407,8 +2396,8 @@ static int64_t handle_inter_mode( int16_t mode_ctx = mbmi_ext->mode_context[refs[0]]; #if CONFIG_REF_MV - mode_ctx = av1_mode_context_analyzer(mbmi_ext->mode_context, - mbmi->ref_frame, bsize, -1); + mode_ctx = av1_mode_context_analyzer(mbmi_ext->mode_context, mbmi->ref_frame, + bsize, -1); #endif #if CONFIG_AOM_HIGHBITDEPTH @@ -2451,11 +2440,11 @@ static int64_t handle_inter_mode( single_newmv, &rate_mv); } else { rate_mv = av1_mv_bit_cost(&frame_mv[refs[0]].as_mv, - &x->mbmi_ext->ref_mvs[refs[0]][0].as_mv, - x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); + &x->mbmi_ext->ref_mvs[refs[0]][0].as_mv, + x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); rate_mv += av1_mv_bit_cost(&frame_mv[refs[1]].as_mv, - &x->mbmi_ext->ref_mvs[refs[1]][0].as_mv, - x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); + &x->mbmi_ext->ref_mvs[refs[1]][0].as_mv, + x->nmvjointcost, x->mvcost, MV_COST_WEIGHT); } *rate2 += rate_mv; } else { @@ -2498,8 +2487,7 @@ static int64_t handle_inter_mode( for (i = 0; i < 2; ++i) { lower_mv_precision(&cur_mv[i].as_mv, cm->allow_high_precision_mv); clamp_mv2(&cur_mv[i].as_mv, xd); - if (mv_check_bounds(x, &cur_mv[i].as_mv)) - return INT64_MAX; + if (mv_check_bounds(x, &cur_mv[i].as_mv)) return INT64_MAX; mbmi->mv[i].as_int = cur_mv[i].as_int; } } @@ -2515,8 +2503,7 @@ static int64_t handle_inter_mode( for (i = 0; i < 2; ++i) { lower_mv_precision(&cur_mv[i].as_mv, cm->allow_high_precision_mv); clamp_mv2(&cur_mv[i].as_mv, xd); - if (mv_check_bounds(x, &cur_mv[i].as_mv)) - return INT64_MAX; + if (mv_check_bounds(x, &cur_mv[i].as_mv)) return INT64_MAX; mbmi->mv[i].as_int = cur_mv[i].as_int; } } @@ -2540,8 +2527,7 @@ static int64_t handle_inter_mode( // // Under some circumstances we discount the cost of new mv mode to encourage // initiation of a motion field. - if (discount_newmv_test(cpi, this_mode, frame_mv[refs[0]], - mode_mv, refs[0])) + if (discount_newmv_test(cpi, this_mode, frame_mv[refs[0]], mode_mv, refs[0])) *rate2 += AOMMIN(cost_mv_ref(cpi, this_mode, mode_ctx), cost_mv_ref(cpi, NEARESTMV, mode_ctx)); else @@ -2755,8 +2741,8 @@ static int64_t handle_inter_mode( } void av1_rd_pick_intra_mode_sb(AV1_COMP *cpi, MACROBLOCK *x, RD_COST *rd_cost, - BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx, - int64_t best_rd) { + BLOCK_SIZE bsize, PICK_MODE_CONTEXT *ctx, + int64_t best_rd) { AV1_COMMON *const cm = &cpi->common; MACROBLOCKD *const xd = &x->e_mbd; struct macroblockd_plane *const pd = xd->plane; @@ -2822,14 +2808,13 @@ static void rd_variance_adjustment(AV1_COMP *cpi, MACROBLOCK *x, #if CONFIG_AOM_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { recon_variance = av1_high_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, - bsize, xd->bd); + bsize, xd->bd); } else { recon_variance = av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); } #else - recon_variance = - av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); + recon_variance = av1_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize); #endif // CONFIG_AOM_HIGHBITDEPTH if ((source_variance + recon_variance) > LOW_VAR_THRESH) { @@ -2930,8 +2915,7 @@ int av1_active_edge_sb(AV1_COMP *cpi, int mi_row, int mi_col) { void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, MACROBLOCK *x, int mi_row, int mi_col, RD_COST *rd_cost, BLOCK_SIZE bsize, - PICK_MODE_CONTEXT *ctx, - int64_t best_rd_so_far) { + PICK_MODE_CONTEXT *ctx, int64_t best_rd_so_far) { AV1_COMMON *const cm = &cpi->common; RD_OPT *const rd_opt = &cpi->rd; SPEED_FEATURES *const sf = &cpi->sf; @@ -3023,11 +3007,9 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, MODE_INFO *const mi = xd->mi[0]; int_mv *const candidates = x->mbmi_ext->ref_mvs[ref_frame]; x->mbmi_ext->mode_context[ref_frame] = 0; - av1_find_mv_refs(cm, xd, mi, ref_frame, - &mbmi_ext->ref_mv_count[ref_frame], - mbmi_ext->ref_mv_stack[ref_frame], - candidates, mi_row, mi_col, - NULL, NULL, mbmi_ext->mode_context); + av1_find_mv_refs(cm, xd, mi, ref_frame, &mbmi_ext->ref_mv_count[ref_frame], + mbmi_ext->ref_mv_stack[ref_frame], candidates, mi_row, + mi_col, NULL, NULL, mbmi_ext->mode_context); if (mbmi_ext->ref_mv_count[ref_frame] < 2) { MV_REFERENCE_FRAME rf[2]; @@ -3285,19 +3267,17 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, #if CONFIG_REF_MV int_mv backup_ref_mv[2]; backup_ref_mv[0] = mbmi_ext->ref_mvs[ref_frame][0]; - if (comp_pred) - backup_ref_mv[1] = mbmi_ext->ref_mvs[second_ref_frame][0]; + if (comp_pred) backup_ref_mv[1] = mbmi_ext->ref_mvs[second_ref_frame][0]; mbmi->ref_mv_idx = 0; ref_frame_type = av1_ref_frame_type(mbmi->ref_frame); - if (this_mode == NEWMV && - mbmi_ext->ref_mv_count[ref_frame_type] > 1) { + if (this_mode == NEWMV && mbmi_ext->ref_mv_count[ref_frame_type] > 1) { int ref; for (ref = 0; ref < 1 + comp_pred; ++ref) { - int_mv this_mv = (ref == 0) ? - mbmi_ext->ref_mv_stack[ref_frame_type][0].this_mv : - mbmi_ext->ref_mv_stack[ref_frame_type][0].comp_mv; + int_mv this_mv = + (ref == 0) ? mbmi_ext->ref_mv_stack[ref_frame_type][0].this_mv + : mbmi_ext->ref_mv_stack[ref_frame_type][0].comp_mv; clamp_mv_ref(&this_mv.as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); lower_mv_precision(&this_mv.as_mv, cm->allow_high_precision_mv); mbmi_ext->ref_mvs[mbmi->ref_frame[ref]][0] = this_mv; @@ -3313,8 +3293,7 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, #if CONFIG_REF_MV if ((mbmi->mode == NEARMV && mbmi_ext->ref_mv_count[ref_frame_type] > 2) || - (mbmi->mode == NEWMV && - mbmi_ext->ref_mv_count[ref_frame_type] > 1)) { + (mbmi->mode == NEWMV && mbmi_ext->ref_mv_count[ref_frame_type] > 1)) { int_mv backup_mv = frame_mv[NEARMV][ref_frame]; MB_MODE_INFO backup_mbmi = *mbmi; int backup_skip = x->skip; @@ -3325,14 +3304,13 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, int idx_offset = (mbmi->mode == NEARMV) ? 1 : 0; int ref_set = AOMMIN(2, mbmi_ext->ref_mv_count[ref_frame_type] - 1 - idx_offset); - uint8_t drl_ctx = av1_drl_ctx(mbmi_ext->ref_mv_stack[ref_frame_type], - idx_offset); + uint8_t drl_ctx = + av1_drl_ctx(mbmi_ext->ref_mv_stack[ref_frame_type], idx_offset); // Dummy int_mv backup_fmv[2]; backup_fmv[0] = frame_mv[NEWMV][ref_frame]; - if (comp_pred) - backup_fmv[1] = frame_mv[NEWMV][second_ref_frame]; + if (comp_pred) backup_fmv[1] = frame_mv[NEWMV][second_ref_frame]; memcpy(backup_zcoeff_blk, x->zcoeff_blk[mbmi->tx_size], sizeof(backup_zcoeff_blk[0]) * ctx->num_4x4_blk); @@ -3340,14 +3318,15 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, rate2 += cpi->drl_mode_cost[drl_ctx][0]; if (this_rd < INT64_MAX) { - if (RDCOST(x->rdmult, x->rddiv, - rate_y + rate_uv + rate_skip0, distortion2) < + if (RDCOST(x->rdmult, x->rddiv, rate_y + rate_uv + rate_skip0, + distortion2) < RDCOST(x->rdmult, x->rddiv, rate_skip1, total_sse)) - tmp_ref_rd = RDCOST(x->rdmult, x->rddiv, - rate2 + rate_skip0, distortion2); + tmp_ref_rd = + RDCOST(x->rdmult, x->rddiv, rate2 + rate_skip0, distortion2); else - tmp_ref_rd = RDCOST(x->rdmult, x->rddiv, - rate2 + rate_skip1 - rate_y - rate_uv, total_sse); + tmp_ref_rd = + RDCOST(x->rdmult, x->rddiv, + rate2 + rate_skip1 - rate_y - rate_uv, total_sse); } for (ref_idx = 0; ref_idx < ref_set; ++ref_idx) { @@ -3362,41 +3341,38 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, mbmi->ref_mv_idx = 1 + ref_idx; for (ref = 0; ref < 1 + comp_pred; ++ref) { - int_mv this_mv = (ref == 0) ? - mbmi_ext->ref_mv_stack[ref_frame_type] - [mbmi->ref_mv_idx].this_mv : - mbmi_ext->ref_mv_stack[ref_frame_type] - [mbmi->ref_mv_idx].comp_mv; + int_mv this_mv = + (ref == 0) + ? mbmi_ext->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx] + .this_mv + : mbmi_ext->ref_mv_stack[ref_frame_type][mbmi->ref_mv_idx] + .comp_mv; clamp_mv_ref(&this_mv.as_mv, xd->n8_w << 3, xd->n8_h << 3, xd); lower_mv_precision(&this_mv.as_mv, cm->allow_high_precision_mv); mbmi_ext->ref_mvs[mbmi->ref_frame[ref]][0] = this_mv; } - cur_mv = mbmi_ext->ref_mv_stack[ref_frame] - [mbmi->ref_mv_idx + idx_offset].this_mv; + cur_mv = + mbmi_ext->ref_mv_stack[ref_frame][mbmi->ref_mv_idx + idx_offset] + .this_mv; lower_mv_precision(&cur_mv.as_mv, cm->allow_high_precision_mv); clamp_mv2(&cur_mv.as_mv, xd); if (!mv_check_bounds(x, &cur_mv.as_mv)) { int64_t dummy_filter_cache[SWITCHABLE_FILTER_CONTEXTS]; - INTERP_FILTER dummy_single_inter_filter[MB_MODE_COUNT] - [MAX_REF_FRAMES]; + INTERP_FILTER + dummy_single_inter_filter[MB_MODE_COUNT][MAX_REF_FRAMES]; int dummy_single_skippable[MB_MODE_COUNT][MAX_REF_FRAMES]; int64_t dummy_mask_filter = 0; int_mv dummy_single_newmv[MAX_REF_FRAMES] = { { 0 } }; frame_mv[NEARMV][ref_frame] = cur_mv; - tmp_alt_rd = handle_inter_mode(cpi, x, bsize, - &tmp_rate, &tmp_dist, &tmp_skip, - &tmp_rate_y, &tmp_rate_uv, - &dummy_disable_skip, frame_mv, - mi_row, mi_col, - dummy_single_newmv, - dummy_single_inter_filter, - dummy_single_skippable, - &tmp_sse, best_rd, - &dummy_mask_filter, - dummy_filter_cache); + tmp_alt_rd = handle_inter_mode( + cpi, x, bsize, &tmp_rate, &tmp_dist, &tmp_skip, &tmp_rate_y, + &tmp_rate_uv, &dummy_disable_skip, frame_mv, mi_row, mi_col, + dummy_single_newmv, dummy_single_inter_filter, + dummy_single_skippable, &tmp_sse, best_rd, &dummy_mask_filter, + dummy_filter_cache); } for (i = 0; i < mbmi->ref_mv_idx; ++i) { @@ -3407,7 +3383,7 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, } if (mbmi_ext->ref_mv_count[ref_frame_type] > - mbmi->ref_mv_idx + idx_offset + 1 && + mbmi->ref_mv_idx + idx_offset + 1 && ref_idx < ref_set - 1) { uint8_t drl1_ctx = av1_drl_ctx(mbmi_ext->ref_mv_stack[ref_frame_type], @@ -3419,10 +3395,11 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, if (RDCOST(x->rdmult, x->rddiv, tmp_rate_y + tmp_rate_uv + rate_skip0, tmp_dist) < RDCOST(x->rdmult, x->rddiv, rate_skip1, tmp_sse)) - tmp_alt_rd = RDCOST(x->rdmult, x->rddiv, - tmp_rate + rate_skip0, tmp_dist); + tmp_alt_rd = + RDCOST(x->rdmult, x->rddiv, tmp_rate + rate_skip0, tmp_dist); else - tmp_alt_rd = RDCOST(x->rdmult, x->rddiv, + tmp_alt_rd = RDCOST( + x->rdmult, x->rddiv, tmp_rate + rate_skip1 - tmp_rate_y - tmp_rate_uv, tmp_sse); } @@ -3450,17 +3427,14 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, } frame_mv[NEARMV][ref_frame] = backup_mv; frame_mv[NEWMV][ref_frame] = backup_fmv[0]; - if (comp_pred) - frame_mv[NEWMV][second_ref_frame] = backup_fmv[1]; + if (comp_pred) frame_mv[NEWMV][second_ref_frame] = backup_fmv[1]; } mbmi_ext->ref_mvs[ref_frame][0] = backup_ref_mv[0]; - if (comp_pred) - mbmi_ext->ref_mvs[second_ref_frame][0] = backup_ref_mv[1]; + if (comp_pred) mbmi_ext->ref_mvs[second_ref_frame][0] = backup_ref_mv[1]; #endif - if (this_rd == INT64_MAX) - continue; + if (this_rd == INT64_MAX) continue; compmode_cost = av1_cost_bit(comp_mode_p, comp_pred); @@ -3484,8 +3458,8 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, rate2 += av1_cost_bit(av1_get_skip_prob(cm, xd), 1); } else if (ref_frame != INTRA_FRAME && !xd->lossless[mbmi->segment_id]) { #if CONFIG_REF_MV - if (RDCOST(x->rdmult, x->rddiv, - rate_y + rate_uv + rate_skip0, distortion2) < + if (RDCOST(x->rdmult, x->rddiv, rate_y + rate_uv + rate_skip0, + distortion2) < RDCOST(x->rdmult, x->rddiv, rate_skip1, total_sse)) { #else if (RDCOST(x->rdmult, x->rddiv, rate_y + rate_uv, distortion2) < @@ -3647,8 +3621,9 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, const uint8_t rf_type = av1_ref_frame_type(best_mbmode.ref_frame); if (!comp_pred_mode) { int i; - int ref_set = (mbmi_ext->ref_mv_count[rf_type] >= 2) ? - AOMMIN(2, mbmi_ext->ref_mv_count[rf_type] - 2) : INT_MAX; + int ref_set = (mbmi_ext->ref_mv_count[rf_type] >= 2) + ? AOMMIN(2, mbmi_ext->ref_mv_count[rf_type] - 2) + : INT_MAX; for (i = 0; i <= ref_set && ref_set != INT_MAX; ++i) { int_mv cur_mv = mbmi_ext->ref_mv_stack[rf_type][i + 1].this_mv; @@ -3672,8 +3647,9 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, int_mv nearmv[2] = { frame_mv[NEARMV][refs[0]], frame_mv[NEARMV][refs[1]] }; - int ref_set = (mbmi_ext->ref_mv_count[rf_type] >= 2) ? - AOMMIN(2, mbmi_ext->ref_mv_count[rf_type] - 2) : INT_MAX; + int ref_set = (mbmi_ext->ref_mv_count[rf_type] >= 2) + ? AOMMIN(2, mbmi_ext->ref_mv_count[rf_type] - 2) + : INT_MAX; for (i = 0; i <= ref_set && ref_set != INT_MAX; ++i) { nearmv[0] = mbmi_ext->ref_mv_stack[rf_type][i + 1].this_mv; @@ -3723,13 +3699,11 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, } #if CONFIG_REF_MV - if (best_mbmode.ref_frame[0] > INTRA_FRAME && - best_mbmode.mv[0].as_int == 0 && + if (best_mbmode.ref_frame[0] > INTRA_FRAME && best_mbmode.mv[0].as_int == 0 && (best_mbmode.ref_frame[1] == NONE || best_mbmode.mv[1].as_int == 0)) { int8_t ref_frame_type = av1_ref_frame_type(best_mbmode.ref_frame); int16_t mode_ctx = mbmi_ext->mode_context[ref_frame_type]; - if (mode_ctx & (1 << ALL_ZERO_FLAG_OFFSET)) - best_mbmode.mode = ZEROMV; + if (mode_ctx & (1 << ALL_ZERO_FLAG_OFFSET)) best_mbmode.mode = ZEROMV; } #endif @@ -3760,7 +3734,7 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, if (!cpi->rc.is_src_frame_alt_ref) av1_update_rd_thresh_fact(tile_data->thresh_freq_fact, - sf->adaptive_rd_thresh, bsize, best_mode_index); + sf->adaptive_rd_thresh, bsize, best_mode_index); // macroblock modes *mbmi = best_mbmode; @@ -3823,10 +3797,10 @@ void av1_rd_pick_inter_mode_sb(AV1_COMP *cpi, TileDataEnc *tile_data, } void av1_rd_pick_inter_mode_sb_seg_skip(AV1_COMP *cpi, TileDataEnc *tile_data, - MACROBLOCK *x, RD_COST *rd_cost, - BLOCK_SIZE bsize, - PICK_MODE_CONTEXT *ctx, - int64_t best_rd_so_far) { + MACROBLOCK *x, RD_COST *rd_cost, + BLOCK_SIZE bsize, + PICK_MODE_CONTEXT *ctx, + int64_t best_rd_so_far) { AV1_COMMON *const cm = &cpi->common; MACROBLOCKD *const xd = &x->e_mbd; MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi; @@ -3905,7 +3879,7 @@ void av1_rd_pick_inter_mode_sb_seg_skip(AV1_COMP *cpi, TileDataEnc *tile_data, (cm->interp_filter == mbmi->interp_filter)); av1_update_rd_thresh_fact(tile_data->thresh_freq_fact, - cpi->sf.adaptive_rd_thresh, bsize, THR_ZEROMV); + cpi->sf.adaptive_rd_thresh, bsize, THR_ZEROMV); av1_zero(best_pred_diff); av1_zero(best_filter_diff); @@ -4451,8 +4425,8 @@ void av1_rd_pick_inter_mode_sub8x8(AV1_COMP *cpi, TileDataEnc *tile_data, (cm->interp_filter == best_mbmode.interp_filter) || !is_inter_block(&best_mbmode)); - av1_update_rd_thresh_fact(tile_data->thresh_freq_fact, - sf->adaptive_rd_thresh, bsize, best_ref_index); + av1_update_rd_thresh_fact(tile_data->thresh_freq_fact, sf->adaptive_rd_thresh, + bsize, best_ref_index); // macroblock modes *mbmi = best_mbmode; diff --git a/av1/encoder/resize.c b/av1/encoder/resize.c index c5c5699dc..c380976b7 100644 --- a/av1/encoder/resize.c +++ b/av1/encoder/resize.c @@ -427,8 +427,8 @@ static void fill_arr_to_col(uint8_t *img, int stride, int len, uint8_t *arr) { } void av1_resize_plane(const uint8_t *const input, int height, int width, - int in_stride, uint8_t *output, int height2, int width2, - int out_stride) { + int in_stride, uint8_t *output, int height2, int width2, + int out_stride) { int i; uint8_t *intbuf = (uint8_t *)malloc(sizeof(uint8_t) * width2 * height); uint8_t *tmpbuf = @@ -716,8 +716,8 @@ static void highbd_fill_arr_to_col(uint16_t *img, int stride, int len, } void av1_highbd_resize_plane(const uint8_t *const input, int height, int width, - int in_stride, uint8_t *output, int height2, - int width2, int out_stride, int bd) { + int in_stride, uint8_t *output, int height2, + int width2, int out_stride, int bd) { int i; uint16_t *intbuf = (uint16_t *)malloc(sizeof(uint16_t) * width2 * height); uint16_t *tmpbuf = @@ -741,81 +741,81 @@ void av1_highbd_resize_plane(const uint8_t *const input, int height, int width, #endif // CONFIG_AOM_HIGHBITDEPTH void av1_resize_frame420(const uint8_t *const y, int y_stride, - const uint8_t *const u, const uint8_t *const v, - int uv_stride, int height, int width, uint8_t *oy, - int oy_stride, uint8_t *ou, uint8_t *ov, - int ouv_stride, int oheight, int owidth) { + const uint8_t *const u, const uint8_t *const v, + int uv_stride, int height, int width, uint8_t *oy, + int oy_stride, uint8_t *ou, uint8_t *ov, + int ouv_stride, int oheight, int owidth) { av1_resize_plane(y, height, width, y_stride, oy, oheight, owidth, oy_stride); av1_resize_plane(u, height / 2, width / 2, uv_stride, ou, oheight / 2, - owidth / 2, ouv_stride); + owidth / 2, ouv_stride); av1_resize_plane(v, height / 2, width / 2, uv_stride, ov, oheight / 2, - owidth / 2, ouv_stride); + owidth / 2, ouv_stride); } void av1_resize_frame422(const uint8_t *const y, int y_stride, - const uint8_t *const u, const uint8_t *const v, - int uv_stride, int height, int width, uint8_t *oy, - int oy_stride, uint8_t *ou, uint8_t *ov, - int ouv_stride, int oheight, int owidth) { + const uint8_t *const u, const uint8_t *const v, + int uv_stride, int height, int width, uint8_t *oy, + int oy_stride, uint8_t *ou, uint8_t *ov, + int ouv_stride, int oheight, int owidth) { av1_resize_plane(y, height, width, y_stride, oy, oheight, owidth, oy_stride); av1_resize_plane(u, height, width / 2, uv_stride, ou, oheight, owidth / 2, - ouv_stride); + ouv_stride); av1_resize_plane(v, height, width / 2, uv_stride, ov, oheight, owidth / 2, - ouv_stride); + ouv_stride); } void av1_resize_frame444(const uint8_t *const y, int y_stride, - const uint8_t *const u, const uint8_t *const v, - int uv_stride, int height, int width, uint8_t *oy, - int oy_stride, uint8_t *ou, uint8_t *ov, - int ouv_stride, int oheight, int owidth) { + const uint8_t *const u, const uint8_t *const v, + int uv_stride, int height, int width, uint8_t *oy, + int oy_stride, uint8_t *ou, uint8_t *ov, + int ouv_stride, int oheight, int owidth) { av1_resize_plane(y, height, width, y_stride, oy, oheight, owidth, oy_stride); av1_resize_plane(u, height, width, uv_stride, ou, oheight, owidth, - ouv_stride); + ouv_stride); av1_resize_plane(v, height, width, uv_stride, ov, oheight, owidth, - ouv_stride); + ouv_stride); } #if CONFIG_AOM_HIGHBITDEPTH void av1_highbd_resize_frame420(const uint8_t *const y, int y_stride, - const uint8_t *const u, const uint8_t *const v, - int uv_stride, int height, int width, - uint8_t *oy, int oy_stride, uint8_t *ou, - uint8_t *ov, int ouv_stride, int oheight, - int owidth, int bd) { + const uint8_t *const u, const uint8_t *const v, + int uv_stride, int height, int width, + uint8_t *oy, int oy_stride, uint8_t *ou, + uint8_t *ov, int ouv_stride, int oheight, + int owidth, int bd) { av1_highbd_resize_plane(y, height, width, y_stride, oy, oheight, owidth, - oy_stride, bd); + oy_stride, bd); av1_highbd_resize_plane(u, height / 2, width / 2, uv_stride, ou, oheight / 2, - owidth / 2, ouv_stride, bd); + owidth / 2, ouv_stride, bd); av1_highbd_resize_plane(v, height / 2, width / 2, uv_stride, ov, oheight / 2, - owidth / 2, ouv_stride, bd); + owidth / 2, ouv_stride, bd); } void av1_highbd_resize_frame422(const uint8_t *const y, int y_stride, - const uint8_t *const u, const uint8_t *const v, - int uv_stride, int height, int width, - uint8_t *oy, int oy_stride, uint8_t *ou, - uint8_t *ov, int ouv_stride, int oheight, - int owidth, int bd) { + const uint8_t *const u, const uint8_t *const v, + int uv_stride, int height, int width, + uint8_t *oy, int oy_stride, uint8_t *ou, + uint8_t *ov, int ouv_stride, int oheight, + int owidth, int bd) { av1_highbd_resize_plane(y, height, width, y_stride, oy, oheight, owidth, - oy_stride, bd); + oy_stride, bd); av1_highbd_resize_plane(u, height, width / 2, uv_stride, ou, oheight, - owidth / 2, ouv_stride, bd); + owidth / 2, ouv_stride, bd); av1_highbd_resize_plane(v, height, width / 2, uv_stride, ov, oheight, - owidth / 2, ouv_stride, bd); + owidth / 2, ouv_stride, bd); } void av1_highbd_resize_frame444(const uint8_t *const y, int y_stride, - const uint8_t *const u, const uint8_t *const v, - int uv_stride, int height, int width, - uint8_t *oy, int oy_stride, uint8_t *ou, - uint8_t *ov, int ouv_stride, int oheight, - int owidth, int bd) { + const uint8_t *const u, const uint8_t *const v, + int uv_stride, int height, int width, + uint8_t *oy, int oy_stride, uint8_t *ou, + uint8_t *ov, int ouv_stride, int oheight, + int owidth, int bd) { av1_highbd_resize_plane(y, height, width, y_stride, oy, oheight, owidth, - oy_stride, bd); + oy_stride, bd); av1_highbd_resize_plane(u, height, width, uv_stride, ou, oheight, owidth, - ouv_stride, bd); + ouv_stride, bd); av1_highbd_resize_plane(v, height, width, uv_stride, ov, oheight, owidth, - ouv_stride, bd); + ouv_stride, bd); } #endif // CONFIG_AOM_HIGHBITDEPTH diff --git a/av1/encoder/segmentation.c b/av1/encoder/segmentation.c index 5388b9436..a49c2db72 100644 --- a/av1/encoder/segmentation.c +++ b/av1/encoder/segmentation.c @@ -33,18 +33,18 @@ void av1_disable_segmentation(struct segmentation *seg) { } void av1_set_segment_data(struct segmentation *seg, signed char *feature_data, - unsigned char abs_delta) { + unsigned char abs_delta) { seg->abs_delta = abs_delta; memcpy(seg->feature_data, feature_data, sizeof(seg->feature_data)); } void av1_disable_segfeature(struct segmentation *seg, int segment_id, - SEG_LVL_FEATURES feature_id) { + SEG_LVL_FEATURES feature_id) { seg->feature_mask[segment_id] &= ~(1 << feature_id); } void av1_clear_segdata(struct segmentation *seg, int segment_id, - SEG_LVL_FEATURES feature_id) { + SEG_LVL_FEATURES feature_id) { seg->feature_data[segment_id][feature_id] = 0; } @@ -278,8 +278,8 @@ void av1_choose_segmap_coding_method(AV1_COMMON *cm, MACROBLOCKD *xd) { #if CONFIG_MISC_FIXES av1_prob_diff_update_savings_search(temporal_predictor_count[i], - segp->pred_probs[i], - &t_nopred_prob[i], DIFF_UPDATE_PROB); + segp->pred_probs[i], + &t_nopred_prob[i], DIFF_UPDATE_PROB); #else t_nopred_prob[i] = get_binary_prob(count0, count1); #endif diff --git a/av1/encoder/speed_features.c b/av1/encoder/speed_features.c index 185027523..78de03cef 100644 --- a/av1/encoder/speed_features.c +++ b/av1/encoder/speed_features.c @@ -568,8 +568,7 @@ void av1_set_speed_features_framesize_independent(AV1_COMP *cpi) { } else if (sf->mv.subpel_search_method == SUBPEL_TREE_PRUNED_MORE) { cpi->find_fractional_mv_step = av1_find_best_sub_pixel_tree_pruned_more; } else if (sf->mv.subpel_search_method == SUBPEL_TREE_PRUNED_EVENMORE) { - cpi->find_fractional_mv_step = - av1_find_best_sub_pixel_tree_pruned_evenmore; + cpi->find_fractional_mv_step = av1_find_best_sub_pixel_tree_pruned_evenmore; } #if !CONFIG_AOM_QM diff --git a/av1/encoder/subexp.c b/av1/encoder/subexp.c index 863536d83..74a3ca073 100644 --- a/av1/encoder/subexp.c +++ b/av1/encoder/subexp.c @@ -122,7 +122,7 @@ void av1_write_prob_diff_update(aom_writer *w, aom_prob newp, aom_prob oldp) { } int av1_prob_diff_update_savings_search(const unsigned int *ct, aom_prob oldp, - aom_prob *bestp, aom_prob upd) { + aom_prob *bestp, aom_prob upd) { const int old_b = cost_branch256(ct, oldp); int bestsavings = 0; aom_prob newp, bestnewp = oldp; @@ -142,9 +142,9 @@ int av1_prob_diff_update_savings_search(const unsigned int *ct, aom_prob oldp, } int av1_prob_diff_update_savings_search_model(const unsigned int *ct, - const aom_prob *oldp, - aom_prob *bestp, aom_prob upd, - int stepsize) { + const aom_prob *oldp, + aom_prob *bestp, aom_prob upd, + int stepsize) { int i, old_b, new_b, update_b, savings, bestsavings, step; int newp; aom_prob bestnewp, newplist[ENTROPY_NODES], oldplist[ENTROPY_NODES]; @@ -198,7 +198,7 @@ int av1_prob_diff_update_savings_search_model(const unsigned int *ct, } void av1_cond_prob_diff_update(aom_writer *w, aom_prob *oldp, - const unsigned int ct[2]) { + const unsigned int ct[2]) { const aom_prob upd = DIFF_UPDATE_PROB; aom_prob newp = get_binary_prob(ct[0], ct[1]); const int savings = @@ -214,7 +214,7 @@ void av1_cond_prob_diff_update(aom_writer *w, aom_prob *oldp, } int av1_cond_prob_diff_update_savings(aom_prob *oldp, - const unsigned int ct[2]) { + const unsigned int ct[2]) { const aom_prob upd = DIFF_UPDATE_PROB; aom_prob newp = get_binary_prob(ct[0], ct[1]); const int savings = diff --git a/av1/encoder/temporal_filter.c b/av1/encoder/temporal_filter.c index a61b6ffe8..7f9d4c07f 100644 --- a/av1/encoder/temporal_filter.c +++ b/av1/encoder/temporal_filter.c @@ -52,39 +52,39 @@ static void temporal_filter_predictors_mb_c( #if CONFIG_AOM_HIGHBITDEPTH if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) { - av1_highbd_build_inter_predictor(y_mb_ptr, stride, &pred[0], 16, &mv, - scale, 16, 16, which_mv, kernel, - MV_PRECISION_Q3, x, y, xd->bd); + av1_highbd_build_inter_predictor(y_mb_ptr, stride, &pred[0], 16, &mv, scale, + 16, 16, which_mv, kernel, MV_PRECISION_Q3, + x, y, xd->bd); av1_highbd_build_inter_predictor(u_mb_ptr, uv_stride, &pred[256], - uv_block_width, &mv, scale, - uv_block_width, uv_block_height, which_mv, - kernel, mv_precision_uv, x, y, xd->bd); + uv_block_width, &mv, scale, uv_block_width, + uv_block_height, which_mv, kernel, + mv_precision_uv, x, y, xd->bd); av1_highbd_build_inter_predictor(v_mb_ptr, uv_stride, &pred[512], - uv_block_width, &mv, scale, - uv_block_width, uv_block_height, which_mv, - kernel, mv_precision_uv, x, y, xd->bd); + uv_block_width, &mv, scale, uv_block_width, + uv_block_height, which_mv, kernel, + mv_precision_uv, x, y, xd->bd); return; } #endif // CONFIG_AOM_HIGHBITDEPTH av1_build_inter_predictor(y_mb_ptr, stride, &pred[0], 16, &mv, scale, 16, 16, - which_mv, kernel, MV_PRECISION_Q3, x, y); + which_mv, kernel, MV_PRECISION_Q3, x, y); av1_build_inter_predictor(u_mb_ptr, uv_stride, &pred[256], uv_block_width, - &mv, scale, uv_block_width, uv_block_height, - which_mv, kernel, mv_precision_uv, x, y); + &mv, scale, uv_block_width, uv_block_height, + which_mv, kernel, mv_precision_uv, x, y); av1_build_inter_predictor(v_mb_ptr, uv_stride, &pred[512], uv_block_width, - &mv, scale, uv_block_width, uv_block_height, - which_mv, kernel, mv_precision_uv, x, y); + &mv, scale, uv_block_width, uv_block_height, + which_mv, kernel, mv_precision_uv, x, y); } void av1_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, - uint8_t *frame2, unsigned int block_width, - unsigned int block_height, int strength, - int filter_weight, unsigned int *accumulator, - uint16_t *count) { + uint8_t *frame2, unsigned int block_width, + unsigned int block_height, int strength, + int filter_weight, unsigned int *accumulator, + uint16_t *count) { unsigned int i, j, k; int modifier; int byte = 0; @@ -340,30 +340,30 @@ static void temporal_filter_iterate_c(AV1_COMP *cpi, } else { // Apply the filter (YUV) av1_temporal_filter_apply(f->y_buffer + mb_y_offset, f->y_stride, - predictor, 16, 16, strength, - filter_weight, accumulator, count); + predictor, 16, 16, strength, + filter_weight, accumulator, count); av1_temporal_filter_apply(f->u_buffer + mb_uv_offset, f->uv_stride, - predictor + 256, mb_uv_width, - mb_uv_height, strength, filter_weight, - accumulator + 256, count + 256); + predictor + 256, mb_uv_width, + mb_uv_height, strength, filter_weight, + accumulator + 256, count + 256); av1_temporal_filter_apply(f->v_buffer + mb_uv_offset, f->uv_stride, - predictor + 512, mb_uv_width, - mb_uv_height, strength, filter_weight, - accumulator + 512, count + 512); + predictor + 512, mb_uv_width, + mb_uv_height, strength, filter_weight, + accumulator + 512, count + 512); } #else // Apply the filter (YUV) av1_temporal_filter_apply(f->y_buffer + mb_y_offset, f->y_stride, - predictor, 16, 16, strength, filter_weight, - accumulator, count); + predictor, 16, 16, strength, filter_weight, + accumulator, count); av1_temporal_filter_apply(f->u_buffer + mb_uv_offset, f->uv_stride, - predictor + 256, mb_uv_width, mb_uv_height, - strength, filter_weight, accumulator + 256, - count + 256); + predictor + 256, mb_uv_width, mb_uv_height, + strength, filter_weight, accumulator + 256, + count + 256); av1_temporal_filter_apply(f->v_buffer + mb_uv_offset, f->uv_stride, - predictor + 512, mb_uv_width, mb_uv_height, - strength, filter_weight, accumulator + 512, - count + 512); + predictor + 512, mb_uv_width, mb_uv_height, + strength, filter_weight, accumulator + 512, + count + 512); #endif // CONFIG_AOM_HIGHBITDEPTH } } @@ -526,10 +526,10 @@ static void adjust_arnr_filter(AV1_COMP *cpi, int distance, int group_boost, // Adjust the strength based on active max q. if (cpi->common.current_video_frame > 1) q = ((int)av1_convert_qindex_to_q(cpi->rc.avg_frame_qindex[INTER_FRAME], - cpi->common.bit_depth)); + cpi->common.bit_depth)); else q = ((int)av1_convert_qindex_to_q(cpi->rc.avg_frame_qindex[KEY_FRAME], - cpi->common.bit_depth)); + cpi->common.bit_depth)); if (q > 16) { strength = oxcf->arnr_strength; } else { diff --git a/av1/encoder/tokenize.c b/av1/encoder/tokenize.c index 0c386813b..5f7cb2203 100644 --- a/av1/encoder/tokenize.c +++ b/av1/encoder/tokenize.c @@ -278,48 +278,48 @@ static const aom_tree_index cat6_high12[36] = { #endif const av1_extra_bit av1_extra_bits[ENTROPY_TOKENS] = { - { 0, 0, 0, 0, zero_cost }, // ZERO_TOKEN - { 0, 0, 0, 1, sign_cost }, // ONE_TOKEN - { 0, 0, 0, 2, sign_cost }, // TWO_TOKEN - { 0, 0, 0, 3, sign_cost }, // THREE_TOKEN - { 0, 0, 0, 4, sign_cost }, // FOUR_TOKEN + { 0, 0, 0, 0, zero_cost }, // ZERO_TOKEN + { 0, 0, 0, 1, sign_cost }, // ONE_TOKEN + { 0, 0, 0, 2, sign_cost }, // TWO_TOKEN + { 0, 0, 0, 3, sign_cost }, // THREE_TOKEN + { 0, 0, 0, 4, sign_cost }, // FOUR_TOKEN { cat1, av1_cat1_prob, 1, CAT1_MIN_VAL, cat1_cost }, // CATEGORY1_TOKEN { cat2, av1_cat2_prob, 2, CAT2_MIN_VAL, cat2_cost }, // CATEGORY2_TOKEN { cat3, av1_cat3_prob, 3, CAT3_MIN_VAL, cat3_cost }, // CATEGORY3_TOKEN { cat4, av1_cat4_prob, 4, CAT4_MIN_VAL, cat4_cost }, // CATEGORY4_TOKEN { cat5, av1_cat5_prob, 5, CAT5_MIN_VAL, cat5_cost }, // CATEGORY5_TOKEN { cat6, av1_cat6_prob, 14, CAT6_MIN_VAL, 0 }, // CATEGORY6_TOKEN - { 0, 0, 0, 0, zero_cost } // EOB_TOKEN + { 0, 0, 0, 0, zero_cost } // EOB_TOKEN }; #if CONFIG_AOM_HIGHBITDEPTH const av1_extra_bit av1_extra_bits_high10[ENTROPY_TOKENS] = { - { 0, 0, 0, 0, zero_cost }, // ZERO - { 0, 0, 0, 1, sign_cost }, // ONE - { 0, 0, 0, 2, sign_cost }, // TWO - { 0, 0, 0, 3, sign_cost }, // THREE - { 0, 0, 0, 4, sign_cost }, // FOUR + { 0, 0, 0, 0, zero_cost }, // ZERO + { 0, 0, 0, 1, sign_cost }, // ONE + { 0, 0, 0, 2, sign_cost }, // TWO + { 0, 0, 0, 3, sign_cost }, // THREE + { 0, 0, 0, 4, sign_cost }, // FOUR { cat1_high10, av1_cat1_prob_high10, 1, CAT1_MIN_VAL, cat1_cost }, // CAT1 { cat2_high10, av1_cat2_prob_high10, 2, CAT2_MIN_VAL, cat2_cost }, // CAT2 { cat3_high10, av1_cat3_prob_high10, 3, CAT3_MIN_VAL, cat3_cost }, // CAT3 { cat4_high10, av1_cat4_prob_high10, 4, CAT4_MIN_VAL, cat4_cost }, // CAT4 { cat5_high10, av1_cat5_prob_high10, 5, CAT5_MIN_VAL, cat5_cost }, // CAT5 { cat6_high10, av1_cat6_prob_high10, 16, CAT6_MIN_VAL, 0 }, // CAT6 - { 0, 0, 0, 0, zero_cost } // EOB + { 0, 0, 0, 0, zero_cost } // EOB }; const av1_extra_bit av1_extra_bits_high12[ENTROPY_TOKENS] = { - { 0, 0, 0, 0, zero_cost }, // ZERO - { 0, 0, 0, 1, sign_cost }, // ONE - { 0, 0, 0, 2, sign_cost }, // TWO - { 0, 0, 0, 3, sign_cost }, // THREE - { 0, 0, 0, 4, sign_cost }, // FOUR + { 0, 0, 0, 0, zero_cost }, // ZERO + { 0, 0, 0, 1, sign_cost }, // ONE + { 0, 0, 0, 2, sign_cost }, // TWO + { 0, 0, 0, 3, sign_cost }, // THREE + { 0, 0, 0, 4, sign_cost }, // FOUR { cat1_high12, av1_cat1_prob_high12, 1, CAT1_MIN_VAL, cat1_cost }, // CAT1 { cat2_high12, av1_cat2_prob_high12, 2, CAT2_MIN_VAL, cat2_cost }, // CAT2 { cat3_high12, av1_cat3_prob_high12, 3, CAT3_MIN_VAL, cat3_cost }, // CAT3 { cat4_high12, av1_cat4_prob_high12, 4, CAT4_MIN_VAL, cat4_cost }, // CAT4 { cat5_high12, av1_cat5_prob_high12, 5, CAT5_MIN_VAL, cat5_cost }, // CAT5 { cat6_high12, av1_cat6_prob_high12, 18, CAT6_MIN_VAL, 0 }, // CAT6 - { 0, 0, 0, 0, zero_cost } // EOB + { 0, 0, 0, 0, zero_cost } // EOB }; #endif @@ -344,7 +344,7 @@ static void set_entropy_context_b(int plane, int block, int blk_row, struct macroblock_plane *p = &x->plane[plane]; struct macroblockd_plane *pd = &xd->plane[plane]; av1_set_contexts(xd, pd, plane_bsize, tx_size, p->eobs[block] > 0, blk_col, - blk_row); + blk_row); } static INLINE void add_token(TOKENEXTRA **t, const aom_prob *context_tree, @@ -473,7 +473,7 @@ int av1_is_skippable_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { int result = 1; struct is_skippable_args args = { x->plane[plane].eobs, &result }; av1_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, is_skippable, - &args); + &args); return result; } @@ -494,12 +494,12 @@ int av1_has_high_freq_in_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) { int result = 0; struct is_skippable_args args = { x->plane[plane].eobs, &result }; av1_foreach_transformed_block_in_plane(&x->e_mbd, bsize, plane, - has_high_freq_coeff, &args); + has_high_freq_coeff, &args); return result; } -void av1_tokenize_sb(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t, - int dry_run, BLOCK_SIZE bsize) { +void av1_tokenize_sb(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t, int dry_run, + BLOCK_SIZE bsize) { AV1_COMMON *const cm = &cpi->common; MACROBLOCK *const x = &td->mb; MACROBLOCKD *const xd = &x->e_mbd; @@ -521,7 +521,7 @@ void av1_tokenize_sb(AV1_COMP *cpi, ThreadData *td, TOKENEXTRA **t, for (plane = 0; plane < MAX_MB_PLANE; ++plane) { av1_foreach_transformed_block_in_plane(xd, bsize, plane, tokenize_b, - &arg); + &arg); (*t)->token = EOSB_TOKEN; (*t)++; } diff --git a/av1/encoder/treewriter.c b/av1/encoder/treewriter.c index 7c35b564a..50be72413 100644 --- a/av1/encoder/treewriter.c +++ b/av1/encoder/treewriter.c @@ -28,7 +28,7 @@ static void tree2tok(struct av1_token *tokens, const aom_tree_index *tree, } void av1_tokens_from_tree(struct av1_token *tokens, - const aom_tree_index *tree) { + const aom_tree_index *tree) { tree2tok(tokens, tree, 0, 0, 0); } @@ -53,7 +53,7 @@ static unsigned int convert_distribution(unsigned int i, aom_tree tree, } void av1_tree_probs_from_distribution(aom_tree tree, - unsigned int branch_ct[/* n-1 */][2], - const unsigned int num_events[/* n */]) { + unsigned int branch_ct[/* n-1 */][2], + const unsigned int num_events[/* n */]) { convert_distribution(0, tree, branch_ct, num_events); } diff --git a/av1/encoder/x86/dct_sse2.c b/av1/encoder/x86/dct_sse2.c index 693fed593..1daa2d12a 100644 --- a/av1/encoder/x86/dct_sse2.c +++ b/av1/encoder/x86/dct_sse2.c @@ -153,7 +153,7 @@ static void fadst4_sse2(__m128i *in) { } void av1_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { __m128i in[4]; switch (tx_type) { @@ -180,12 +180,14 @@ void av1_fht4x4_sse2(const int16_t *input, tran_low_t *output, int stride, } } -void av1_fdct8x8_quant_sse2( - const int16_t *input, int stride, int16_t *coeff_ptr, intptr_t n_coeffs, - int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, - const int16_t *quant_ptr, const int16_t *quant_shift_ptr, - int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, - uint16_t *eob_ptr, const int16_t *scan_ptr, const int16_t *iscan_ptr) { +void av1_fdct8x8_quant_sse2(const int16_t *input, int stride, + int16_t *coeff_ptr, intptr_t n_coeffs, + int skip_block, const int16_t *zbin_ptr, + const int16_t *round_ptr, const int16_t *quant_ptr, + const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr, + int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, + uint16_t *eob_ptr, const int16_t *scan_ptr, + const int16_t *iscan_ptr) { __m128i zero; int pass; // Constants @@ -1130,7 +1132,7 @@ static void fadst8_sse2(__m128i *in) { } void av1_fht8x8_sse2(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { __m128i in[8]; switch (tx_type) { @@ -2013,7 +2015,7 @@ static void fadst16_sse2(__m128i *in0, __m128i *in1) { } void av1_fht16x16_sse2(const int16_t *input, tran_low_t *output, int stride, - int tx_type) { + int tx_type) { __m128i in0[16], in1[16]; switch (tx_type) { diff --git a/av1/encoder/x86/error_intrin_avx2.c b/av1/encoder/x86/error_intrin_avx2.c index c1d889969..0d2e828e2 100644 --- a/av1/encoder/x86/error_intrin_avx2.c +++ b/av1/encoder/x86/error_intrin_avx2.c @@ -15,7 +15,7 @@ #include "aom/aom_integer.h" int64_t av1_block_error_avx2(const int16_t *coeff, const int16_t *dqcoeff, - intptr_t block_size, int64_t *ssz) { + intptr_t block_size, int64_t *ssz) { __m256i sse_reg, ssz_reg, coeff_reg, dqcoeff_reg; __m256i exp_dqcoeff_lo, exp_dqcoeff_hi, exp_coeff_lo, exp_coeff_hi; __m256i sse_reg_64hi, ssz_reg_64hi; diff --git a/av1/encoder/x86/highbd_block_error_intrin_sse2.c b/av1/encoder/x86/highbd_block_error_intrin_sse2.c index e105d54fb..777304ace 100644 --- a/av1/encoder/x86/highbd_block_error_intrin_sse2.c +++ b/av1/encoder/x86/highbd_block_error_intrin_sse2.c @@ -15,8 +15,8 @@ #include "av1/common/common.h" int64_t av1_highbd_block_error_sse2(tran_low_t *coeff, tran_low_t *dqcoeff, - intptr_t block_size, int64_t *ssz, - int bps) { + intptr_t block_size, int64_t *ssz, + int bps) { int i, j, test; uint32_t temp[4]; __m128i max, min, cmp0, cmp1, cmp2, cmp3; diff --git a/av1/encoder/x86/quantize_sse2.c b/av1/encoder/x86/quantize_sse2.c index 50eee353c..2c6df81be 100644 --- a/av1/encoder/x86/quantize_sse2.c +++ b/av1/encoder/x86/quantize_sse2.c @@ -16,12 +16,12 @@ #include "aom/aom_integer.h" void av1_quantize_fp_sse2(const int16_t* coeff_ptr, intptr_t n_coeffs, - int skip_block, const int16_t* zbin_ptr, - const int16_t* round_ptr, const int16_t* quant_ptr, - const int16_t* quant_shift_ptr, int16_t* qcoeff_ptr, - int16_t* dqcoeff_ptr, const int16_t* dequant_ptr, - uint16_t* eob_ptr, const int16_t* scan_ptr, - const int16_t* iscan_ptr) { + int skip_block, const int16_t* zbin_ptr, + const int16_t* round_ptr, const int16_t* quant_ptr, + const int16_t* quant_shift_ptr, int16_t* qcoeff_ptr, + int16_t* dqcoeff_ptr, const int16_t* dequant_ptr, + uint16_t* eob_ptr, const int16_t* scan_ptr, + const int16_t* iscan_ptr) { __m128i zero; __m128i thr; int16_t nzflag; -- GitLab