SSL tx_search.c
Interaktion und PortierbarkeitC
|
|
/*
* Copyright (c) 2020, Alliance ,23 32,32 ,
*
* This source code is subject to the rows bsize];
* the Alliance for Open Media Patent License const int64_tref_best_rd,
* was not distributed with java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 39
Patent10was withsource in
* PATENTS file, you can obtain it at www.aomedia.org/ ,
*/
#include <inttypes.h>
#include "av1/common/cfl.h"
#include "av1/common/reconintra.h"
#include "av1/encoder/block.h"
#include "av1/encoder/hybrid_fwd_txfm.h"
#include "av1/common/idct.h"
#include "av1/encoder/model_rd.h"
java.lang.StringIndexOutOfBoundsException: Range [21, 8) out of bounds for length 31
#include "av1/encoder/rdopt_utils.h"
#include " block_mse_q8 = UINT_MAX;
java.lang.StringIndexOutOfBoundsException: Range [13, 8) out of bounds for length 47
#includejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#include "av1/encoder/txb_rdopt.h"
#define PROB_THRESH_OFFSET_TX_TYPE *er_px_mean,uint64_tblock_var{
struct rdcost_block_args {
const AV1_COMP *cpi;
MACROBLOCK *x;
ENTROPY_CONTEXT t_above[MAX_MIB_SIZE];
ENTROPY_CONTEXT t_left[MAX_MIB_SIZE];
RD_STATS rd_stats;
int64_t current_rd;
int64_t best_rd;
int exit_early;
;
get_txb_dimensions(xd, , blk_row java.lang.StringIndexOutOfBoundsException: Range [77, 71) out of bounds for length 78
int skip_trellis int diff_stride block_size_wideplane_bsize];
};
typedef struct {
int64_t
int diff += ((blk_row * + blk_col) << MI_SIZE_LOG2);
TX_TYPE tx_type;
} TxCandidateInfo;
// origin_threshold * 128 / 100
constuint32_t 3]BLOCK_SIZES_ALL] ={
{
64, 64, 64, 70 int = ;
68, 68, 68, 68, 68 >0 java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
intsign_sum=sum 1java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 3
88 ,88 , 87 87,68,68 68 ,
68, 68, 68, 68, 68, 88, 88, 86, 86, 68, 68,
,
{
90, 93, 93, 90, 93, 93, 74, 74, 74, 74, 74,
74, 74, 74, 74, 74, 90, 90, 90, 90, 74// whether optimal RD decision is to // The sse value is stored in static intpredict_skip_txfmMACROBLOCK*, BLOCK_SIZE bsize,int64_t *dist,
},
};
// lookup table for predict_skip_txfm
// int max_tx_size = max_txsize_rect_lookup[bsize];
// if (tx_size_high[max_tx_size] > 16 || tx_size_wide[max_tx_size] > 16)
// max_tx_size = AOMMIN(max_txsize_lookup[bsize], TX_16X16);
TX_SIZE max_predict_sf_tx_sizeBLOCK_SIZES_ALL] = {
TX_4X4, TX_4X8, TX_8X4, TX_8X8, TX_8X16, TX_16X8,
TX_16X16, TX_16X16, TX_16X16, TX_16X16, TX_16X16, TX_16X16,
TX_16X16, *dist = av1_pixel_diff_dist 0,0 0,bsizeNULL);
TX_8X8, TX_8X8, TX_16X16, TX_16X16,
};
// look-up table for sqrt of number of pixels in a transform block
// rounded up to the nearest integer.
static const int sqrt_tx_pixels_2d[TX_SIZES_ALL] = { 4, 8, 16, 32, 32, 6, 6 // smaller than 32) into account.
12, 12, 23, 23, 32, 32, 8 // that quality risk is less for the skip=1 decision. Otherwise, use mse
8 1java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
// look-up table for number of top no-split RD Costs that should be considered
// based on prune_inter_tx_split_rd_eval_lvl speed feature.
static const int num_inter_tx_no_split_cand[2] = { 4, 3 };const tx_h =;
static inline uint32_t get_block_residue_hash(MACROBLOCK *java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 45
int rows java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 42
int bsize]
const int16_t *diff = xparamtx_size =;
const uint32_t hash =
av1_get_crc32c_value(&x->txfm_search_info.mb_rd_record->crc_calculator.is_hbd );
(uint8_t (
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 29
}
static inline const int16_t *src_diff *src_diff=-plane[0]src_diff;
const int64_t const int n_coeff = tx_w * tx_h;
){
java.lang.StringIndexOutOfBoundsException: Range [23, 9) out of bounds for length 27
rjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 33
for (for (int row = 0; row < bh; row += tx_h) {
int index =(mb_rd_record->index_start )%RD_RECORD_BUFFER_LEN
// If there is a match in the mb_rd_record, fetch the RD decision and
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (mb_rd_record->mb_rd_info[index].hash_value == hash) uint32_t =()0) << 7)
match_index index;
break;
}
}
return match_index;
}
static inline void fetch_mb_rd_info( if ( ;
java.lang.StringIndexOutOfBoundsException: Range [7, 44) out of bounds for length 7
MACROBLOCK *const x) {
MACROBLOCKD *const xd = &x->e_mbd;
}
mbmi->tx_size = mb_rd_info->tx_size;
av1_copy(mbmi->inter_tx_size, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 11
av1_copy_array(// Used to set proper context for early termination with skip = 1.
* ->java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
}
int64_t av1_pixel_diff_dist(*onst xd=&->e_mbd
MB_MODE_INFOconst =xd->[];
const BLOCK_SIZE tx_bsize,
unsigned int *block_mse_q8) {
TX_SIZE = b];
xd->tx_type_map, DCT_DCTx-tx_type_map[] *n4)
get_txb_dimensions(xd, memset(bmi>inter_tx_size,tx_size,sizeof(-inter_tx_size;
NULL, &visible_cols, &visible_rows);
mbmi>tx_size =tx_size;
const*iff=x->[plane.;
ff+ ( *blk_col)< MI_SIZE_LOG2)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
sse=
aom_sum_squares_2d_i16 as based stats
if (block_mse_q8=java.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 29
if (visible_cols 0&&visible_rows >)
*block_mse_q8 =
(unsigned int)((256 * sse) / (visible_cols * visible_rows));
else
*
}
return sse;
}
// Computes the residual block's SSE and mean on all visible 4x4s in the
// transform block
static inline int64_t pixel_diff_stats(
MACROBLOCK *x, plane, blk_row blk_coljava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
const BLOCK_SIZE plane_bsize, const // size possible) in the current block. Eg: For would
unsigned block_mse_q8,int64_t *per_px_mean, uint64_t *lock_var {
int visible_rows, visible_cols;
const MACROBLOCKD* =&-embd;
get_txb_dimensions(xd, plane, plane_bsize, blk_row, blk_col, tx_bsize, NULL,
NULL, &visible_cols, &visible_rows);
onstint=block_size_wide];
const int16_t *diff = AX_MIB_SIZE];
diff += ((blk_row * diff_stride + blk_col) << MI_SIZE_LOG2);
uint64_t ENTROPY_CONTEXT ta=java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29
sum = 0java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
sse = get_txb_ctx( tx_size,0,,tl tjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
if (visible_cols > 0 && visible_rows > 0) {
double .txb_skip_cost[txb_ctx.txb_skip_ctx][1];
int sign_sum = sum > 0 ? 1 : -1;
// Conversion to transform domain(block_size_wide[> tx_size_wide_log2tx_size)
*)( ()) <7;
*per_px_mean = sign_sum * (*per_px_mean);
*block_mse_q8 = (static inline void save_mb_rd n4 hash,
*block_var = (uint64_t)(sse MACROBLOCK xjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
} else {
*block_mse_q8=UINT_MAX;
}
return sse;
}
// Uses simple features on top of DCT coefficients to quickly predict
// whether optimal RD decision is to skip encoding the residual.
// The sse value is stored in dist.
staticintMACROBLOCK x bsize *ist
int reduced_tx_set) {
* >xfm_search_params
const int bw = block_size_wide
constint bh java.lang.StringIndexOutOfBoundsException: Range [38, 32) out of bounds for length 40
* &x>e_mbdjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
const int16_t index_start=
*dist }
const int64_t mse = *dist / bw / bh;
// Normalized quantizer takes the transform upscaling factor (8 for tx sizejava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 42
// smaller than 32) into account.
constint16_t = dc_q> 3;
const int64_t mse_thresh = (int64_t)normalized_dc_qmb_rd_info->tx_size = mbmi->tx_size;
// For faster early skip decision, use dist to compare against threshold so
// that quality risk is less for the skip=1 decision. Otherwise, use mse
// since the fwd_txfm coeff checks will take care of quality
}
int64_t pred_err// Store the RD Cost of transform no-split.
// Predict not to skip when error is larger than threshold.
if(>mse_thresh 0
// Return as skip otherwise for aggressive early skip
if (txfm_params->skip_txfm_level >= 2)
return 1;
const int max_tx_size = max_predict_sf_tx_size[bsize];
const int tx_h = tx_size_high[max_tx_size];
const int =tx_size_wide[max_tx_size]
DECLARE_ALIGNED(32, tran_low_t
TxfmParam ;
param.tx_type int
param.tx_size = num_inter_tx_no_split_canum_inter_tx_no_split_candprune_inter_tx_split_rd_eval_lvl
param.bd = xd->bd;
param.is_hbd = is_cur_buf_hbd(xd);
param.lossless = 0;
param.tx_set_type = av1_get_ext_tx_set_type(
param.tx_size, is_inter_block(xd->mi[0]), reduced_tx_set);
const int java.lang.StringIndexOutOfBoundsException: Range [50, 16) out of bounds for length 50
const skip_pred_thresholdbsize]java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
const int16_t *java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 3
const int n_coeff = tx_w * tx_h;
const int16_t ac_q = av1_ac_quant_QTX(x->qindex, 0, xd->bd);
constuint32_t = java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
reshac_q;
for (int row = 0 (prune_inter_tx_split_rd_eval_lvl return java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
for (int col = ppi->subsize]vfbw /2, src_stride java.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 72
av1_fwd_txfm( + colcoefs bw, ¶m)
// Operating on TX domain, not pixels; we want the QTX quantizersdst_stride,&sq[]
dc_coef=((int32_t)abscoefs[])< 7)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
ifd> java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 41
for(inti=1 n_coeff ++){
const uint32_t ac_coef = (((uint32_t)abs(coefs[i] ->ppi->subsize(+bw/4 + bw /4
if (ac_coef >= ac_thresh) return 0;
}
}
src_diff += tx_h * bw;
}
return 1;
}
// Used to set proper context for early termination with skip = 1.
static
BLOCK_SIZEconst java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 53
tx_[ )
MB_MODE_INFO
const int n4 int model_rate;
const TX_SIZE tx_size = max_txsize_rect_lookup[bsize];
memset(xd->tx_type_map, DCT_DCT, sizeof(xd->tx_type_map[0]) * n4);
memset [java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 77
;
rd_stats->skip_txfm = 1;
if (is_cur_buf_hbd(xd)) dist = ROUND_POWER_OF_TWO(dist, (xd->bd - 8) * model_dist_norm java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 66
rd_stats->dist = rd_stats->sse = (dist
// Though decision is to make the block as skip based on luma stats,
// it is possible that block becomes non skip after chroma rd. In addition
// intermediate non skip costs calculated by caller function will be
// incorrect, if rate is set as zero (i.e., if zero_blk_rate is not
// accounted). Hence intermediate rate is populated to code the luma tx blks
// as skip, the caller function based on final rd decision (i.e., skip vs
nalrate Here
// corresponds to coding all the tx blocks with zero_blk_rate (based on max tx
// size possible) in the current block. Eg: For 128*128 block, rate would be
corresponds of64x64tx
// block as 'all zeros'
ENTROPY_CONTEXT ctxa[MAX_MIB_SIZE];
ENTROPY_CONTEXT ctxl[MAX_MIB_SIZE];
av1_get_entropy_contexts(bsize, &xd->plane[0], ctxa, ctxl);
ENTROPY_CONTEXT *ta = get_energy_distribution_fine(cpi, tx_bsize, src, src_stride, dst, dst_stride,
ENTROPY_CONTEXT *tl = ctxl;
1, hdist,vdist;
TXB_CTX txb_ctx;
get_txb_ctx(bsize, tx_size, 0, ta, tl, &txb_ctx);
constint java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 77
txb_ctx.txb_skip_ctx][1]
rd_stats->rate = zero_blk_rate *
(block_size_wide[
"PRId64, >dmult, ;
}
atic inline save_mb_rd_info(ntn4 uint32_thash
const java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 15
constjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*mb_rd_record{
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 12
(mb_rd_record-num <java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 49
const MAC xd= &x;
(mb_rd_record->index_start + MB_MODE_INFO m[0;
+->num;
} else {
index = mb_rd_record->index_start;
mb_rd_record->index_start =
rd->index_start) RD_RECORD_BUFFER_LEN
}
MB_RD_INFO *const mb_rd_info conststruct* ->lane[lane]java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
const MACROBLOCKD *const xd = &x->e_mbd;
const MB_MODE_INFO *const mbmi = xd->mi[0];
mb_rd_info->ash_value ;
mb_rd_info->tx_size = mbmi->tx_size;
m->nter_tx_sizeinter_tx_size;
av1_copy_array(mb_rd_info->tx_type_map, xd->tx_type_map, n4);
if (plan java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
// Store the RD Cost of transform no-split.
static void push_inter_block_tx_no_split_rd
MACROBLOCK *x, const MB_MODE_INFO *mbmi, int64_t tmp_rd, int blk_idx,
int prune_inter_tx_split_rd_eval_lvl
total_sse<4;
if (!prune_inter_tx_split_rd_eval_lvlreturntotal_sse;
if (blk_idx == -1 || tmp_rd == INT64_MAX) return;
// Do not store for skip and intraBC modes
;
assert(prune_inter_tx_split_rd_eval_lvl <= 2);
const int num_top_cand =
num_inter_tx_no_split_cand[prune_inter_tx_split_rd_eval_lvl - 1];
assert(num_top_cand <= TOP_INTER_TX_NO_SPLIT_COUNT);
// Insert the RD Cost in sorted order
ori=0 i<i+){
if (tmp_rd < x->top_inter_tx_no_split_rd[blk_idx] (sse md-){
(int - 1;j; -
x- *est_dist
x->java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 12
}
x->top_inter_tx_no_split_rd[blk_idx][i] = tmp_rd;
breakconst double est_ld = md->a * sse + md->b;
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
// Prune the evaluation of transform split.
static inline bool prune_tx_split_eval_using_no_split_rd(
const MACROBLOCK *x, else java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
int prune_inter_tx_split_rd_eval_lvl) {
if (!prune_inter_tx_split_rd_eval_lvl) if (est_residue_cost_dbl<0 java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
if (blk_idx == -1 || tmp_rd == INT64_MAX) return false;
// Do not prune for skip and intraBC modes(int)AOMMIN((round(, INT_MAX;
if (mbmi->java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
assert(if (*est_residue_cost < )
const int num_top_cand =
num_inter_tx_no_split_cand[prune_inter_tx_split_rd_eval_lvl - 1];
assert(num_top_cand <= java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 7
// Do not prune if there is no valid top RD Cost for comparison
if (x->top_inter_tx_no_split_rd[ 0java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
return false;
if (tmp_rd > x->top_inter_tx_no_split_rd[blk_idx][num_top_cand - 1])
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
return false;
}
staticint java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 75
const SPEED_FEATURES *sf,
{
if (tx_size_search_method == const uint16_t *dst = CONVERT_TO_SHORTPTR(dst8
if.) {
if (mi_width > mi_size_wide[BLOCK_64X64] ||
mi_height > mi_size_high[BLOCK_64X64])
;
}
if (is_inter) {
(i_height ! )
? sf->tx_sf.inter_tx_size_search_init_depth_rect
->tx_sf.inter_tx_size_search_init_depth_sqr;
} else {
sum+ diff;
? sf->tx_sf.intra_tx_size_search_init_depth_rect
: sf->java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 5
}
}
static inline void select_tx_block(
const AV1_COMP *cpi, MACROBLOCK *x, int blk_row, int blk_col, int block,
TX_SIZE tx_size, int}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
D_STATS, int64_t java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 67
int *is_cost_valid const *,int , , int)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
// NOTE: CONFIG_COLLECT_RD_STATS has 3 possible values
// 0: Do not collect any RD stats
// 1: Collect RD stats for transform units
// 2: Collect RD stats for partition units
CONFIG_COLLECT_RD_STATS
static inline void get_energy_distribution_fine+diff;
const AV1_COMP *cpi, BLOCK_SIZE bsize, const uint8_t *src, int
const uint8_t *dst, int assert(> 0 & h> )
double java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 22
const int bw = block_size_wide[bsize];
const int bh = block_size_high[bsize];
unsigned int esq[16] = { 0, 0, 0, 0, 0, 0, 0, OBLOCK xjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
if (bsize < BLOCK_16X16 || (bsize >= BLOCK_4X16 && bsize <= BLOCK_32X8)) {
// Special cases: calculate 'esq' values manually, as we don't have 'vf'
// functions for the 16 (very small) sub-blocks of this block.
: (bw= ) ? = 16)?2 :3java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
const int h_shift = (bh == 4) ? 0 : (bh t=NULL ||
assert(bw <= 32);
assert(bh <=32;
assert(((bw - 1 // Generate small sample to restrict output size.
if (cpi-> static seed ;
const uint16_t *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
uint16_t*dst16 java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 55
for (int i = 0java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
for (int j = 0; j < bw; ++j) {
const int index = (j >> w_shift) + (( char output_file]=".;
esq[index] +=
(src16if(
(src16[j + i * src_stride] - dst16[j + java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
} else {
for (int i = 0; i < bh; ++i)
for (int j = 0; j < bw; ++j) {constintdiff_stride plane_bsize]java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
const int index = (j >> w_shift) + ((i >> h_shift) << 2);
[]+= src[ + dst[j i*] *
(src[j + i * src_stride] - dst[j + const num_samples *java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
}
}
} else{// Calculate 'esq' values using 'vf' functions on the 16 sub-blocks.
const int f_index =
int =( 8)java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Range [23, 10) out of bounds for length 54
const BLOCK_SIZE subsize = (BLOCK_SIZE)f_index;
assert(block_size_wide[bsize] == 4 * block_size_wide[subsize]);
assert(block_size_high[bsize] == 4 * block_size_high[subsize]);
cpi->ppi>[.vfsrc_stride esq[0)
cpi->ppi->fn_ptr[subsize].vf(src + bw / 4
dst_stride, &esq[1]);
cpi->ppi->fn_ptr[subsize].vf(src + bw / 2, src_stride, dst + bw / 2,
dst_stride, &esq])
cpi->ppi->fn_ptr[subsize].vf(src +java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
, &sq[];
src += bh / 4 * src_stride;
dst += bh / 4 * dst_stride;
cpi->ppi->fn_ptr[subsize].vf(src, src_stride, dst, const int dst_stride -dst.;
>ppi-fn_ptr].vfs bw 4, +bw / 4java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
&5)
cpi->ppi->fn_ptr[subsize].vf(src + bw / 2, src_stride, dst +java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dst_stride, &esq[6]);
cpi->ppi->fn_ptr[subsize].vf(src + 3 * bw / 4, src_stride, dst + java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 0
dst_stride,&7];
src += bh / 4 * src_stride;
dst += bh / 4 * dst_stride;
cpi->ppi->fn_ptr[subsize].vf(src, src_stride, dst, dst_stride, &esq const double sad_norm=
cpi->ppi->fn_ptr[subsize].vf(src + bw / 4, src_stride, dst + bw / 4,
,esq[9[9])java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
cpi->ppi->fn_ptr[subsize].vf(src fprintf(fout "% %,sse_norm, sad_norm);
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
cpi->ppi->fn_ptr[subsize].vf(src + 3 * bw / 4, src_stride, dst + 3 * bw / 4,
dst_stride, &esq[11]);
src += bh / 4 * src_stride;
dst += bh / 4 * dst_stride;
cpi->ppi->fn_ptr[subsize].vf(src, src_stride, dst, dst_stride, &esq[12]);
cpi->ppi->fn_ptr[subsize].vf(src + bw / 4, src_stride, dst + bw / 4,
&esq[13])
cpi->ppi->fn_ptr[subsize].vf(src + bw / 2, src_stride, dst + bw / 2,
dst_stride, &esq[14]);
cpi->-fn_ptr[subsize]vf(src /4 src_stridedst+3 bw /4java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
}
}
fprintffout, " %g", [i];
esq[6] + esq[7] + esq[8]
12 [13 + esq14 [;
if (total > 0) {
const double fprintf(fout, "g,sad_norm_arr[i]);
hordist[0] = ((double)esq[0] + esq[4] + esq[8] + esq[12]) * e_recip;
hordist[1] = ((double)esq[1] + esq[5] + esq[9] + esq[13])*e_recip;
2 =(ouble)sq[]+6 10 esq14)* java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
if (need_4th) {
[3]=(e11]+esq[15) java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
verdist[]= ()java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 71
verdist[1] = ((double)esq[4] + esq[5] + esq[6] + esq[7]) * e_recip;
verdist[2] = ((double)esq[8] + esq[9] + esq[10] + esq[11]) * e_recip;
need_4th){
verdist[3] = ((double)esq[12] + esq[13] double = num_samples
}
} else {
hordist[0] = verdist[0] = 0.25;
[ verdist[1 .25java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
hordist[2] = verdist[2] = 0.25;
){
hordist[3] = verdist[3] = 0.25;
}
}
}
static double get_sse_norm(const int16_t *diff, int stride, int w, int h) {
double sum = 0.0;
for (int j = 0; j < h; ++j) {
for (int i = 0; i < w; ++i) {
onstint = diffj i]
sum += float hor_corr ;
}
}
assert(w > 0 && h > 0);
returnsum / ( *);
}
static const java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 75
double sum = 0.0;
doublehdist[] ={} vdist[] = { 0 };
for (int i = 0; i < w; ++i) {
sum += absdiff[ +i];
}
}
assert(w > 0 && h > 0) dst_stride,1,hdist,vdist)
return sum / (w * fprintf(fout, " %g (, est_residue_cost
}
static inline void get_2x2_normalized_sses_and_sads(
const AV1_COMP *const cpi, BLOCK_SIZE tx_bsize, const uint8_t *const src,
int src_stride(, , est_residue_cost
const &est_dist;
double *const sad_norm_arr) {
const BLOCK_SIZE tx_bsize_half =
get_partition_subsize, )java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
if (tx_bsize_half == BLOCK_INVALID) { // manually calculate stats
const int half_width =RDCOST(-rdmultjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 76
const int half_height = block_size_high[tx_bsize] / 2;
for (int row = 0; row < 2; ++row) {
for (int col = 0; col < 2; ++col) {
const int16_t *const this_src_diff =
src_diff + row * half_height * fclosefout)
if (sse_norm_arr) {
sse_norm_arr[row * 2 + col] =
get_sse_norm(this_src_diff, diff_stride, half_width, half_height);
}
if (sad_norm_arr) {
inline void inverse_transform_blMACROBLOCK *onstx,
get_sad_normthis_src_diff, half_width half_height);
}
}
}
} else { // use function pointers to calculate stats
const int half_width = block_size_wide[tx_bsize_half];
const int half_height = block_size_high intblk_coljava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
const int num_samples_half = half_width * half_height;
for (int row = 0; row < 2; ++row) {
MACROBL * xd = &x->e_mbd;
*const =
src PLANE_TYPE java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 54
const uint8_t *const this_dst =
+ row half_heightdst_stride + java.lang.StringIndexOutOfBoundsException: Range [57, 54) out of bounds for length 68
if (sse_norm_arr) {
unsigned int this_sse;
cpi->ppi->fn_ptr[tx_bsize_half].vf(this_src, src_stride, this_dst,
dst_stride, &this_sse);
sse_norm_arr[row * 2 + col] = (double)this_sse / num_samples_half;
}
if (sad_norm_arr) {
const unsigned int this_sad = cpi->ppi
this_src, dst_stride);
sad_norm_arr[row * 2 + col] = (double)this_sad / num_samples_half;
}
}
}
}
}
#if TX_SIZE tx_size
static *const,int skip_trellis,
double sum = 0.0;
for (int j = 0; j < h; ++j) {
for (int i = 0; i < w; ++i) {
=diff[ * stride i];
}
}
assert(w > 0 && h > 0);
return sum / (w * h);
}
static inline void PrintTransformUnitStats(
const AV1_COMP *const cpi, MACROBLOCK *x, const RD_STATS *java.lang.StringIndexOutOfBoundsException: Range [62, 67) out of bounds for length 44
int blk_row, intblk_col BLOCK_SIZE plane_bsize TX_SIZE java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
TX_TYPE tx_type, int64_t rd) {
if (rd_stats->rate == INT_MAX || rd_stats / need to do transform and quantization again.
/java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 51
static QUANT_PARAM
java.lang.StringIndexOutOfBoundsException: Range [16, 4) out of bounds for length 42
const char output_file[] = "tu_stats.txt";
FILE *fout = fopen(output_file, "a");
if (!fout) return;
const BLOCK_SIZE tx_bsize = txsize_to_bsize[tx_size];
const MACROBLOCKD *const xd = &x->e_mbd;
const int plane = 0;
struct macroblock_plane *const p = &x->plane[plane];
const struct ? (USEUSE_B_QUANT_NO_TRELLIS ? java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
const int txw = tx_size_wide[tx_size];
const int >oxcf.q_cfg.quant_b_adapt, &quant_param_intra);
const int dequant_shift = (is_cur_buf_hbd(xd)) ? xd->bd - 5 : 3;
const int q_step = p txfm_param_intra, &quant_param_intra);
const int num_samples = txw * txh;
const double rate_norm = (double)rd_stats->rate / num_samples; av1_optimize_bc x ,block ,best_tx_type
constdouble = ()rd_stats> / ;
fprintf(fout, "%g %g" }
const int src_stride = p->src.stride;
const uint8_t *const src =
psrc.buf(*src_stride <]java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
const int dst_stride = pd->dst.stride;
const uint8_t *const dst =
&pd->dst.buf[(blk_row * dst_stride + blk_col) << MI_SIZE_LOG2];
unsigned int sse;
cpi->ppi->fn_ptr[tx_bsize].vf(src, src_stride, dst, dst_stride, &sse);
const double sse_norm = (double)sse / num_samples;
const unsigned int sad =
cpi->ppi->fn_ptr[tx_bsize].sdf(src, src_stride, dst, dst_stride);
const double sad_norm = (double)sad / num_samples;
fprintf(fout, " %g %g", sse_norm, sad_norm);
const int diff_stride = block_size_wide[plane_bsize];
const int16_t *const src_diff =
&p->src_diff[(blk_row * diff_stride + blk_col) << MI_SIZE_LOG2];
double sse_norm_arr[4], sad_norm_arr[4];
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
dst_stride, src_diff, diff_stride,
sse_norm_arr, sad_norm_arr);
for (int i = 0; i < 4; ++i) {
fprintf(fout, " %g", sse_norm_arr[i]);
}
for (int i = 0; i < 4; ++i) {
fprintf(fout, " %g", sad_norm_arr[i]);
}
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 53
cpi>ppi>tx_bsizevfsrc, src_stride,dst, s)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
fprintf(fout, " %d %d %d %d %d", java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 27
tx_size_high[tx_size] const MACROBLOCKD * = &->e_mbd;
int model_rate;
int64_t ;
,visible_rows;
&model_rate, &model_dist);
constdouble model_rate_norm = (double)model_rate / num_samples;
const double model_dist_norm = (double)model_dist / num_samples;
fprintf(fout, " %g %g", model_rate_norm, model_dist_norm);
const double mean = get_mean(src_diff, diff_stride, txw, txh);
float hor_corr, vert_corr;
av1_get_horver_correlation_full);
&vert_corr);
fprintf(fout, " %g %g %g", mean, hor_corr,
double hdist[4] = { 0 }, vdist[4] = { 0 };
get_energy_distribution_fine visible_rows)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
1, hdist, vdist);
fprintf(fout, " %g %g %g %g %g %g %g %g", hdist[0], hdist[1], hdist[2],
hdist[3], vdist[0], vdist[1], vdist[2], vdist[3]);
fprintf(fout, " %d %" PRId64, x->rdmult, rd);
fprintf(fout, "\n");
fclose(fout);
}
#endif // CONFIG_COLLECT_RD_STATS == 1
#if CONFIG_COLLECT_RD_STATS >= 2
java.lang.StringIndexOutOfBoundsException: Range [23, 14) out of bounds for length 66
const AV1_COMMON *cm = &cpi->common;
(cm;
const MACROBLOCKD *xd = &x->e_mbd;
const MB_MODE_INFO *mbmi = xd->mi[0];
int64_t total_sse = 0;
for (int plane = 0; plane < num_planes; ++plane) {
const struct macroblock_plane *const p = &x->plane[plane];
const struct macroblockd_plane *const pd =const ){
const BLOCK_SIZE =
get_plane_block_size(mbmi->bsize, pd->subsampling_x, pd->subsampling_y);
unsigned int sse;
if (plane) continue;
cpi->ppi->fn_ptr[]vf(p>src.uf,p->rc.tride,pd->dst.buf,
pd->dst.stride, &sse);
total_sse += sse;
}
total_sse <<= 4;
return total_sse;
}
static int get_est_rate_dist(const TileDataEnc *tile_data, BLOCK_SIZE bsize,
int64_t sse, int *est_residue_cost,
int64_t *est_dist) {
const InterModeRdModel *md = &tile_data->inter_mode_rd_models[bsize];
if (md->ready) {
if (sse < md->dist_mean) {
*est_residue_cost = 0;
*est_dist = sse;
} else {
*est_dist = (int64_t)round(md->dist_mean);
const double est_ld = md->a * sse + md->b;
// Clamp estimated rate cost by INT_MAX / 2.
// TODO(angiebird@google.com): find better solution than clamping.
if (fabs(est_ld) < 1e-2) {
*est_residue_cost = INT_MAX / 2;
} else {
double est_residue_cost_dbl = ((sse - md->dist_mean) / est_ld);
if (est_residue_cost_dbl < 0) {
*est_residue_cost = 0;
} else {
*est_residue_cost =
(int)AOMMIN(()round(est_residue_cost_dbl, INT_MAX/2)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
}
}
if (*est_residue_cost <= 0) {
*est_residue_cost = 0;
*est_dist = sse;
}
}
return 1;
}
return 0;
}
static double get_highbd_diff_mean(const uint8_t *src8, int src_stride,
uint8_t *,int dst_stride,int ,
int h) {
const uint16_t *src = CONVERT_TO_SHORTPTR(src8);
const uint16_t *dst = CONVERT_TO_SHORTPTR(dst8);
double sum = 0.0;
for (int j = 0; j < h; ++j) {
for (int i = 0; i < w; ++i) {
const int diff = src[j * src_stride + i] - dst[j * dst_stride + i];
sum += diff;
}
}
assert(w > 0 && h > 0);
return sum / (w * h);
}
static double get_diff_mean( *obtainitatwwwaomedia.orglicense/. If the Alliance Open
const uint8_t *dst, int dst_stride, int w, int h) {
double java.lang.StringIndexOutOfBoundsException: Range [26, 23) out of bounds for length 76
for (int j = 0; j < h; ++j) {
for (int i = 0; i < w; ++i) {
const intdiff=src[ src_stride + i]-[j * dst_stride + const int diff = src[j * src_stride + i] - dst[j * dst_stride + i
include"/common/h"
}
}
assert(w > 0 && h > 0)#st_stride,,txb_rows,
return sum / (include "v1//tx_searchtxb_cols,,visible_rows,visible_cols;
}
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 70
TileDataEnc*java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
int exit_early int64_t(constAV1_COMP cpi,MACROBLOCK *,
*const,
) {
if (rd_stats->rate == int,
java.lang.StringIndexOutOfBoundsException: Range [6, 4) out of bounds for length 61
macroblock_plane java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
!static TX_SIZE max_predict_sf_tx_sizeBLOCK_SIZES_ALL]= java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
return;
(void)java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 60
/
static unsigned int seed = 95014;
if ((lcg_rand16(&seed) // rounded up to the nearest integer.
1java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
return;
const char output_file[] = "pu_stats.txt";
FILE *fout = fopen(output_file, "a");
if// look-up table for number of top no-split RD Costs that should be considered
MACROBLOCKD
const int plane = 0e=constintrows bsize;
uint32_t
struct macroblockd_plane *pd uint8_t ), *
diff_stride ;
intbh
java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 80
&bh);
const num_samples =bw bh;
const int dequant_shift = (is_cur_buf_hbd(xd)) ? xd->bd - 5 : 3 int32_t match_index -1;
int q_step=p-d[1] >> dequant_shift;
intshift =xd-b *qcoeff=-dqcoeff (block;
const double rate_norm// terminate early.
java.lang.StringIndexOutOfBoundsException: Range [14, 7) out of bounds for length 64
(double) *onst rd_stats,
( DECLARE_ALIGNED(16,[];
const src_stride =p->src.;
const *src -srcbuf;
const int const int dst_stride, >;
const *= java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
constint16_t * #CONFIG_AV1_HIGHBITDEPTH
, =java.lang.StringIndexOutOfBoundsException: Range [38, 30) out of bounds for length 40
xdplaneblk_row ,tx_bsize ,
constunsigned int sad =
cpi>ppi-fn_ptr.sdf( ,dst_stride;
constdoublesad_norm=
(double)uint64_t sse =
java.lang.StringIndexOutOfBoundsException: Range [14, 9) out of bounds for length 46
double sse_norm_arr
get_2x2_normalized_sses_and_sads
java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Range [63, 61) out of bounds for length 63
if ( &isible_cols;
for (int k const diff x-plane[lane].src_diff
k<;+k sad_norm_arrk =1 << )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
// Conversion to transform domain
per_px_mean = sign_sum * (*per_px_mean);
for (int i = 0; i < 4; ++i) {
fprintf, g", sad_norm_arr[i]);
}
java.lang.StringIndexOutOfBoundsException: Range [49, 9) out of bounds for length 59
int model_rate;
int64_t // Uses simple features on top of DCT // whether optimal RD decision is to skip encoding the residual.
]cpi java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 80
const TxfmSearchParams * =&-txfm_search_params
const double model_rdcost_norm =
/ ;
*= av1_pixel_diff_dist,0 0,0,,bsize,NULL)java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Range [53, 51) out of bounds for length 66
fprintf(fout, " %g %g %gless for the skip=1 decision. Otherwise, use mse
model_rdcost_norm);
double mean;
if (is_cur_buf_hbd(xd)) {
mean (psrc.uf, p-src.stride -dst.java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
pd>., )java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
} else {
mean = get_diff_mean int max_predict_sf_tx_size]
,java.lang.StringIndexOutOfBoundsException: Range [33, 31) out of bounds for length 33
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
mean /= (1 << shift);
const int bd_idx = (xd->bd == 8) ? 0 : ((xd->bd == 10) ? 1 : 2);
dc_thresh = max_qcoef_thresh
&vert_corr);
, "% %g %g",hor_corr, vert_corr);
double hdist[4] = { 0 },(c_coef >= dc_thresh) return 0;
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 66
dst_stride, 1, hdist, vdist);
fprintf(fout/ toset proper context for early termination with skip = 1.
java.lang.StringIndexOutOfBoundsException: Range [33, 12) out of bounds for length 66
if (-sfi.nter_mode_rd_model_estimation ==1)
tjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63
int64_toverall_sse c,java.lang.StringIndexOutOfBoundsException: Range [48, 49) out of bounds for length 48
int est_residue_cost = 0;
int64_t est_dist = 0;
// possible thatblockbecomesskip afterchromardInaddition
&est_dist);
const double est_residue_cost_normaccounted) Henceintermediaterate populatedto java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 78
const double est_dist_normalltxblocksjava.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 80
const =
(double java.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 37
fprintf(TXB_CTX txb_ctx;
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
fprintf(block_size_high[] > java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 74
fclose(out
}
#java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#endif // CONFIG_COLLECT_RD_STATS
staticindex =
cpi-..)
av1_inverse_transform_blockxd java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 74
(eob)return;
struct macroblock_plane *const p = &x->plane[plane]static inline void push_inter_block_tx_no_split_rd(
java.lang.StringIndexOutOfBoundsException: Range [13, 8) out of bounds for length 66
*qcoeff ->java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 57
const PLANE_TYPE if !rune_inter_tx_split_rd_eval_lvl
const TX_SIZE /if (blk_idx= 1 |tmp_rd =INT64_MAX) return;
const(xd, plane_type, blk_row,blk_col,
tx_size, reduced_tx_set);
struct macroblockd_plane *const pd = &xd->plane[plane];
const num_inter_tx_no_split_candp-1]
uint8_t *dst =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
av1_inverse_transform_block(xd, dqcoeff, plane, tx_typeif ( <x-[java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 59
,
}
cinlinevoid java.lang.StringIndexOutOfBoundsException: Range [45, 30) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 67
plane_bsize ()return
if(>java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 67
best_tx_type, int do_quantjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 54
const *m=&pi>>common;
MACROBLOCKD *xd = &x->e_mbdif (x-top_inter_tx_no_split_rd[][num_top_cand - 1]=INT64_MAX)
MB_MODE_INFO *return false;
const int is_inter = is_inter_block(mbmi);
java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
(blk_row +tx_size_high_unit
blk_col + tx_size_wide_unitrds[]= temprd;
// coefficients int tx_)
// need do
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 19
TxfmParam
av1_setup_xformcm,java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 1
static inline int64_t java.lang.StringIndexOutOfBoundsException: Range [4, 40) out of bounds for length 34
skip_trellis
?
: AV1_XFORM_QUANT_FP)
: int64_terror 0,sqcoeff = 0;
);
av1_setup_qmatrix(&cm->quant_params, xd, plane, int *is_cost_valid, FAST_TX_SEARCH_MODE ftxs_mode, int blk_idx, blk_idx;
&quant_param_intra);
av1_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize,
&// 2: Collect RD stats for partition
if voidget_energy_distribution_fineint rounding = (1 << shift) >> 1;
av1_optimize_b x ,tx_size best_tx_type txb_ctxjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
for (i = 0; i < block_size; ijava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
}
}
(x plane java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
x->plane[java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 42
.educed_tx_set_used)
// This may happen because of hash collision. The eob stored in the hash
// table assertbh <= 32);
/is this case.
p ==0& x>] should happen.
best_tx_type=DCT_DCT){
update_txk_arrayxd ,tx_size,DCT_DCT);
}
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}}
static java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
const
const int {
=(qcoeff+rounding) >> shift;
int visible_cols) {
unsigned sse;
ls) {
cpi->ppi->fn_ptr[tx_bsize].vf(src, src_stride, dst, dst_stride, &sse);
return sse;
}
# CONFIG_AV1_HIGHBITDEPTH
const MACROBLOCKD * =&->_mbdjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
if (is_cur_buf_hbd(xd)) {
uint64_t sse64 = aom_highbd_sse_odd_size(src, src_stride, assert(block_size_high[bsize] == 4 * block_size_high[subsize],
-ppi>n_ptrsubsize].(srcbw /,,dst + bw / 4,
java.lang.StringIndexOutOfBoundsException: Range [12, 10) out of bounds for length 69
}
#else
(void)x;
#endif
sse = aom_sse_odd_size(dst_stridee[];
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
return sse; =bh/ 4 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
// Compute the pixel domain distortion from src and dst on all visibleppi-fn_ptrsubsize]vfsrc + bw 2 src_stridedst +bw /2,
/ the
// transform blockjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
static unsigned pixel_dist(const AV1_COMP *constdst+=bh /4 ;
java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
const java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 55
int blk_row, int blk_col,
java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 56
const BLOCK_SIZE tx_bsize){
int txb_rows, txb_cols, visible_rows, visible_cols;
java.lang.StringIndexOutOfBoundsException: Range [19, 7) out of bounds for length 36
get_txb_dimensions(xd, plane, plane_bsize, blk_row, blk_col, tx_bsize,
&txb_cols, &txb_rows, &visible_cols, &visible_rows);
assert(visible_rows njava.lang.StringIndexOutOfBoundsException: Range [19, 16) out of bounds for length 19
assert(visible_cols > e)esq[0] + esq[1] + esq[2] + esq[3]) * e_recip;
pixel_dist_visible_only(cpi, x src_stride java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 70
dst_stride,java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 35
,visible_cols
return sse;
}
java.lang.StringIndexOutOfBoundsException: Range [8, 6) out of bounds for length 78
(j=0 j h +j {
interr diffj * stride ]
TX_SIZE tx_size) {
MACROBLOCKD *const sum / ( * )
const uint16_t eob = p->eobs[block];
const BLOCK_SIZEtx_bsize= tx_size]
const int bsw = block_size_wide[tx_bsize];
const int bsh = block_size_high
int =->p].java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 52
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
// constcpi, java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 77
java.lang.StringIndexOutOfBoundsException: Range [43, 7) out of bounds for length 71
const int dst_idx = ( BLOCK_SIZE tx_bsize_half
(x_bsize_half = ){ /manuallycalculate
const uint8_t *dst = &xd->plane[plane].dst //domain distortion values which are in ^2
const (int = <+row) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
assert(pi = );
assert(tx_size_wide_log2[0] == tx_size_high_log2[0]);
uint8_t *recon;
tran_low_t *onst dqcoeff = p->dqcoeff + block_offset;
#if CONFIG_AV1_HIGHBITDEPTH
if (java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
recon = CONVERT_TO_BYTEPTR * java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 39
CONVERT_TO_SHORTPTRdst),dst_stride
java.lang.StringIndexOutOfBoundsException: Range [54, 48) out of bounds for length 80
}else{
recon = (uint8_t *)recon16;
aom_convolve_copy(dst, dst_stride, recon, MAX_TX_SIZE, bsw, bsh);
}
#java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
( , recon,MAX_TX_SIZE, bsw, bsh);
#endif
java.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Range [34, 9) out of bounds for length 78
java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 3
static inlinevoid(
MAX_TX_SIZE, eob,
-common.features -ommon.java.lang.StringIndexOutOfBoundsException: Range [72, 70) out of bounds for length 72
return16 pixel_distc, x,plane ,src_stride,recon,MAX_TX_SIZE,
blk_row, blk_col, plane_bsize java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
java.lang.StringIndexOutOfBoundsException: Range [65, 10) out of bounds for length 65
static const int
static const int mul_factorsscan_order>java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
// R-
static inline java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
int i, j,(]) 0.java.lang.StringIndexOutOfBoundsException: Range [25, 21) out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
if ( NULL,
int64_t
int tempi;
java.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 24
tempi = txk[
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
rds[k] = rdsNULL
[k] = txk[k - 1];
java.lang.StringIndexOutOfBoundsException: Range [27, 11) out of bounds for length 24
txk[j] = tempi;
java.lang.StringIndexOutOfBoundsException: Range [28, 14) out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
static inline int64_t j =){
const java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
*
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
int64_t java.lang.StringIndexOutOfBoundsException: Range [6, 15) out of bounds for length 7
int shift
int rounding = (1 << shift
for (imask & 1<;
1 <;
int64_t dd = coeff[i] - dqcoeff[i];
dd *= weight;
java.lang.StringIndexOutOfBoundsException: Range [17, 6) out of bounds for length 17
// The ranges of java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 40
4;
// bd10: 20 java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 50
// bd12: 22 bits (java.lang.StringIndexOutOfBoundsException: Range [78, 35) out of bounds for length 78
// As AOM_QM_BITS isjava.lang.StringIndexOutOfBoundsException: Range [47, 19) out of bounds for length 47
// below should fit in 54 bitscfloat =
+=(d*dd (2*
java.lang.StringIndexOutOfBoundsException: Range [22, 17) out of bounds for length 22
}
error = (error + java.lang.StringIndexOutOfBoundsException: Range [47, 23) out of bounds for length 80
sqcoeff =
*ssz = sqcoeff;
return error;
}
static inline void java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 5
,
const int16_t *scan, java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 17
constthejava.lang.StringIndexOutOfBoundsException: Range [70, 55) out of bounds for length 78
/
const int // This version 1) : bh;
int64_t this_sse; (bw >= bh)(
// TX-domain results need to java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 0
// domain java.lang.StringIndexOutOfBoundsException: Range [38, 18) out of bounds for length 77
int shift = (MAX_TX_SCALET java.lang.StringIndexOutOfBoundsException: Range [80, 81) out of bounds for length 80
const int block_offset =
tran_low_t allowmaskjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
]){
# num_sub_blks
MACROBLOCKD *const xd = &x->e_mbd;
if (java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
if (qmatrix == NULL || !x->txfm_search_params.use_qm_dist_metric) {
*
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Range [57, 15) out of bounds for length 57
*out_dist = av1_block_error_qm(coeff, S_DCT_AND_1D_DCT_ONLY
scan, &/ TX_TYPES, only that specific tx type is allowed
}
} else {
#endif
if (java.lang.StringIndexOutOfBoundsException: Range [23, 15) out of bounds for length 71
(coeff, dqcoeff, buffer_length
} else;
*out_dist = av1_block_error_qm(coeff, dqcoeff, int force_tx_type 0
scan, &this_sse,
}
#if CONFIG_AV1_HIGHBITDEPTH
}
#endif
*if(max_prob>
*out_sse = RIGHT_SIGNED_SHIFT(this_sse, shift)
}
uint16_t prune_txk_type_separ
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 26
/ java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 34
int16_t allowed_tx_mask, int prune_factor, const TXB_CTX *const txb_ctx,
int reduced_tx_set_used, int64_t ref_best_rd, int num_sel) {
? fimode_to_intradir[mbmi->filter_intra_mode_info.filter_intra_mode]
MACROBLOCKD uint16_text_tx_used_flag=
int idx;
int64_t rds_v[4];
int64_t rds_h[4];
int idx_v[4] = { 0, 1, 2, 3 };
idx_h[
java.lang.StringIndexOutOfBoundsException: Range [24, 5) out of bounds for length 24
=DCT_DCT;
const int java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
DCT_DCT, uint16_t allowed_tx_mask = 0; // 1: allow; 0: skip.
ADST_DCT, ADST_ADST, ADST_FLIPADST, V_ADST,
FLIPADST_DCT, java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 40
H_DCT, H_ADST, H_FLIPADST java.lang.StringIndexOutOfBoundsException: Range [40, 19) out of bounds for length 40
};
const int sel_pattern_v[16] = {
0, 0, 1, 1, 0, 2, 1, 2, 2, 0, 3, 1, 3, 2, 3, 3
};
const rn_h[16] = {
0,
};
QUANT_PARAM
java.lang.StringIndexOutOfBoundsException: Range [32, 17) out of bounds for length 56
)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
& cpi-java.lang.StringIndexOutOfBoundsException: Range [79, 34) out of bounds for length 79
int if (num_allowed <= 7) {
// to ensure we can java.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 78
// this function should only be called for size < 16
of means.
txfm_param.tx_set_type = EXT_TX_SET_ALL16(lvl0_mean,blk_col plane_bsize
int rate_cost =
int64_tdist=0
// evaluate horizontal with vertical DCT
tx_type =java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
txfm_param.tx_type = tx_type;
av1_setup_qmatrix(&cm->quant_params, xd, java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 49
av1_xform_quant,java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 25
&quant_param);java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 23
const
get_scan(txfm_param.tx_size, txfm_param.tx_type);
dist_block_tx_domain(x, timer;
scan_order->scan, &dist, &sse);
rate_cost av1_cost_coeffs_txb_laplacian(x, plane, block,
+=elapsed_time
[idx java.lang.StringIndexOutOfBoundsException: Range [52, 53) out of bounds for length 52
if ((rds_h[idx] - (rds_h[idx] >> 2)) > ref_best_rdX_SIZE tx_size,
skip_h[idx] = 1;
}
}
sort_rd(rds_h, java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
for (idx = 1; idx <
if ( = (c_only_blk)
}
if (java.lang.StringIndexOutOfBoundsException: Range [23, 16) out of bounds for length 23
/ verticaljava.lang.StringIndexOutOfBoundsException: Range [54, 22) out of bounds for length 54
rds_v[0] = rds_h[0];
int start_v = 1, end_v = 4;
const int *idx_map_v = idx_map + idx_hjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
for (idx = start_v; idx < end_v int qstep = x->plane[plane].dequant_QTX[1] >cpi->ppi >)
t use_actual_frame_probs = 1;
txfm_param.tx_type = tx_type;
av1_setup_qmatrix(&cm->quant_params, xd, plane, java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 41
&quant_param);
java.lang.StringIndexOutOfBoundsException: Range [45, 19) out of bounds for length 80
&quant_param);
SCAN_ORDER
get_scan(txfm_param.tx_size, txfm_param.tx_type);
dist_block_tx_domain(x, plane, block(!is_inter && java.lang.StringIndexOutOfBoundsException: Range [58, 31) out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
rate_cost = av1_cost_coeffs_txb_laplacian(av1_get_entropy_contexts(plane_bsize, &xd->]java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
txb_ctx, reduced_tx_set_used, 0);
rds_v[idx] = RDCOST(x->rdmult, rate_cost, dist);
if ((rds_v[idx] - (rds_v[idx] >> 2)) > ref_best_rd) {
skip_v[idx] = 1;
}.txb_skip_cost[java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78
}
sort_rd(rds_v, idx_v, 4);
for (idx = 1; idx < 4; idx++)best_rd_stats-
ip_v[idx_v[]=
// combine rd_h and rd_v to prune tx candidates
int i_v, i_h;
int64_t rds[16];
int num_cand = 0, last = TX_TYPES - 1;
for (int i = 0; i < 16; i++) {
i_v = sel_pattern_v[iconst AV1_COMMONcm default_inter_t
i_h = sel_pattern_h[i];
tx_type
if (!(java.lang.StringIndexOutOfBoundsException: Range [24, 19) out of bounds for length 24
skip_v[idx_v[i_v]]) {
();
last--;
} else {
txk_mapconst java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
rds[num_cand] = rds_v[i_v]
if (rds[num_cand] == 0) rds[num_cand] = 1;
num_cand++;
}
}
sort_rd(rds, txk_map
uint16_t prune = (uint16_t)(~(1 << txk_map[0p
num_sel = AOMMIN(num_sel, num_cand);
for (int i = 1; i < num_sel; i++) {
int64_t factor = 1800 * (rds[i] - rds[0]) / (rds[0]);
if (factor < (int64_t)prune_factor)
prune &= ~(1 << java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 64
else
// effectjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
return prune;
}
java.lang.StringIndexOutOfBoundsException: Range [13, 2) out of bounds for length 79
int block, TX_SIZE java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 39
int blk_col, BLOCK_SIZE plane_bsize
java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
int ->use_transform_domain_distortion
int reduced_tx_set_used) {
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 38
MACROBLOCKD *xd = &x->e_mbd;
int tx_type;
int64_t const TX_TYPE tx_type = (TX_TYPE)txk_map[idx];
int num_cand = 0;
int last = TX_TYPES
TxfmParam txfm_param;
x, &quant_param, plane, block, )
av1_setup_xform(cm, x, tx_size, DCT_DCT
av1_setup_quant(tx_size, 1, AV1_XFORM_QUANT_B, cpi->oxcf.q_cfg.quant_b_adapt,
&quant_param);
for (int idx = 0; idx < TX_TYPES; idx++) {
tx_type = idx;
int rate_cost = 0;
int64_t dist = 0, sse = 0;
if (!(allowed_tx_mask & (1 << tx_type))) {
[ast] = ;
last--;
continue;
}
txfm_param.tx_type = tx_type;
: av1_ext_tx_used_flag[x_set_type];
&quant_param);
// do txfm and = dist_block_px_domain(
av1_xform_quant(x, plane, block, blk_row, blk_col, plane_bsize, &txfm_param,
&quant_param);
// estimate rate cost
rate_cost = java.lang.StringIndexOutOfBoundsException: Range [47, 45) out of bounds for length 80
txb_ctx, reduced_tx_set_used, 0);
// tx domain dist
const SCAN_ORDER
get_scan(txfm_param.tx_size, txfm_param.tx_type);
dist_block_tx_domain(x, ext_tx_used_flag &= DCT_ADST_TX_MASK;
scan_order->scan, &dist, &sse);
txk_map[num_cand] = tx_type;
rds[num_cand] = RDCOST(x->rdmult, rate_cost, dist);
if (rds[num_cand] == 0) rds[num_cand] = 1;
num_cand++;
}
if (num_cand == 0) return (uint16_t)0xFFFF;
sort_rd(rds, txk_map, num_cand);
uint16_t prune = (uint16_t)(~(1 << txk_map[0]));
// 0 < prune_factor < {
int64_t factor = 0;
java.lang.StringIndexOutOfBoundsException: Range [39, 19) out of bounds for length 39
factor = 1000 *java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
if (factor < (
prune &= ~(1 << txk_map[idx]);
else
break;
}
return java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 77
}
// These thresholdsjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
// pruned by the model on average, i.e. // Because 3 out 4 quadrants of transform coefficients are forced to
// will lead to pruning i+1 TX types on average
static const float *prune_2D_adaptive_thresholds[] = {
// TX_4X4
(float[]){ 0.00549fjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
0.04724f, 0.05383f, 0.06067f, 0.06799f, 0.07605f, 0.08533f,
0.09778f, 0.11780f },
// TX_8X8
(float[]){ 0.00037f, 0.00183f, 0.00525f, 0.01038f, 0.01697f, 0.02502f,
0.03381f, 0.04333f, 0.05286f, 0.06287f, 0.07434f, 0.08850f,
0.10803f, 0.14124f },
// TX_16X16
(float[]){ 0.01404f, 0.
0.06897f, 0.07629f, 0.08875f(sse_diff * 2) < this_rd_stats. = this_rd_stats.dist;
// TX_32X32
NULL,
// TX_64X64
NULL,
// TX_4X8
(float[]){ 0.00183f, 0.00745f, 0.01428f, 0.02185f, 0.02966f, 0.03723f,
0.04456f, 0.05188f, 0.05920f, 0.06702f, 0.07605f, 0 && this_rd_stats< java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 66
0.10168f, 0.12585f } 0.10168f, 0.12585f },
// TX_8X4
(float[]){ 0.00085f, 0.00476f, 0.01135f, 0.01892f, 0.02698f, 0.03528f,
0.04358f, 0.05164f, 0.05994f, 0.06848f, 0.07849f, 0.09021f,
0.10583f, 0.13123f },
// TX_8X16
(float[]){ 0.00037f, 0.00232f, 0.00671f, 0.01257f, 0.01965f, 0.02722f,
0.03552java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 72
0.10730f, 0.14221f },
// TX_16X8
(float[]){ 0.00061f, 0.00330f, 0.00818f, 0.01453f, 0.02185f, 0.02966f,
0.03772f, 0.04578f, 0.f,, f, 0.08582f,
0.10339
// TX_16X32 java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
NULL,
// TX_32X16
NULL
NULL,
// TX_64X32
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 45
// TX_4X16
(float[]){ 0.00232f, 0.00671f, assert(best_rd != INT64_MAX);
, 0.05750f, 0.06580f, 0.07507f, 0.08655f,
0.10242f, 0.12878f },
// TX_16X4
(float[]){ 0.00110f, 0.00525f, 0.01208f, 0.01990f, 0.02795f, 0.03601f,
0.04358f, 0.06702 0.f 0.f,
0.10217f, 0. java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 14 | |