/src/libvpx/vp9/encoder/vp9_encoder.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (c) 2010 The WebM project authors. All Rights Reserved. |
3 | | * |
4 | | * Use of this source code is governed by a BSD-style license |
5 | | * that can be found in the LICENSE file in the root of the source |
6 | | * tree. An additional intellectual property rights grant can be found |
7 | | * in the file PATENTS. All contributing project authors may |
8 | | * be found in the AUTHORS file in the root of the source tree. |
9 | | */ |
10 | | |
11 | | #ifndef VPX_VP9_ENCODER_VP9_ENCODER_H_ |
12 | | #define VPX_VP9_ENCODER_VP9_ENCODER_H_ |
13 | | |
14 | | #include <stdio.h> |
15 | | |
16 | | #include "./vpx_config.h" |
17 | | #include "./vpx_dsp_rtcd.h" |
18 | | #include "vpx/internal/vpx_codec_internal.h" |
19 | | #include "vpx/vpx_ext_ratectrl.h" |
20 | | #include "vpx/vp8cx.h" |
21 | | #include "vpx/vpx_tpl.h" |
22 | | #if CONFIG_INTERNAL_STATS |
23 | | #include "vpx_dsp/ssim.h" |
24 | | #endif |
25 | | #include "vpx_dsp/variance.h" |
26 | | #include "vpx_dsp/psnr.h" |
27 | | #include "vpx_ports/system_state.h" |
28 | | #include "vpx_util/vpx_pthread.h" |
29 | | #include "vpx_util/vpx_thread.h" |
30 | | #include "vpx_util/vpx_timestamp.h" |
31 | | |
32 | | #include "vp9/common/vp9_alloccommon.h" |
33 | | #include "vp9/common/vp9_ppflags.h" |
34 | | #include "vp9/common/vp9_entropymode.h" |
35 | | #include "vp9/common/vp9_thread_common.h" |
36 | | #include "vp9/common/vp9_onyxc_int.h" |
37 | | |
38 | | #if !CONFIG_REALTIME_ONLY |
39 | | #include "vp9/encoder/vp9_alt_ref_aq.h" |
40 | | #endif |
41 | | #include "vp9/encoder/vp9_aq_cyclicrefresh.h" |
42 | | #include "vp9/encoder/vp9_context_tree.h" |
43 | | #include "vp9/encoder/vp9_encodemb.h" |
44 | | #include "vp9/encoder/vp9_ethread.h" |
45 | | #include "vp9/encoder/vp9_ext_ratectrl.h" |
46 | | #include "vp9/encoder/vp9_firstpass.h" |
47 | | #include "vp9/encoder/vp9_job_queue.h" |
48 | | #include "vp9/encoder/vp9_lookahead.h" |
49 | | #include "vp9/encoder/vp9_mbgraph.h" |
50 | | #include "vp9/encoder/vp9_mcomp.h" |
51 | | #include "vp9/encoder/vp9_noise_estimate.h" |
52 | | #include "vp9/encoder/vp9_quantize.h" |
53 | | #include "vp9/encoder/vp9_ratectrl.h" |
54 | | #include "vp9/encoder/vp9_rd.h" |
55 | | #include "vp9/encoder/vp9_speed_features.h" |
56 | | #include "vp9/encoder/vp9_svc_layercontext.h" |
57 | | #include "vp9/encoder/vp9_tokenize.h" |
58 | | |
59 | | #if CONFIG_VP9_TEMPORAL_DENOISING |
60 | | #include "vp9/encoder/vp9_denoiser.h" |
61 | | #endif |
62 | | |
63 | | #ifdef __cplusplus |
64 | | extern "C" { |
65 | | #endif |
66 | | |
67 | | // vp9 uses 10,000,000 ticks/second as time stamp |
68 | 117k | #define TICKS_PER_SEC 10000000 |
69 | | |
70 | | typedef struct { |
71 | | int nmvjointcost[MV_JOINTS]; |
72 | | int nmvcosts[2][MV_VALS]; |
73 | | int nmvcosts_hp[2][MV_VALS]; |
74 | | |
75 | | vpx_prob segment_pred_probs[PREDICTION_PROBS]; |
76 | | |
77 | | unsigned char *last_frame_seg_map_copy; |
78 | | |
79 | | // 0 = Intra, Last, GF, ARF |
80 | | signed char last_ref_lf_deltas[MAX_REF_LF_DELTAS]; |
81 | | // 0 = ZERO_MV, MV |
82 | | signed char last_mode_lf_deltas[MAX_MODE_LF_DELTAS]; |
83 | | |
84 | | FRAME_CONTEXT fc; |
85 | | } CODING_CONTEXT; |
86 | | |
87 | | typedef enum { |
88 | | // encode_breakout is disabled. |
89 | | ENCODE_BREAKOUT_DISABLED = 0, |
90 | | // encode_breakout is enabled. |
91 | | ENCODE_BREAKOUT_ENABLED = 1, |
92 | | // encode_breakout is enabled with small max_thresh limit. |
93 | | ENCODE_BREAKOUT_LIMITED = 2 |
94 | | } ENCODE_BREAKOUT_TYPE; |
95 | | |
96 | | typedef enum { |
97 | | // Good Quality Fast Encoding. The encoder balances quality with the amount of |
98 | | // time it takes to encode the output. Speed setting controls how fast. |
99 | | GOOD, |
100 | | |
101 | | // The encoder places priority on the quality of the output over encoding |
102 | | // speed. The output is compressed at the highest possible quality. This |
103 | | // option takes the longest amount of time to encode. Speed setting ignored. |
104 | | BEST, |
105 | | |
106 | | // Realtime/Live Encoding. This mode is optimized for realtime encoding (for |
107 | | // example, capturing a television signal or feed from a live camera). Speed |
108 | | // setting controls how fast. |
109 | | REALTIME |
110 | | } MODE; |
111 | | |
112 | | typedef enum { |
113 | | FRAMEFLAGS_KEY = 1 << 0, |
114 | | FRAMEFLAGS_GOLDEN = 1 << 1, |
115 | | FRAMEFLAGS_ALTREF = 1 << 2, |
116 | | } FRAMETYPE_FLAGS; |
117 | | |
118 | | typedef enum { |
119 | | NO_AQ = 0, |
120 | | VARIANCE_AQ = 1, |
121 | | COMPLEXITY_AQ = 2, |
122 | | CYCLIC_REFRESH_AQ = 3, |
123 | | EQUATOR360_AQ = 4, |
124 | | PERCEPTUAL_AQ = 5, |
125 | | PSNR_AQ = 6, |
126 | | // AQ based on lookahead temporal |
127 | | // variance (only valid for altref frames) |
128 | | LOOKAHEAD_AQ = 7, |
129 | | AQ_MODE_COUNT // This should always be the last member of the enum |
130 | | } AQ_MODE; |
131 | | |
132 | | typedef enum { |
133 | | RESIZE_NONE = 0, // No frame resizing allowed (except for SVC). |
134 | | RESIZE_FIXED = 1, // All frames are coded at the specified dimension. |
135 | | RESIZE_DYNAMIC = 2 // Coded size of each frame is determined by the codec. |
136 | | } RESIZE_TYPE; |
137 | | |
138 | | typedef enum { |
139 | | kInvalid = 0, |
140 | | kLowSadLowSumdiff = 1, |
141 | | kLowSadHighSumdiff = 2, |
142 | | kHighSadLowSumdiff = 3, |
143 | | kHighSadHighSumdiff = 4, |
144 | | kLowVarHighSumdiff = 5, |
145 | | kVeryHighSad = 6, |
146 | | } CONTENT_STATE_SB; |
147 | | |
148 | | typedef enum { |
149 | | LOOPFILTER_ALL = 0, |
150 | | LOOPFILTER_REFERENCE = 1, // Disable loopfilter on non reference frames. |
151 | | NO_LOOPFILTER = 2, // Disable loopfilter on all frames. |
152 | | } LOOPFILTER_CONTROL; |
153 | | |
154 | | typedef struct VP9EncoderConfig { |
155 | | BITSTREAM_PROFILE profile; |
156 | | vpx_bit_depth_t bit_depth; // Codec bit-depth. |
157 | | int width; // width of data passed to the compressor |
158 | | int height; // height of data passed to the compressor |
159 | | unsigned int input_bit_depth; // Input bit depth. |
160 | | double init_framerate; // set to passed in framerate |
161 | | vpx_rational_t g_timebase; // equivalent to g_timebase in vpx_codec_enc_cfg_t |
162 | | vpx_rational64_t g_timebase_in_ts; // g_timebase * TICKS_PER_SEC |
163 | | |
164 | | int64_t target_bandwidth; // bandwidth to be used in bits per second |
165 | | |
166 | | int noise_sensitivity; // pre processing blur: recommendation 0 |
167 | | int sharpness; // sharpening output: recommendation 0: |
168 | | int speed; |
169 | | // maximum allowed bitrate for any intra frame in % of bitrate target. |
170 | | unsigned int rc_max_intra_bitrate_pct; |
171 | | // maximum allowed bitrate for any inter frame in % of bitrate target. |
172 | | unsigned int rc_max_inter_bitrate_pct; |
173 | | // percent of rate boost for golden frame in CBR mode. |
174 | | unsigned int gf_cbr_boost_pct; |
175 | | |
176 | | MODE mode; |
177 | | int pass; |
178 | | |
179 | | // Key Framing Operations |
180 | | int auto_key; // autodetect cut scenes and set the keyframes |
181 | | int key_freq; // maximum distance to key frame. |
182 | | |
183 | | int lag_in_frames; // how many frames lag before we start encoding |
184 | | |
185 | | // ---------------------------------------------------------------- |
186 | | // DATARATE CONTROL OPTIONS |
187 | | |
188 | | // vbr, cbr, constrained quality or constant quality |
189 | | enum vpx_rc_mode rc_mode; |
190 | | |
191 | | // buffer targeting aggressiveness |
192 | | int under_shoot_pct; |
193 | | int over_shoot_pct; |
194 | | |
195 | | // buffering parameters |
196 | | int64_t starting_buffer_level_ms; |
197 | | int64_t optimal_buffer_level_ms; |
198 | | int64_t maximum_buffer_size_ms; |
199 | | |
200 | | // Frame drop threshold. |
201 | | int drop_frames_water_mark; |
202 | | |
203 | | // controlling quality |
204 | | int fixed_q; |
205 | | int worst_allowed_q; |
206 | | int best_allowed_q; |
207 | | int cq_level; |
208 | | AQ_MODE aq_mode; // Adaptive Quantization mode |
209 | | |
210 | | // Special handling of Adaptive Quantization for AltRef frames |
211 | | int alt_ref_aq; |
212 | | |
213 | | // Internal frame size scaling. |
214 | | RESIZE_TYPE resize_mode; |
215 | | int scaled_frame_width; |
216 | | int scaled_frame_height; |
217 | | |
218 | | // Enable feature to reduce the frame quantization every x frames. |
219 | | int frame_periodic_boost; |
220 | | |
221 | | // two pass datarate control |
222 | | int two_pass_vbrbias; // two pass datarate control tweaks |
223 | | int two_pass_vbrmin_section; |
224 | | int two_pass_vbrmax_section; |
225 | | int vbr_corpus_complexity; // 0 indicates corpus vbr disabled |
226 | | // END DATARATE CONTROL OPTIONS |
227 | | // ---------------------------------------------------------------- |
228 | | |
229 | | // Spatial and temporal scalability. |
230 | | int ss_number_layers; // Number of spatial layers. |
231 | | int ts_number_layers; // Number of temporal layers. |
232 | | // Bitrate allocation for spatial layers. |
233 | | int layer_target_bitrate[VPX_MAX_LAYERS]; |
234 | | int ss_target_bitrate[VPX_SS_MAX_LAYERS]; |
235 | | int ss_enable_auto_arf[VPX_SS_MAX_LAYERS]; |
236 | | // Bitrate allocation (CBR mode) and framerate factor, for temporal layers. |
237 | | int ts_rate_decimator[VPX_TS_MAX_LAYERS]; |
238 | | |
239 | | int enable_auto_arf; |
240 | | |
241 | | int encode_breakout; // early breakout : for video conf recommend 800 |
242 | | |
243 | | /* Bitfield defining the error resiliency features to enable. |
244 | | * Can provide decodable frames after losses in previous |
245 | | * frames and decodable partitions after losses in the same frame. |
246 | | */ |
247 | | unsigned int error_resilient_mode; |
248 | | |
249 | | /* Bitfield defining the parallel decoding mode where the |
250 | | * decoding in successive frames may be conducted in parallel |
251 | | * just by decoding the frame headers. |
252 | | */ |
253 | | unsigned int frame_parallel_decoding_mode; |
254 | | |
255 | | int arnr_max_frames; |
256 | | int arnr_strength; |
257 | | |
258 | | int min_gf_interval; |
259 | | int max_gf_interval; |
260 | | |
261 | | int tile_columns; |
262 | | int tile_rows; |
263 | | |
264 | | int enable_tpl_model; |
265 | | |
266 | | int enable_keyframe_filtering; |
267 | | |
268 | | int max_threads; |
269 | | |
270 | | unsigned int target_level; |
271 | | |
272 | | vpx_fixed_buf_t two_pass_stats_in; |
273 | | |
274 | | vp8e_tuning tuning; |
275 | | vp9e_tune_content content; |
276 | | #if CONFIG_VP9_HIGHBITDEPTH |
277 | | int use_highbitdepth; |
278 | | #endif |
279 | | vpx_color_space_t color_space; |
280 | | vpx_color_range_t color_range; |
281 | | int render_width; |
282 | | int render_height; |
283 | | VP9E_TEMPORAL_LAYERING_MODE temporal_layering_mode; |
284 | | |
285 | | int row_mt; |
286 | | unsigned int motion_vector_unit_test; |
287 | | int delta_q_uv; |
288 | | } VP9EncoderConfig; |
289 | | |
290 | 57.1k | static INLINE int is_lossless_requested(const VP9EncoderConfig *cfg) { |
291 | 57.1k | return cfg->best_allowed_q == 0 && cfg->worst_allowed_q == 0; |
292 | 57.1k | } Unexecuted instantiation: vp9_frame_scale.c:is_lossless_requested Unexecuted instantiation: vp9_encoder.c:is_lossless_requested Unexecuted instantiation: vp9_picklpf.c:is_lossless_requested Unexecuted instantiation: vp9_quantize.c:is_lossless_requested Unexecuted instantiation: vp9_ratectrl.c:is_lossless_requested Unexecuted instantiation: vp9_rd.c:is_lossless_requested Unexecuted instantiation: vp9_segmentation.c:is_lossless_requested vp9_speed_features.c:is_lossless_requested Line | Count | Source | 290 | 57.1k | static INLINE int is_lossless_requested(const VP9EncoderConfig *cfg) { | 291 | 57.1k | return cfg->best_allowed_q == 0 && cfg->worst_allowed_q == 0; | 292 | 57.1k | } |
Unexecuted instantiation: vp9_svc_layercontext.c:is_lossless_requested Unexecuted instantiation: vp9_tokenize.c:is_lossless_requested Unexecuted instantiation: vp9_aq_variance.c:is_lossless_requested Unexecuted instantiation: vp9_aq_360.c:is_lossless_requested Unexecuted instantiation: vp9_aq_cyclicrefresh.c:is_lossless_requested Unexecuted instantiation: vp9_aq_complexity.c:is_lossless_requested Unexecuted instantiation: vp9_alt_ref_aq.c:is_lossless_requested Unexecuted instantiation: vp9_skin_detection.c:is_lossless_requested Unexecuted instantiation: vp9_noise_estimate.c:is_lossless_requested Unexecuted instantiation: vp9_ext_ratectrl.c:is_lossless_requested Unexecuted instantiation: vp9_temporal_filter.c:is_lossless_requested Unexecuted instantiation: vp9_tpl_model.c:is_lossless_requested Unexecuted instantiation: vp9_mbgraph.c:is_lossless_requested Unexecuted instantiation: temporal_filter_sse4.c:is_lossless_requested Unexecuted instantiation: highbd_temporal_filter_sse4.c:is_lossless_requested Unexecuted instantiation: vp9_cx_iface.c:is_lossless_requested Unexecuted instantiation: vp9_bitstream.c:is_lossless_requested Unexecuted instantiation: vp9_context_tree.c:is_lossless_requested Unexecuted instantiation: vp9_encodeframe.c:is_lossless_requested Unexecuted instantiation: vp9_encodemb.c:is_lossless_requested Unexecuted instantiation: vp9_encodemv.c:is_lossless_requested Unexecuted instantiation: vp9_ethread.c:is_lossless_requested Unexecuted instantiation: vp9_firstpass.c:is_lossless_requested Unexecuted instantiation: vp9_lookahead.c:is_lossless_requested Unexecuted instantiation: vp9_multi_thread.c:is_lossless_requested Unexecuted instantiation: vp9_mcomp.c:is_lossless_requested Unexecuted instantiation: vp9_rdopt.c:is_lossless_requested Unexecuted instantiation: vp9_pickmode.c:is_lossless_requested |
293 | | |
294 | | typedef struct TplDepStats { |
295 | | int64_t intra_cost; |
296 | | int64_t inter_cost; |
297 | | int64_t mc_flow; |
298 | | int64_t mc_dep_cost; |
299 | | int64_t mc_ref_cost; |
300 | | |
301 | | int ref_frame_index; |
302 | | int_mv mv; |
303 | | } TplDepStats; |
304 | | |
305 | | #if CONFIG_NON_GREEDY_MV |
306 | | |
307 | | #define ZERO_MV_MODE 0 |
308 | | #define NEW_MV_MODE 1 |
309 | | #define NEAREST_MV_MODE 2 |
310 | | #define NEAR_MV_MODE 3 |
311 | | #define MAX_MV_MODE 4 |
312 | | #endif |
313 | | |
314 | | typedef struct TplDepFrame { |
315 | | uint8_t is_valid; |
316 | | TplDepStats *tpl_stats_ptr; |
317 | | int stride; |
318 | | int width; |
319 | | int height; |
320 | | int mi_rows; |
321 | | int mi_cols; |
322 | | int base_qindex; |
323 | | #if CONFIG_NON_GREEDY_MV |
324 | | int lambda; |
325 | | int *mv_mode_arr[3]; |
326 | | double *rd_diff_arr[3]; |
327 | | #endif |
328 | | } TplDepFrame; |
329 | | |
330 | | #define TPL_DEP_COST_SCALE_LOG2 4 |
331 | | |
332 | | // TODO(jingning) All spatially adaptive variables should go to TileDataEnc. |
333 | | typedef struct TileDataEnc { |
334 | | TileInfo tile_info; |
335 | | int thresh_freq_fact[BLOCK_SIZES][MAX_MODES]; |
336 | | int thresh_freq_fact_prev[BLOCK_SIZES][MAX_MODES]; |
337 | | int8_t mode_map[BLOCK_SIZES][MAX_MODES]; |
338 | | FIRSTPASS_DATA fp_data; |
339 | | VP9RowMTSync row_mt_sync; |
340 | | |
341 | | // Used for adaptive_rd_thresh with row multithreading |
342 | | int *row_base_thresh_freq_fact; |
343 | | // The value of sb_rows when row_base_thresh_freq_fact is allocated. |
344 | | // The row_base_thresh_freq_fact array has sb_rows * BLOCK_SIZES * MAX_MODES |
345 | | // elements. |
346 | | int sb_rows; |
347 | | MV firstpass_top_mv; |
348 | | } TileDataEnc; |
349 | | |
350 | | typedef struct RowMTInfo { |
351 | | JobQueueHandle job_queue_hdl; |
352 | | #if CONFIG_MULTITHREAD |
353 | | pthread_mutex_t job_mutex; |
354 | | #endif |
355 | | } RowMTInfo; |
356 | | |
357 | | typedef struct { |
358 | | TOKENEXTRA *start; |
359 | | TOKENEXTRA *stop; |
360 | | unsigned int count; |
361 | | } TOKENLIST; |
362 | | |
363 | | typedef struct MultiThreadHandle { |
364 | | int allocated_tile_rows; |
365 | | int allocated_tile_cols; |
366 | | int allocated_vert_unit_rows; |
367 | | |
368 | | // Frame level params |
369 | | int num_tile_vert_sbs[MAX_NUM_TILE_ROWS]; |
370 | | |
371 | | // Job Queue structure and handles |
372 | | JobQueue *job_queue; |
373 | | |
374 | | int jobs_per_tile_col; |
375 | | |
376 | | RowMTInfo row_mt_info[MAX_NUM_TILE_COLS]; |
377 | | int thread_id_to_tile_id[MAX_NUM_THREADS]; // Mapping of threads to tiles |
378 | | } MultiThreadHandle; |
379 | | |
380 | | typedef struct RD_COUNTS { |
381 | | vp9_coeff_count coef_counts[TX_SIZES][PLANE_TYPES]; |
382 | | int64_t comp_pred_diff[REFERENCE_MODES]; |
383 | | int64_t filter_diff[SWITCHABLE_FILTER_CONTEXTS]; |
384 | | } RD_COUNTS; |
385 | | |
386 | | typedef struct ThreadData { |
387 | | MACROBLOCK mb; |
388 | | RD_COUNTS rd_counts; |
389 | | FRAME_COUNTS *counts; |
390 | | |
391 | | PICK_MODE_CONTEXT *leaf_tree; |
392 | | PC_TREE *pc_tree; |
393 | | PC_TREE *pc_root; |
394 | | } ThreadData; |
395 | | |
396 | | struct EncWorkerData; |
397 | | |
398 | | typedef struct ActiveMap { |
399 | | int enabled; |
400 | | int update; |
401 | | unsigned char *map; |
402 | | } ActiveMap; |
403 | | |
404 | | typedef enum { Y, U, V, ALL } STAT_TYPE; |
405 | | |
406 | | typedef struct IMAGE_STAT { |
407 | | double stat[ALL + 1]; |
408 | | double worst; |
409 | | } ImageStat; |
410 | | |
411 | | // Kf noise filtering currently disabled by default in build. |
412 | | // #define ENABLE_KF_DENOISE 1 |
413 | | |
414 | 0 | #define CPB_WINDOW_SIZE 4 |
415 | 0 | #define FRAME_WINDOW_SIZE 128 |
416 | 0 | #define SAMPLE_RATE_GRACE_P 0.015 |
417 | 1.06M | #define VP9_LEVELS 14 |
418 | | |
419 | | typedef enum { |
420 | | LEVEL_UNKNOWN = 0, |
421 | | LEVEL_AUTO = 1, |
422 | | LEVEL_1 = 10, |
423 | | LEVEL_1_1 = 11, |
424 | | LEVEL_2 = 20, |
425 | | LEVEL_2_1 = 21, |
426 | | LEVEL_3 = 30, |
427 | | LEVEL_3_1 = 31, |
428 | | LEVEL_4 = 40, |
429 | | LEVEL_4_1 = 41, |
430 | | LEVEL_5 = 50, |
431 | | LEVEL_5_1 = 51, |
432 | | LEVEL_5_2 = 52, |
433 | | LEVEL_6 = 60, |
434 | | LEVEL_6_1 = 61, |
435 | | LEVEL_6_2 = 62, |
436 | | LEVEL_MAX = 255 |
437 | | } VP9_LEVEL; |
438 | | |
439 | | typedef struct { |
440 | | VP9_LEVEL level; |
441 | | uint64_t max_luma_sample_rate; |
442 | | uint32_t max_luma_picture_size; |
443 | | uint32_t max_luma_picture_breadth; |
444 | | double average_bitrate; // in kilobits per second |
445 | | double max_cpb_size; // in kilobits |
446 | | double compression_ratio; |
447 | | uint8_t max_col_tiles; |
448 | | uint32_t min_altref_distance; |
449 | | uint8_t max_ref_frame_buffers; |
450 | | } Vp9LevelSpec; |
451 | | |
452 | | extern const Vp9LevelSpec vp9_level_defs[VP9_LEVELS]; |
453 | | |
454 | | typedef struct { |
455 | | int64_t ts; // timestamp |
456 | | uint32_t luma_samples; |
457 | | uint32_t size; // in bytes |
458 | | } FrameRecord; |
459 | | |
460 | | typedef struct { |
461 | | FrameRecord buf[FRAME_WINDOW_SIZE]; |
462 | | uint8_t start; |
463 | | uint8_t len; |
464 | | } FrameWindowBuffer; |
465 | | |
466 | | typedef struct { |
467 | | uint8_t seen_first_altref; |
468 | | uint32_t frames_since_last_altref; |
469 | | uint64_t total_compressed_size; |
470 | | uint64_t total_uncompressed_size; |
471 | | double time_encoded; // in seconds |
472 | | FrameWindowBuffer frame_window_buffer; |
473 | | int ref_refresh_map; |
474 | | } Vp9LevelStats; |
475 | | |
476 | | typedef struct { |
477 | | Vp9LevelStats level_stats; |
478 | | Vp9LevelSpec level_spec; |
479 | | } Vp9LevelInfo; |
480 | | |
481 | | typedef enum { |
482 | | BITRATE_TOO_LARGE = 0, |
483 | | LUMA_PIC_SIZE_TOO_LARGE, |
484 | | LUMA_PIC_BREADTH_TOO_LARGE, |
485 | | LUMA_SAMPLE_RATE_TOO_LARGE, |
486 | | CPB_TOO_LARGE, |
487 | | COMPRESSION_RATIO_TOO_SMALL, |
488 | | TOO_MANY_COLUMN_TILE, |
489 | | ALTREF_DIST_TOO_SMALL, |
490 | | TOO_MANY_REF_BUFFER, |
491 | | TARGET_LEVEL_FAIL_IDS |
492 | | } TARGET_LEVEL_FAIL_ID; |
493 | | |
494 | | typedef struct { |
495 | | int8_t level_index; |
496 | | uint8_t fail_flag; |
497 | | int max_frame_size; // in bits |
498 | | double max_cpb_size; // in bits |
499 | | } LevelConstraint; |
500 | | |
501 | | typedef struct ARNRFilterData { |
502 | | YV12_BUFFER_CONFIG *frames[MAX_LAG_BUFFERS]; |
503 | | int strength; |
504 | | int frame_count; |
505 | | int alt_ref_index; |
506 | | struct scale_factors sf; |
507 | | YV12_BUFFER_CONFIG *dst; |
508 | | } ARNRFilterData; |
509 | | |
510 | | typedef struct EncFrameBuf { |
511 | | int mem_valid; |
512 | | int released; |
513 | | YV12_BUFFER_CONFIG frame; |
514 | | } EncFrameBuf; |
515 | | |
516 | | // Maximum operating frame buffer size needed for a GOP using ARF reference. |
517 | | // This is used to allocate the memory for TPL stats for a GOP. |
518 | 460k | #define MAX_ARF_GOP_SIZE (2 * MAX_LAG_BUFFERS) |
519 | 0 | #define MAX_KMEANS_GROUPS 8 |
520 | | |
521 | | typedef struct KMEANS_DATA { |
522 | | double value; |
523 | | int pos; |
524 | | int group_idx; |
525 | | } KMEANS_DATA; |
526 | | |
527 | | #if CONFIG_COLLECT_COMPONENT_TIMING |
528 | | #include "vpx_ports/vpx_timer.h" |
529 | | // Adjust the following to add new components. |
530 | | typedef enum { |
531 | | vp9_get_compressed_data_time, |
532 | | vp9_temporal_filter_time, |
533 | | vp9_rc_get_second_pass_params_time, |
534 | | setup_tpl_stats_time, |
535 | | Pass2Encode_time, |
536 | | |
537 | | encode_with_recode_loop_time, |
538 | | loopfilter_frame_time, |
539 | | vp9_pack_bitstream_time, |
540 | | |
541 | | encode_frame_internal_time, |
542 | | rd_pick_partition_time, |
543 | | rd_pick_sb_modes_time, |
544 | | encode_sb_time, |
545 | | |
546 | | vp9_rd_pick_inter_mode_sb_time, |
547 | | vp9_rd_pick_inter_mode_sub8x8_time, |
548 | | |
549 | | intra_mode_search_time, |
550 | | handle_inter_mode_time, |
551 | | single_motion_search_time, |
552 | | joint_motion_search_time, |
553 | | interp_filter_time, |
554 | | |
555 | | kTimingComponents, |
556 | | } TIMING_COMPONENT; |
557 | | |
558 | | static INLINE char const *get_component_name(int index) { |
559 | | switch (index) { |
560 | | case vp9_get_compressed_data_time: return "vp9_get_compressed_data_time"; |
561 | | case vp9_temporal_filter_time: return "vp9_temporal_filter_time"; |
562 | | case vp9_rc_get_second_pass_params_time: |
563 | | return "vp9_rc_get_second_pass_params_time"; |
564 | | case setup_tpl_stats_time: return "setup_tpl_stats_time"; |
565 | | case Pass2Encode_time: return "Pass2Encode_time"; |
566 | | |
567 | | case encode_with_recode_loop_time: return "encode_with_recode_loop_time"; |
568 | | case loopfilter_frame_time: return "loopfilter_frame_time"; |
569 | | case vp9_pack_bitstream_time: return "vp9_pack_bitstream_time"; |
570 | | |
571 | | case encode_frame_internal_time: return "encode_frame_internal_time"; |
572 | | case rd_pick_partition_time: return "rd_pick_partition_time"; |
573 | | case rd_pick_sb_modes_time: return "rd_pick_sb_modes_time"; |
574 | | case encode_sb_time: return "encode_sb_time"; |
575 | | |
576 | | case vp9_rd_pick_inter_mode_sb_time: |
577 | | return "vp9_rd_pick_inter_mode_sb_time"; |
578 | | case vp9_rd_pick_inter_mode_sub8x8_time: |
579 | | return "vp9_rd_pick_inter_mode_sub8x8_time"; |
580 | | |
581 | | case intra_mode_search_time: return "intra_mode_search_time"; |
582 | | case handle_inter_mode_time: return "handle_inter_mode_time"; |
583 | | case single_motion_search_time: return "single_motion_search_time"; |
584 | | case joint_motion_search_time: return "joint_motion_search_time"; |
585 | | case interp_filter_time: return "interp_filter_time"; |
586 | | |
587 | | default: assert(0); |
588 | | } |
589 | | return "error"; |
590 | | } |
591 | | #endif |
592 | | |
593 | | typedef struct VP9_COMP { |
594 | | FRAME_INFO frame_info; |
595 | | QUANTS quants; |
596 | | ThreadData td; |
597 | | MB_MODE_INFO_EXT *mbmi_ext_base; |
598 | | DECLARE_ALIGNED(16, int16_t, y_dequant[QINDEX_RANGE][8]); |
599 | | DECLARE_ALIGNED(16, int16_t, uv_dequant[QINDEX_RANGE][8]); |
600 | | VP9_COMMON common; |
601 | | VP9EncoderConfig oxcf; |
602 | | struct lookahead_ctx *lookahead; |
603 | | struct lookahead_entry *alt_ref_source; |
604 | | |
605 | | YV12_BUFFER_CONFIG *Source; |
606 | | YV12_BUFFER_CONFIG *Last_Source; // NULL for first frame and alt_ref frames |
607 | | YV12_BUFFER_CONFIG *un_scaled_source; |
608 | | YV12_BUFFER_CONFIG scaled_source; |
609 | | YV12_BUFFER_CONFIG *unscaled_last_source; |
610 | | YV12_BUFFER_CONFIG scaled_last_source; |
611 | | #ifdef ENABLE_KF_DENOISE |
612 | | YV12_BUFFER_CONFIG raw_unscaled_source; |
613 | | YV12_BUFFER_CONFIG raw_scaled_source; |
614 | | #endif |
615 | | YV12_BUFFER_CONFIG *raw_source_frame; |
616 | | |
617 | | BLOCK_SIZE tpl_bsize; |
618 | | TplDepFrame tpl_stats[MAX_ARF_GOP_SIZE]; |
619 | | // Used to store TPL stats before propagation |
620 | | VpxTplGopStats tpl_gop_stats; |
621 | | YV12_BUFFER_CONFIG *tpl_recon_frames[REF_FRAMES]; |
622 | | EncFrameBuf enc_frame_buf[REF_FRAMES]; |
623 | | #if CONFIG_MULTITHREAD |
624 | | pthread_mutex_t kmeans_mutex; |
625 | | #endif |
626 | | int kmeans_data_arr_alloc; |
627 | | KMEANS_DATA *kmeans_data_arr; |
628 | | int kmeans_data_size; |
629 | | int kmeans_data_stride; |
630 | | double kmeans_ctr_ls[MAX_KMEANS_GROUPS]; |
631 | | double kmeans_boundary_ls[MAX_KMEANS_GROUPS]; |
632 | | int kmeans_count_ls[MAX_KMEANS_GROUPS]; |
633 | | int kmeans_ctr_num; |
634 | | #if CONFIG_NON_GREEDY_MV |
635 | | MotionFieldInfo motion_field_info; |
636 | | int tpl_ready; |
637 | | int_mv *select_mv_arr; |
638 | | #endif |
639 | | |
640 | | TileDataEnc *tile_data; |
641 | | int allocated_tiles; // Keep track of memory allocated for tiles. |
642 | | |
643 | | int scaled_ref_idx[REFS_PER_FRAME]; |
644 | | int lst_fb_idx; |
645 | | int gld_fb_idx; |
646 | | int alt_fb_idx; |
647 | | |
648 | | int ref_fb_idx[REF_FRAMES]; |
649 | | |
650 | | int refresh_last_frame; |
651 | | int refresh_golden_frame; |
652 | | int refresh_alt_ref_frame; |
653 | | |
654 | | int ext_refresh_frame_flags_pending; |
655 | | int ext_refresh_last_frame; |
656 | | int ext_refresh_golden_frame; |
657 | | int ext_refresh_alt_ref_frame; |
658 | | |
659 | | int ext_refresh_frame_context_pending; |
660 | | int ext_refresh_frame_context; |
661 | | |
662 | | int64_t norm_wiener_variance; |
663 | | int64_t *mb_wiener_variance; |
664 | | int mb_wiener_var_rows; |
665 | | int mb_wiener_var_cols; |
666 | | double *mi_ssim_rdmult_scaling_factors; |
667 | | |
668 | | int64_t *sb_mul_scale; |
669 | | |
670 | | YV12_BUFFER_CONFIG last_frame_uf; |
671 | | |
672 | | TOKENEXTRA *tile_tok[4][1 << 6]; |
673 | | TOKENLIST *tplist[4][1 << 6]; |
674 | | |
675 | | // Ambient reconstruction err target for force key frames |
676 | | int64_t ambient_err; |
677 | | |
678 | | RD_CONTROL rd_ctrl; |
679 | | RD_OPT rd; |
680 | | |
681 | | CODING_CONTEXT coding_context; |
682 | | |
683 | | int *nmvcosts[2]; |
684 | | int *nmvcosts_hp[2]; |
685 | | int *nmvsadcosts[2]; |
686 | | int *nmvsadcosts_hp[2]; |
687 | | |
688 | | int64_t last_time_stamp_seen; |
689 | | int64_t last_end_time_stamp_seen; |
690 | | int64_t first_time_stamp_ever; |
691 | | |
692 | | RATE_CONTROL rc; |
693 | | double framerate; |
694 | | |
695 | | int interp_filter_selected[REF_FRAMES][SWITCHABLE]; |
696 | | |
697 | | struct vpx_codec_pkt_list *output_pkt_list; |
698 | | |
699 | | MBGRAPH_FRAME_STATS mbgraph_stats[MAX_LAG_BUFFERS]; |
700 | | int mbgraph_n_frames; // number of frames filled in the above |
701 | | int static_mb_pct; // % forced skip mbs by segmentation |
702 | | int ref_frame_flags; |
703 | | |
704 | | SPEED_FEATURES sf; |
705 | | |
706 | | uint32_t max_mv_magnitude; |
707 | | int mv_step_param; |
708 | | |
709 | | int allow_comp_inter_inter; |
710 | | |
711 | | // Default value is 1. From first pass stats, encode_breakout may be disabled. |
712 | | ENCODE_BREAKOUT_TYPE allow_encode_breakout; |
713 | | |
714 | | // Get threshold from external input. A suggested threshold is 800 for HD |
715 | | // clips, and 300 for < HD clips. |
716 | | int encode_breakout; |
717 | | |
718 | | uint8_t *segmentation_map; |
719 | | |
720 | | uint8_t *skin_map; |
721 | | |
722 | | // segment threshold for encode breakout |
723 | | int segment_encode_breakout[MAX_SEGMENTS]; |
724 | | |
725 | | CYCLIC_REFRESH *cyclic_refresh; |
726 | | ActiveMap active_map; |
727 | | |
728 | | fractional_mv_step_fp *find_fractional_mv_step; |
729 | | struct scale_factors me_sf; |
730 | | vp9_diamond_search_fn_t diamond_search_sad; |
731 | | vp9_variance_fn_ptr_t fn_ptr[BLOCK_SIZES]; |
732 | | #if CONFIG_INTERNAL_STATS |
733 | | uint64_t time_receive_data; |
734 | | uint64_t time_compress_data; |
735 | | uint64_t time_pick_lpf; |
736 | | uint64_t time_encode_sb_row; |
737 | | #endif |
738 | | |
739 | | TWO_PASS twopass; |
740 | | |
741 | | // Force recalculation of segment_ids for each mode info |
742 | | uint8_t force_update_segmentation; |
743 | | |
744 | | YV12_BUFFER_CONFIG tf_buffer; |
745 | | |
746 | | // class responsible for adaptive |
747 | | // quantization of altref frames |
748 | | struct ALT_REF_AQ *alt_ref_aq; |
749 | | |
750 | | #if CONFIG_INTERNAL_STATS |
751 | | unsigned int mode_chosen_counts[MAX_MODES]; |
752 | | |
753 | | int count; |
754 | | uint64_t total_sq_error; |
755 | | uint64_t total_samples; |
756 | | ImageStat psnr; |
757 | | |
758 | | uint64_t totalp_sq_error; |
759 | | uint64_t totalp_samples; |
760 | | ImageStat psnrp; |
761 | | |
762 | | double total_blockiness; |
763 | | double worst_blockiness; |
764 | | |
765 | | uint64_t bytes; |
766 | | double summed_quality; |
767 | | double summed_weights; |
768 | | double summedp_quality; |
769 | | double summedp_weights; |
770 | | unsigned int tot_recode_hits; |
771 | | double worst_ssim; |
772 | | |
773 | | ImageStat ssimg; |
774 | | ImageStat fastssim; |
775 | | ImageStat psnrhvs; |
776 | | |
777 | | int b_calculate_ssimg; |
778 | | int b_calculate_blockiness; |
779 | | |
780 | | int b_calculate_consistency; |
781 | | |
782 | | double total_inconsistency; |
783 | | double worst_consistency; |
784 | | Ssimv *ssim_vars; |
785 | | Metrics metrics; |
786 | | #endif |
787 | | int b_calculate_psnr; |
788 | | |
789 | | int droppable; |
790 | | |
791 | | int initial_width; |
792 | | int initial_height; |
793 | | int initial_mbs; // Number of MBs in the full-size frame; to be used to |
794 | | // normalize the firstpass stats. This will differ from the |
795 | | // number of MBs in the current frame when the frame is |
796 | | // scaled. |
797 | | |
798 | | int last_coded_width; |
799 | | int last_coded_height; |
800 | | |
801 | | int use_svc; |
802 | | |
803 | | SVC svc; |
804 | | |
805 | | int frame_flags; |
806 | | |
807 | | search_site_config ss_cfg; |
808 | | |
809 | | int mbmode_cost[INTRA_MODES]; |
810 | | unsigned int inter_mode_cost[INTER_MODE_CONTEXTS][INTER_MODES]; |
811 | | int intra_uv_mode_cost[FRAME_TYPES][INTRA_MODES][INTRA_MODES]; |
812 | | int y_mode_costs[INTRA_MODES][INTRA_MODES][INTRA_MODES]; |
813 | | int switchable_interp_costs[SWITCHABLE_FILTER_CONTEXTS][SWITCHABLE_FILTERS]; |
814 | | int partition_cost[PARTITION_CONTEXTS][PARTITION_TYPES]; |
815 | | // Indices are: max_tx_size-1, tx_size_ctx, tx_size |
816 | | int tx_size_cost[TX_SIZES - 1][TX_SIZE_CONTEXTS][TX_SIZES]; |
817 | | |
818 | | #if CONFIG_VP9_TEMPORAL_DENOISING |
819 | | VP9_DENOISER denoiser; |
820 | | #endif |
821 | | |
822 | | int resize_pending; |
823 | | RESIZE_STATE resize_state; |
824 | | int external_resize; |
825 | | int resize_scale_num; |
826 | | int resize_scale_den; |
827 | | int resize_avg_qp; |
828 | | int resize_buffer_underflow; |
829 | | int resize_count; |
830 | | |
831 | | int use_skin_detection; |
832 | | |
833 | | int target_level; |
834 | | |
835 | | NOISE_ESTIMATE noise_estimate; |
836 | | |
837 | | // Count on how many consecutive times a block uses small/zeromv for encoding. |
838 | | uint8_t *consec_zero_mv; |
839 | | |
840 | | // VAR_BASED_PARTITION thresholds |
841 | | // 0 - threshold_64x64; 1 - threshold_32x32; |
842 | | // 2 - threshold_16x16; 3 - vbp_threshold_8x8; |
843 | | int64_t vbp_thresholds[4]; |
844 | | int64_t vbp_threshold_minmax; |
845 | | int64_t vbp_threshold_sad; |
846 | | // Threshold used for partition copy |
847 | | int64_t vbp_threshold_copy; |
848 | | BLOCK_SIZE vbp_bsize_min; |
849 | | |
850 | | // Multi-threading |
851 | | int num_workers; |
852 | | VPxWorker *workers; |
853 | | struct EncWorkerData *tile_thr_data; |
854 | | VP9LfSync lf_row_sync; |
855 | | struct VP9BitstreamWorkerData *vp9_bitstream_worker_data; |
856 | | |
857 | | int keep_level_stats; |
858 | | Vp9LevelInfo level_info; |
859 | | MultiThreadHandle multi_thread_ctxt; |
860 | | void (*row_mt_sync_read_ptr)(VP9RowMTSync *const, int, int); |
861 | | void (*row_mt_sync_write_ptr)(VP9RowMTSync *const, int, int, const int); |
862 | | ARNRFilterData arnr_filter_data; |
863 | | |
864 | | int row_mt; |
865 | | unsigned int row_mt_bit_exact; |
866 | | |
867 | | // Previous Partition Info |
868 | | BLOCK_SIZE *prev_partition; |
869 | | int8_t *prev_segment_id; |
870 | | // Used to save the status of whether a block has a low variance in |
871 | | // choose_partitioning. 0 for 64x64, 1~2 for 64x32, 3~4 for 32x64, 5~8 for |
872 | | // 32x32, 9~24 for 16x16. |
873 | | // This is for the last frame and is copied to the current frame |
874 | | // when partition copy happens. |
875 | | uint8_t *prev_variance_low; |
876 | | uint8_t *copied_frame_cnt; |
877 | | uint8_t max_copied_frame; |
878 | | // If the last frame is dropped, we don't copy partition. |
879 | | uint8_t last_frame_dropped; |
880 | | |
881 | | // For each superblock: keeps track of the last time (in frame distance) the |
882 | | // the superblock did not have low source sad. |
883 | | uint8_t *content_state_sb_fd; |
884 | | |
885 | | int compute_source_sad_onepass; |
886 | | |
887 | | int compute_frame_low_motion_onepass; |
888 | | |
889 | | LevelConstraint level_constraint; |
890 | | |
891 | | uint8_t *count_arf_frame_usage; |
892 | | uint8_t *count_lastgolden_frame_usage; |
893 | | |
894 | | int multi_layer_arf; |
895 | | vpx_roi_map_t roi; |
896 | | |
897 | | LOOPFILTER_CONTROL loopfilter_ctrl; |
898 | | EXT_RATECTRL ext_ratectrl; |
899 | | |
900 | | int fixed_qp_onepass; |
901 | | |
902 | | // Flag to keep track of dynamic change in deadline mode |
903 | | // (good/best/realtime). |
904 | | MODE deadline_mode_previous_frame; |
905 | | |
906 | | // Flag to disable scene detection when rtc rate control library is used. |
907 | | int disable_scene_detection_rtc_ratectrl; |
908 | | |
909 | | #if CONFIG_COLLECT_COMPONENT_TIMING |
910 | | /*! |
911 | | * component_time[] are initialized to zero while encoder starts. |
912 | | */ |
913 | | uint64_t component_time[kTimingComponents]; |
914 | | /*! |
915 | | * Stores timing for individual components between calls of start_timing() |
916 | | * and end_timing(). |
917 | | */ |
918 | | struct vpx_usec_timer component_timer[kTimingComponents]; |
919 | | /*! |
920 | | * frame_component_time[] are initialized to zero at beginning of each frame. |
921 | | */ |
922 | | uint64_t frame_component_time[kTimingComponents]; |
923 | | #endif |
924 | | } VP9_COMP; |
925 | | |
926 | | typedef struct ENCODE_FRAME_RESULT { |
927 | | int show_idx; |
928 | | FRAME_UPDATE_TYPE update_type; |
929 | | int quantize_index; |
930 | | } ENCODE_FRAME_RESULT; |
931 | | |
932 | | void vp9_init_encode_frame_result(ENCODE_FRAME_RESULT *encode_frame_result); |
933 | | |
934 | | void vp9_initialize_enc(void); |
935 | | |
936 | | struct VP9_COMP *vp9_create_compressor(const VP9EncoderConfig *oxcf, |
937 | | BufferPool *const pool); |
938 | | void vp9_remove_compressor(VP9_COMP *cpi); |
939 | | |
940 | | void vp9_change_config(VP9_COMP *cpi, const VP9EncoderConfig *oxcf); |
941 | | |
942 | | // receive a frames worth of data. caller can assume that a copy of this |
943 | | // frame is made and not just a copy of the pointer.. |
944 | | int vp9_receive_raw_frame(VP9_COMP *cpi, vpx_enc_frame_flags_t frame_flags, |
945 | | YV12_BUFFER_CONFIG *sd, int64_t time_stamp, |
946 | | int64_t end_time); |
947 | | |
948 | | int vp9_get_compressed_data(VP9_COMP *cpi, unsigned int *frame_flags, |
949 | | size_t *size, uint8_t *dest, size_t dest_size, |
950 | | int64_t *time_stamp, int64_t *time_end, int flush, |
951 | | ENCODE_FRAME_RESULT *encode_frame_result); |
952 | | |
953 | | int vp9_get_preview_raw_frame(VP9_COMP *cpi, YV12_BUFFER_CONFIG *dest, |
954 | | vp9_ppflags_t *flags); |
955 | | |
956 | | int vp9_use_as_reference(VP9_COMP *cpi, int ref_frame_flags); |
957 | | |
958 | | void vp9_update_reference(VP9_COMP *cpi, int ref_frame_flags); |
959 | | |
960 | | int vp9_copy_reference_enc(VP9_COMP *cpi, VP9_REFFRAME ref_frame_flag, |
961 | | YV12_BUFFER_CONFIG *sd); |
962 | | |
963 | | int vp9_set_reference_enc(VP9_COMP *cpi, VP9_REFFRAME ref_frame_flag, |
964 | | YV12_BUFFER_CONFIG *sd); |
965 | | |
966 | | int vp9_update_entropy(VP9_COMP *cpi, int update); |
967 | | |
968 | | int vp9_set_active_map(VP9_COMP *cpi, unsigned char *new_map_16x16, int rows, |
969 | | int cols); |
970 | | |
971 | | int vp9_get_active_map(VP9_COMP *cpi, unsigned char *new_map_16x16, int rows, |
972 | | int cols); |
973 | | |
974 | | int vp9_set_internal_size(VP9_COMP *cpi, VPX_SCALING_MODE horiz_mode, |
975 | | VPX_SCALING_MODE vert_mode); |
976 | | |
977 | | int vp9_set_size_literal(VP9_COMP *cpi, unsigned int width, |
978 | | unsigned int height); |
979 | | |
980 | | void vp9_set_svc(VP9_COMP *cpi, int use_svc); |
981 | | |
982 | | // Check for resetting the rc flags (rc_1_frame, rc_2_frame) if the |
983 | | // configuration change has a large change in avg_frame_bandwidth. |
984 | | // For SVC check for resetting based on spatial layer average bandwidth. |
985 | | // Also reset buffer level to optimal level. |
986 | | void vp9_check_reset_rc_flag(VP9_COMP *cpi); |
987 | | |
988 | | void vp9_set_rc_buffer_sizes(VP9_COMP *cpi); |
989 | | |
990 | 0 | static INLINE int stack_pop(int *stack, int stack_size) { |
991 | 0 | int idx; |
992 | 0 | const int r = stack[0]; |
993 | 0 | for (idx = 1; idx < stack_size; ++idx) stack[idx - 1] = stack[idx]; |
994 | |
|
995 | 0 | return r; |
996 | 0 | } Unexecuted instantiation: vp9_frame_scale.c:stack_pop Unexecuted instantiation: vp9_encoder.c:stack_pop Unexecuted instantiation: vp9_picklpf.c:stack_pop Unexecuted instantiation: vp9_quantize.c:stack_pop Unexecuted instantiation: vp9_ratectrl.c:stack_pop Unexecuted instantiation: vp9_rd.c:stack_pop Unexecuted instantiation: vp9_segmentation.c:stack_pop Unexecuted instantiation: vp9_speed_features.c:stack_pop Unexecuted instantiation: vp9_svc_layercontext.c:stack_pop Unexecuted instantiation: vp9_tokenize.c:stack_pop Unexecuted instantiation: vp9_aq_variance.c:stack_pop Unexecuted instantiation: vp9_aq_360.c:stack_pop Unexecuted instantiation: vp9_aq_cyclicrefresh.c:stack_pop Unexecuted instantiation: vp9_aq_complexity.c:stack_pop Unexecuted instantiation: vp9_alt_ref_aq.c:stack_pop Unexecuted instantiation: vp9_skin_detection.c:stack_pop Unexecuted instantiation: vp9_noise_estimate.c:stack_pop Unexecuted instantiation: vp9_ext_ratectrl.c:stack_pop Unexecuted instantiation: vp9_temporal_filter.c:stack_pop Unexecuted instantiation: vp9_tpl_model.c:stack_pop Unexecuted instantiation: vp9_mbgraph.c:stack_pop Unexecuted instantiation: temporal_filter_sse4.c:stack_pop Unexecuted instantiation: highbd_temporal_filter_sse4.c:stack_pop Unexecuted instantiation: vp9_cx_iface.c:stack_pop Unexecuted instantiation: vp9_bitstream.c:stack_pop Unexecuted instantiation: vp9_context_tree.c:stack_pop Unexecuted instantiation: vp9_encodeframe.c:stack_pop Unexecuted instantiation: vp9_encodemb.c:stack_pop Unexecuted instantiation: vp9_encodemv.c:stack_pop Unexecuted instantiation: vp9_ethread.c:stack_pop Unexecuted instantiation: vp9_firstpass.c:stack_pop Unexecuted instantiation: vp9_lookahead.c:stack_pop Unexecuted instantiation: vp9_multi_thread.c:stack_pop Unexecuted instantiation: vp9_mcomp.c:stack_pop Unexecuted instantiation: vp9_rdopt.c:stack_pop Unexecuted instantiation: vp9_pickmode.c:stack_pop |
997 | | |
998 | 0 | static INLINE int stack_top(const int *stack) { return stack[0]; } Unexecuted instantiation: vp9_frame_scale.c:stack_top Unexecuted instantiation: vp9_encoder.c:stack_top Unexecuted instantiation: vp9_picklpf.c:stack_top Unexecuted instantiation: vp9_quantize.c:stack_top Unexecuted instantiation: vp9_ratectrl.c:stack_top Unexecuted instantiation: vp9_rd.c:stack_top Unexecuted instantiation: vp9_segmentation.c:stack_top Unexecuted instantiation: vp9_speed_features.c:stack_top Unexecuted instantiation: vp9_svc_layercontext.c:stack_top Unexecuted instantiation: vp9_tokenize.c:stack_top Unexecuted instantiation: vp9_aq_variance.c:stack_top Unexecuted instantiation: vp9_aq_360.c:stack_top Unexecuted instantiation: vp9_aq_cyclicrefresh.c:stack_top Unexecuted instantiation: vp9_aq_complexity.c:stack_top Unexecuted instantiation: vp9_alt_ref_aq.c:stack_top Unexecuted instantiation: vp9_skin_detection.c:stack_top Unexecuted instantiation: vp9_noise_estimate.c:stack_top Unexecuted instantiation: vp9_ext_ratectrl.c:stack_top Unexecuted instantiation: vp9_temporal_filter.c:stack_top Unexecuted instantiation: vp9_tpl_model.c:stack_top Unexecuted instantiation: vp9_mbgraph.c:stack_top Unexecuted instantiation: temporal_filter_sse4.c:stack_top Unexecuted instantiation: highbd_temporal_filter_sse4.c:stack_top Unexecuted instantiation: vp9_cx_iface.c:stack_top Unexecuted instantiation: vp9_bitstream.c:stack_top Unexecuted instantiation: vp9_context_tree.c:stack_top Unexecuted instantiation: vp9_encodeframe.c:stack_top Unexecuted instantiation: vp9_encodemb.c:stack_top Unexecuted instantiation: vp9_encodemv.c:stack_top Unexecuted instantiation: vp9_ethread.c:stack_top Unexecuted instantiation: vp9_firstpass.c:stack_top Unexecuted instantiation: vp9_lookahead.c:stack_top Unexecuted instantiation: vp9_multi_thread.c:stack_top Unexecuted instantiation: vp9_mcomp.c:stack_top Unexecuted instantiation: vp9_rdopt.c:stack_top Unexecuted instantiation: vp9_pickmode.c:stack_top |
999 | | |
1000 | 0 | static INLINE void stack_push(int *stack, int new_item, int stack_size) { |
1001 | 0 | int idx; |
1002 | 0 | for (idx = stack_size; idx > 0; --idx) stack[idx] = stack[idx - 1]; |
1003 | 0 | stack[0] = new_item; |
1004 | 0 | } Unexecuted instantiation: vp9_frame_scale.c:stack_push Unexecuted instantiation: vp9_encoder.c:stack_push Unexecuted instantiation: vp9_picklpf.c:stack_push Unexecuted instantiation: vp9_quantize.c:stack_push Unexecuted instantiation: vp9_ratectrl.c:stack_push Unexecuted instantiation: vp9_rd.c:stack_push Unexecuted instantiation: vp9_segmentation.c:stack_push Unexecuted instantiation: vp9_speed_features.c:stack_push Unexecuted instantiation: vp9_svc_layercontext.c:stack_push Unexecuted instantiation: vp9_tokenize.c:stack_push Unexecuted instantiation: vp9_aq_variance.c:stack_push Unexecuted instantiation: vp9_aq_360.c:stack_push Unexecuted instantiation: vp9_aq_cyclicrefresh.c:stack_push Unexecuted instantiation: vp9_aq_complexity.c:stack_push Unexecuted instantiation: vp9_alt_ref_aq.c:stack_push Unexecuted instantiation: vp9_skin_detection.c:stack_push Unexecuted instantiation: vp9_noise_estimate.c:stack_push Unexecuted instantiation: vp9_ext_ratectrl.c:stack_push Unexecuted instantiation: vp9_temporal_filter.c:stack_push Unexecuted instantiation: vp9_tpl_model.c:stack_push Unexecuted instantiation: vp9_mbgraph.c:stack_push Unexecuted instantiation: temporal_filter_sse4.c:stack_push Unexecuted instantiation: highbd_temporal_filter_sse4.c:stack_push Unexecuted instantiation: vp9_cx_iface.c:stack_push Unexecuted instantiation: vp9_bitstream.c:stack_push Unexecuted instantiation: vp9_context_tree.c:stack_push Unexecuted instantiation: vp9_encodeframe.c:stack_push Unexecuted instantiation: vp9_encodemb.c:stack_push Unexecuted instantiation: vp9_encodemv.c:stack_push Unexecuted instantiation: vp9_ethread.c:stack_push Unexecuted instantiation: vp9_firstpass.c:stack_push Unexecuted instantiation: vp9_lookahead.c:stack_push Unexecuted instantiation: vp9_multi_thread.c:stack_push Unexecuted instantiation: vp9_mcomp.c:stack_push Unexecuted instantiation: vp9_rdopt.c:stack_push Unexecuted instantiation: vp9_pickmode.c:stack_push |
1005 | | |
1006 | 0 | static INLINE void stack_init(int *stack, int length) { |
1007 | 0 | int idx; |
1008 | 0 | for (idx = 0; idx < length; ++idx) stack[idx] = -1; |
1009 | 0 | } Unexecuted instantiation: vp9_frame_scale.c:stack_init Unexecuted instantiation: vp9_encoder.c:stack_init Unexecuted instantiation: vp9_picklpf.c:stack_init Unexecuted instantiation: vp9_quantize.c:stack_init Unexecuted instantiation: vp9_ratectrl.c:stack_init Unexecuted instantiation: vp9_rd.c:stack_init Unexecuted instantiation: vp9_segmentation.c:stack_init Unexecuted instantiation: vp9_speed_features.c:stack_init Unexecuted instantiation: vp9_svc_layercontext.c:stack_init Unexecuted instantiation: vp9_tokenize.c:stack_init Unexecuted instantiation: vp9_aq_variance.c:stack_init Unexecuted instantiation: vp9_aq_360.c:stack_init Unexecuted instantiation: vp9_aq_cyclicrefresh.c:stack_init Unexecuted instantiation: vp9_aq_complexity.c:stack_init Unexecuted instantiation: vp9_alt_ref_aq.c:stack_init Unexecuted instantiation: vp9_skin_detection.c:stack_init Unexecuted instantiation: vp9_noise_estimate.c:stack_init Unexecuted instantiation: vp9_ext_ratectrl.c:stack_init Unexecuted instantiation: vp9_temporal_filter.c:stack_init Unexecuted instantiation: vp9_tpl_model.c:stack_init Unexecuted instantiation: vp9_mbgraph.c:stack_init Unexecuted instantiation: temporal_filter_sse4.c:stack_init Unexecuted instantiation: highbd_temporal_filter_sse4.c:stack_init Unexecuted instantiation: vp9_cx_iface.c:stack_init Unexecuted instantiation: vp9_bitstream.c:stack_init Unexecuted instantiation: vp9_context_tree.c:stack_init Unexecuted instantiation: vp9_encodeframe.c:stack_init Unexecuted instantiation: vp9_encodemb.c:stack_init Unexecuted instantiation: vp9_encodemv.c:stack_init Unexecuted instantiation: vp9_ethread.c:stack_init Unexecuted instantiation: vp9_firstpass.c:stack_init Unexecuted instantiation: vp9_lookahead.c:stack_init Unexecuted instantiation: vp9_multi_thread.c:stack_init Unexecuted instantiation: vp9_mcomp.c:stack_init Unexecuted instantiation: vp9_rdopt.c:stack_init Unexecuted instantiation: vp9_pickmode.c:stack_init |
1010 | | |
1011 | | int vp9_get_quantizer(const VP9_COMP *cpi); |
1012 | | |
1013 | 50.4k | static INLINE int frame_is_kf_gf_arf(const VP9_COMP *cpi) { |
1014 | 50.4k | return frame_is_intra_only(&cpi->common) || cpi->refresh_alt_ref_frame || |
1015 | 50.4k | (cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref); |
1016 | 50.4k | } Unexecuted instantiation: vp9_frame_scale.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_encoder.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_picklpf.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_quantize.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_ratectrl.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_rd.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_segmentation.c:frame_is_kf_gf_arf vp9_speed_features.c:frame_is_kf_gf_arf Line | Count | Source | 1013 | 50.4k | static INLINE int frame_is_kf_gf_arf(const VP9_COMP *cpi) { | 1014 | 50.4k | return frame_is_intra_only(&cpi->common) || cpi->refresh_alt_ref_frame || | 1015 | 50.4k | (cpi->refresh_golden_frame && !cpi->rc.is_src_frame_alt_ref); | 1016 | 50.4k | } |
Unexecuted instantiation: vp9_svc_layercontext.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_tokenize.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_aq_variance.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_aq_360.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_aq_cyclicrefresh.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_aq_complexity.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_alt_ref_aq.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_skin_detection.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_noise_estimate.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_ext_ratectrl.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_temporal_filter.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_tpl_model.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_mbgraph.c:frame_is_kf_gf_arf Unexecuted instantiation: temporal_filter_sse4.c:frame_is_kf_gf_arf Unexecuted instantiation: highbd_temporal_filter_sse4.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_cx_iface.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_bitstream.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_context_tree.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_encodeframe.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_encodemb.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_encodemv.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_ethread.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_firstpass.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_lookahead.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_multi_thread.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_mcomp.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_rdopt.c:frame_is_kf_gf_arf Unexecuted instantiation: vp9_pickmode.c:frame_is_kf_gf_arf |
1017 | | |
1018 | 30.9M | static INLINE int ref_frame_to_flag(int8_t ref_frame) { |
1019 | 30.9M | static const int kVp9RefFlagList[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG, |
1020 | 30.9M | VP9_ALT_FLAG }; |
1021 | 30.9M | assert(ref_frame >= LAST_FRAME && ref_frame <= ALTREF_FRAME); |
1022 | 30.9M | return kVp9RefFlagList[ref_frame]; |
1023 | 30.9M | } Unexecuted instantiation: vp9_frame_scale.c:ref_frame_to_flag Unexecuted instantiation: vp9_encoder.c:ref_frame_to_flag Unexecuted instantiation: vp9_picklpf.c:ref_frame_to_flag Unexecuted instantiation: vp9_quantize.c:ref_frame_to_flag Unexecuted instantiation: vp9_ratectrl.c:ref_frame_to_flag Unexecuted instantiation: vp9_rd.c:ref_frame_to_flag Unexecuted instantiation: vp9_segmentation.c:ref_frame_to_flag Unexecuted instantiation: vp9_speed_features.c:ref_frame_to_flag Unexecuted instantiation: vp9_svc_layercontext.c:ref_frame_to_flag Unexecuted instantiation: vp9_tokenize.c:ref_frame_to_flag Unexecuted instantiation: vp9_aq_variance.c:ref_frame_to_flag Unexecuted instantiation: vp9_aq_360.c:ref_frame_to_flag Unexecuted instantiation: vp9_aq_cyclicrefresh.c:ref_frame_to_flag Unexecuted instantiation: vp9_aq_complexity.c:ref_frame_to_flag Unexecuted instantiation: vp9_alt_ref_aq.c:ref_frame_to_flag Unexecuted instantiation: vp9_skin_detection.c:ref_frame_to_flag Unexecuted instantiation: vp9_noise_estimate.c:ref_frame_to_flag Unexecuted instantiation: vp9_ext_ratectrl.c:ref_frame_to_flag Unexecuted instantiation: vp9_temporal_filter.c:ref_frame_to_flag Unexecuted instantiation: vp9_tpl_model.c:ref_frame_to_flag Unexecuted instantiation: vp9_mbgraph.c:ref_frame_to_flag Unexecuted instantiation: temporal_filter_sse4.c:ref_frame_to_flag Unexecuted instantiation: highbd_temporal_filter_sse4.c:ref_frame_to_flag Unexecuted instantiation: vp9_cx_iface.c:ref_frame_to_flag Unexecuted instantiation: vp9_bitstream.c:ref_frame_to_flag Unexecuted instantiation: vp9_context_tree.c:ref_frame_to_flag vp9_encodeframe.c:ref_frame_to_flag Line | Count | Source | 1018 | 159k | static INLINE int ref_frame_to_flag(int8_t ref_frame) { | 1019 | 159k | static const int kVp9RefFlagList[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG, | 1020 | 159k | VP9_ALT_FLAG }; | 1021 | 159k | assert(ref_frame >= LAST_FRAME && ref_frame <= ALTREF_FRAME); | 1022 | 159k | return kVp9RefFlagList[ref_frame]; | 1023 | 159k | } |
Unexecuted instantiation: vp9_encodemb.c:ref_frame_to_flag Unexecuted instantiation: vp9_encodemv.c:ref_frame_to_flag Unexecuted instantiation: vp9_ethread.c:ref_frame_to_flag Unexecuted instantiation: vp9_firstpass.c:ref_frame_to_flag Unexecuted instantiation: vp9_lookahead.c:ref_frame_to_flag Unexecuted instantiation: vp9_multi_thread.c:ref_frame_to_flag Unexecuted instantiation: vp9_mcomp.c:ref_frame_to_flag vp9_rdopt.c:ref_frame_to_flag Line | Count | Source | 1018 | 30.7M | static INLINE int ref_frame_to_flag(int8_t ref_frame) { | 1019 | 30.7M | static const int kVp9RefFlagList[4] = { 0, VP9_LAST_FLAG, VP9_GOLD_FLAG, | 1020 | 30.7M | VP9_ALT_FLAG }; | 1021 | 30.7M | assert(ref_frame >= LAST_FRAME && ref_frame <= ALTREF_FRAME); | 1022 | 30.7M | return kVp9RefFlagList[ref_frame]; | 1023 | 30.7M | } |
Unexecuted instantiation: vp9_pickmode.c:ref_frame_to_flag |
1024 | | |
1025 | | static INLINE int get_ref_frame_map_idx(const VP9_COMP *cpi, |
1026 | 32.8M | MV_REFERENCE_FRAME ref_frame) { |
1027 | 32.8M | if (ref_frame == LAST_FRAME) { |
1028 | 16.2M | return cpi->lst_fb_idx; |
1029 | 16.5M | } else if (ref_frame == GOLDEN_FRAME) { |
1030 | 10.7M | return cpi->gld_fb_idx; |
1031 | 10.7M | } else { |
1032 | 5.79M | return cpi->alt_fb_idx; |
1033 | 5.79M | } |
1034 | 32.8M | } Unexecuted instantiation: vp9_frame_scale.c:get_ref_frame_map_idx vp9_encoder.c:get_ref_frame_map_idx Line | Count | Source | 1026 | 616k | MV_REFERENCE_FRAME ref_frame) { | 1027 | 616k | if (ref_frame == LAST_FRAME) { | 1028 | 228k | return cpi->lst_fb_idx; | 1029 | 388k | } else if (ref_frame == GOLDEN_FRAME) { | 1030 | 209k | return cpi->gld_fb_idx; | 1031 | 209k | } else { | 1032 | 178k | return cpi->alt_fb_idx; | 1033 | 178k | } | 1034 | 616k | } |
Unexecuted instantiation: vp9_picklpf.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_quantize.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_ratectrl.c:get_ref_frame_map_idx vp9_rd.c:get_ref_frame_map_idx Line | Count | Source | 1026 | 14.6M | MV_REFERENCE_FRAME ref_frame) { | 1027 | 14.6M | if (ref_frame == LAST_FRAME) { | 1028 | 7.19M | return cpi->lst_fb_idx; | 1029 | 7.45M | } else if (ref_frame == GOLDEN_FRAME) { | 1030 | 4.84M | return cpi->gld_fb_idx; | 1031 | 4.84M | } else { | 1032 | 2.60M | return cpi->alt_fb_idx; | 1033 | 2.60M | } | 1034 | 14.6M | } |
Unexecuted instantiation: vp9_segmentation.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_speed_features.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_svc_layercontext.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_tokenize.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_aq_variance.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_aq_360.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_aq_complexity.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_alt_ref_aq.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_skin_detection.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_noise_estimate.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_ext_ratectrl.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_temporal_filter.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_tpl_model.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_mbgraph.c:get_ref_frame_map_idx Unexecuted instantiation: temporal_filter_sse4.c:get_ref_frame_map_idx Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_cx_iface.c:get_ref_frame_map_idx vp9_bitstream.c:get_ref_frame_map_idx Line | Count | Source | 1026 | 162k | MV_REFERENCE_FRAME ref_frame) { | 1027 | 162k | if (ref_frame == LAST_FRAME) { | 1028 | 81.3k | return cpi->lst_fb_idx; | 1029 | 81.3k | } else if (ref_frame == GOLDEN_FRAME) { | 1030 | 40.6k | return cpi->gld_fb_idx; | 1031 | 40.6k | } else { | 1032 | 40.6k | return cpi->alt_fb_idx; | 1033 | 40.6k | } | 1034 | 162k | } |
Unexecuted instantiation: vp9_context_tree.c:get_ref_frame_map_idx vp9_encodeframe.c:get_ref_frame_map_idx Line | Count | Source | 1026 | 2.99M | MV_REFERENCE_FRAME ref_frame) { | 1027 | 2.99M | if (ref_frame == LAST_FRAME) { | 1028 | 2.27M | return cpi->lst_fb_idx; | 1029 | 2.27M | } else if (ref_frame == GOLDEN_FRAME) { | 1030 | 580k | return cpi->gld_fb_idx; | 1031 | 580k | } else { | 1032 | 140k | return cpi->alt_fb_idx; | 1033 | 140k | } | 1034 | 2.99M | } |
Unexecuted instantiation: vp9_encodemb.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_encodemv.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_ethread.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_firstpass.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_lookahead.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_multi_thread.c:get_ref_frame_map_idx Unexecuted instantiation: vp9_mcomp.c:get_ref_frame_map_idx vp9_rdopt.c:get_ref_frame_map_idx Line | Count | Source | 1026 | 14.4M | MV_REFERENCE_FRAME ref_frame) { | 1027 | 14.4M | if (ref_frame == LAST_FRAME) { | 1028 | 6.49M | return cpi->lst_fb_idx; | 1029 | 7.92M | } else if (ref_frame == GOLDEN_FRAME) { | 1030 | 5.09M | return cpi->gld_fb_idx; | 1031 | 5.09M | } else { | 1032 | 2.83M | return cpi->alt_fb_idx; | 1033 | 2.83M | } | 1034 | 14.4M | } |
Unexecuted instantiation: vp9_pickmode.c:get_ref_frame_map_idx |
1035 | | |
1036 | | static INLINE int get_ref_frame_buf_idx(const VP9_COMP *const cpi, |
1037 | 32.7M | int ref_frame) { |
1038 | 32.7M | const VP9_COMMON *const cm = &cpi->common; |
1039 | 32.7M | const int map_idx = get_ref_frame_map_idx(cpi, ref_frame); |
1040 | 32.7M | return (map_idx != INVALID_IDX) ? cm->ref_frame_map[map_idx] : INVALID_IDX; |
1041 | 32.7M | } Unexecuted instantiation: vp9_frame_scale.c:get_ref_frame_buf_idx vp9_encoder.c:get_ref_frame_buf_idx Line | Count | Source | 1037 | 616k | int ref_frame) { | 1038 | 616k | const VP9_COMMON *const cm = &cpi->common; | 1039 | 616k | const int map_idx = get_ref_frame_map_idx(cpi, ref_frame); | 1040 | 616k | return (map_idx != INVALID_IDX) ? cm->ref_frame_map[map_idx] : INVALID_IDX; | 1041 | 616k | } |
Unexecuted instantiation: vp9_picklpf.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_quantize.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_ratectrl.c:get_ref_frame_buf_idx vp9_rd.c:get_ref_frame_buf_idx Line | Count | Source | 1037 | 14.6M | int ref_frame) { | 1038 | 14.6M | const VP9_COMMON *const cm = &cpi->common; | 1039 | 14.6M | const int map_idx = get_ref_frame_map_idx(cpi, ref_frame); | 1040 | 14.6M | return (map_idx != INVALID_IDX) ? cm->ref_frame_map[map_idx] : INVALID_IDX; | 1041 | 14.6M | } |
Unexecuted instantiation: vp9_segmentation.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_speed_features.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_svc_layercontext.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_tokenize.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_aq_variance.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_aq_360.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_aq_complexity.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_alt_ref_aq.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_skin_detection.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_noise_estimate.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_ext_ratectrl.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_temporal_filter.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_tpl_model.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_mbgraph.c:get_ref_frame_buf_idx Unexecuted instantiation: temporal_filter_sse4.c:get_ref_frame_buf_idx Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_cx_iface.c:get_ref_frame_buf_idx vp9_bitstream.c:get_ref_frame_buf_idx Line | Count | Source | 1037 | 40.6k | int ref_frame) { | 1038 | 40.6k | const VP9_COMMON *const cm = &cpi->common; | 1039 | 40.6k | const int map_idx = get_ref_frame_map_idx(cpi, ref_frame); | 1040 | 40.6k | return (map_idx != INVALID_IDX) ? cm->ref_frame_map[map_idx] : INVALID_IDX; | 1041 | 40.6k | } |
Unexecuted instantiation: vp9_context_tree.c:get_ref_frame_buf_idx vp9_encodeframe.c:get_ref_frame_buf_idx Line | Count | Source | 1037 | 2.99M | int ref_frame) { | 1038 | 2.99M | const VP9_COMMON *const cm = &cpi->common; | 1039 | 2.99M | const int map_idx = get_ref_frame_map_idx(cpi, ref_frame); | 1040 | 2.99M | return (map_idx != INVALID_IDX) ? cm->ref_frame_map[map_idx] : INVALID_IDX; | 1041 | 2.99M | } |
Unexecuted instantiation: vp9_encodemb.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_encodemv.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_ethread.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_firstpass.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_lookahead.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_multi_thread.c:get_ref_frame_buf_idx Unexecuted instantiation: vp9_mcomp.c:get_ref_frame_buf_idx vp9_rdopt.c:get_ref_frame_buf_idx Line | Count | Source | 1037 | 14.4M | int ref_frame) { | 1038 | 14.4M | const VP9_COMMON *const cm = &cpi->common; | 1039 | 14.4M | const int map_idx = get_ref_frame_map_idx(cpi, ref_frame); | 1040 | 14.4M | return (map_idx != INVALID_IDX) ? cm->ref_frame_map[map_idx] : INVALID_IDX; | 1041 | 14.4M | } |
Unexecuted instantiation: vp9_pickmode.c:get_ref_frame_buf_idx |
1042 | | |
1043 | | static INLINE RefCntBuffer *get_ref_cnt_buffer(const VP9_COMMON *cm, |
1044 | 265k | int fb_idx) { |
1045 | 265k | return fb_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[fb_idx] : NULL; |
1046 | 265k | } Unexecuted instantiation: vp9_frame_scale.c:get_ref_cnt_buffer vp9_encoder.c:get_ref_cnt_buffer Line | Count | Source | 1044 | 265k | int fb_idx) { | 1045 | 265k | return fb_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[fb_idx] : NULL; | 1046 | 265k | } |
Unexecuted instantiation: vp9_picklpf.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_quantize.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_ratectrl.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_rd.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_segmentation.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_speed_features.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_svc_layercontext.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_tokenize.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_aq_variance.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_aq_360.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_aq_complexity.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_alt_ref_aq.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_skin_detection.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_noise_estimate.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_ext_ratectrl.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_temporal_filter.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_tpl_model.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_mbgraph.c:get_ref_cnt_buffer Unexecuted instantiation: temporal_filter_sse4.c:get_ref_cnt_buffer Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_cx_iface.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_bitstream.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_context_tree.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_encodeframe.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_encodemb.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_encodemv.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_ethread.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_firstpass.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_lookahead.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_multi_thread.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_mcomp.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_rdopt.c:get_ref_cnt_buffer Unexecuted instantiation: vp9_pickmode.c:get_ref_cnt_buffer |
1047 | | |
1048 | | static INLINE void get_ref_frame_bufs( |
1049 | 0 | const VP9_COMP *cpi, RefCntBuffer *ref_frame_bufs[MAX_INTER_REF_FRAMES]) { |
1050 | 0 | const VP9_COMMON *const cm = &cpi->common; |
1051 | 0 | MV_REFERENCE_FRAME ref_frame; |
1052 | 0 | for (ref_frame = LAST_FRAME; ref_frame < MAX_REF_FRAMES; ++ref_frame) { |
1053 | 0 | int ref_frame_buf_idx = get_ref_frame_buf_idx(cpi, ref_frame); |
1054 | 0 | int inter_ref_idx = mv_ref_frame_to_inter_ref_idx(ref_frame); |
1055 | 0 | ref_frame_bufs[inter_ref_idx] = get_ref_cnt_buffer(cm, ref_frame_buf_idx); |
1056 | 0 | } |
1057 | 0 | } Unexecuted instantiation: vp9_frame_scale.c:get_ref_frame_bufs Unexecuted instantiation: vp9_encoder.c:get_ref_frame_bufs Unexecuted instantiation: vp9_picklpf.c:get_ref_frame_bufs Unexecuted instantiation: vp9_quantize.c:get_ref_frame_bufs Unexecuted instantiation: vp9_ratectrl.c:get_ref_frame_bufs Unexecuted instantiation: vp9_rd.c:get_ref_frame_bufs Unexecuted instantiation: vp9_segmentation.c:get_ref_frame_bufs Unexecuted instantiation: vp9_speed_features.c:get_ref_frame_bufs Unexecuted instantiation: vp9_svc_layercontext.c:get_ref_frame_bufs Unexecuted instantiation: vp9_tokenize.c:get_ref_frame_bufs Unexecuted instantiation: vp9_aq_variance.c:get_ref_frame_bufs Unexecuted instantiation: vp9_aq_360.c:get_ref_frame_bufs Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_ref_frame_bufs Unexecuted instantiation: vp9_aq_complexity.c:get_ref_frame_bufs Unexecuted instantiation: vp9_alt_ref_aq.c:get_ref_frame_bufs Unexecuted instantiation: vp9_skin_detection.c:get_ref_frame_bufs Unexecuted instantiation: vp9_noise_estimate.c:get_ref_frame_bufs Unexecuted instantiation: vp9_ext_ratectrl.c:get_ref_frame_bufs Unexecuted instantiation: vp9_temporal_filter.c:get_ref_frame_bufs Unexecuted instantiation: vp9_tpl_model.c:get_ref_frame_bufs Unexecuted instantiation: vp9_mbgraph.c:get_ref_frame_bufs Unexecuted instantiation: temporal_filter_sse4.c:get_ref_frame_bufs Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_ref_frame_bufs Unexecuted instantiation: vp9_cx_iface.c:get_ref_frame_bufs Unexecuted instantiation: vp9_bitstream.c:get_ref_frame_bufs Unexecuted instantiation: vp9_context_tree.c:get_ref_frame_bufs Unexecuted instantiation: vp9_encodeframe.c:get_ref_frame_bufs Unexecuted instantiation: vp9_encodemb.c:get_ref_frame_bufs Unexecuted instantiation: vp9_encodemv.c:get_ref_frame_bufs Unexecuted instantiation: vp9_ethread.c:get_ref_frame_bufs Unexecuted instantiation: vp9_firstpass.c:get_ref_frame_bufs Unexecuted instantiation: vp9_lookahead.c:get_ref_frame_bufs Unexecuted instantiation: vp9_multi_thread.c:get_ref_frame_bufs Unexecuted instantiation: vp9_mcomp.c:get_ref_frame_bufs Unexecuted instantiation: vp9_rdopt.c:get_ref_frame_bufs Unexecuted instantiation: vp9_pickmode.c:get_ref_frame_bufs |
1058 | | |
1059 | | static INLINE YV12_BUFFER_CONFIG *get_ref_frame_buffer( |
1060 | 17.6M | const VP9_COMP *const cpi, MV_REFERENCE_FRAME ref_frame) { |
1061 | 17.6M | const VP9_COMMON *const cm = &cpi->common; |
1062 | 17.6M | const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame); |
1063 | 17.6M | return buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf |
1064 | 17.6M | : NULL; |
1065 | 17.6M | } Unexecuted instantiation: vp9_frame_scale.c:get_ref_frame_buffer vp9_encoder.c:get_ref_frame_buffer Line | Count | Source | 1060 | 198k | const VP9_COMP *const cpi, MV_REFERENCE_FRAME ref_frame) { | 1061 | 198k | const VP9_COMMON *const cm = &cpi->common; | 1062 | 198k | const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame); | 1063 | 198k | return buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf | 1064 | 198k | : NULL; | 1065 | 198k | } |
Unexecuted instantiation: vp9_picklpf.c:get_ref_frame_buffer Unexecuted instantiation: vp9_quantize.c:get_ref_frame_buffer Unexecuted instantiation: vp9_ratectrl.c:get_ref_frame_buffer Unexecuted instantiation: vp9_rd.c:get_ref_frame_buffer Unexecuted instantiation: vp9_segmentation.c:get_ref_frame_buffer Unexecuted instantiation: vp9_speed_features.c:get_ref_frame_buffer Unexecuted instantiation: vp9_svc_layercontext.c:get_ref_frame_buffer Unexecuted instantiation: vp9_tokenize.c:get_ref_frame_buffer Unexecuted instantiation: vp9_aq_variance.c:get_ref_frame_buffer Unexecuted instantiation: vp9_aq_360.c:get_ref_frame_buffer Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_ref_frame_buffer Unexecuted instantiation: vp9_aq_complexity.c:get_ref_frame_buffer Unexecuted instantiation: vp9_alt_ref_aq.c:get_ref_frame_buffer Unexecuted instantiation: vp9_skin_detection.c:get_ref_frame_buffer Unexecuted instantiation: vp9_noise_estimate.c:get_ref_frame_buffer Unexecuted instantiation: vp9_ext_ratectrl.c:get_ref_frame_buffer Unexecuted instantiation: vp9_temporal_filter.c:get_ref_frame_buffer Unexecuted instantiation: vp9_tpl_model.c:get_ref_frame_buffer Unexecuted instantiation: vp9_mbgraph.c:get_ref_frame_buffer Unexecuted instantiation: temporal_filter_sse4.c:get_ref_frame_buffer Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_ref_frame_buffer Unexecuted instantiation: vp9_cx_iface.c:get_ref_frame_buffer vp9_bitstream.c:get_ref_frame_buffer Line | Count | Source | 1060 | 40.6k | const VP9_COMP *const cpi, MV_REFERENCE_FRAME ref_frame) { | 1061 | 40.6k | const VP9_COMMON *const cm = &cpi->common; | 1062 | 40.6k | const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame); | 1063 | 40.6k | return buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf | 1064 | 40.6k | : NULL; | 1065 | 40.6k | } |
Unexecuted instantiation: vp9_context_tree.c:get_ref_frame_buffer vp9_encodeframe.c:get_ref_frame_buffer Line | Count | Source | 1060 | 2.99M | const VP9_COMP *const cpi, MV_REFERENCE_FRAME ref_frame) { | 1061 | 2.99M | const VP9_COMMON *const cm = &cpi->common; | 1062 | 2.99M | const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame); | 1063 | 2.99M | return buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf | 1064 | 2.99M | : NULL; | 1065 | 2.99M | } |
Unexecuted instantiation: vp9_encodemb.c:get_ref_frame_buffer Unexecuted instantiation: vp9_encodemv.c:get_ref_frame_buffer Unexecuted instantiation: vp9_ethread.c:get_ref_frame_buffer Unexecuted instantiation: vp9_firstpass.c:get_ref_frame_buffer Unexecuted instantiation: vp9_lookahead.c:get_ref_frame_buffer Unexecuted instantiation: vp9_multi_thread.c:get_ref_frame_buffer Unexecuted instantiation: vp9_mcomp.c:get_ref_frame_buffer vp9_rdopt.c:get_ref_frame_buffer Line | Count | Source | 1060 | 14.4M | const VP9_COMP *const cpi, MV_REFERENCE_FRAME ref_frame) { | 1061 | 14.4M | const VP9_COMMON *const cm = &cpi->common; | 1062 | 14.4M | const int buf_idx = get_ref_frame_buf_idx(cpi, ref_frame); | 1063 | 14.4M | return buf_idx != INVALID_IDX ? &cm->buffer_pool->frame_bufs[buf_idx].buf | 1064 | 14.4M | : NULL; | 1065 | 14.4M | } |
Unexecuted instantiation: vp9_pickmode.c:get_ref_frame_buffer |
1066 | | |
1067 | 135k | static INLINE int get_token_alloc(int mb_rows, int mb_cols) { |
1068 | | // TODO(JBB): double check we can't exceed this token count if we have a |
1069 | | // 32x32 transform crossing a boundary at a multiple of 16. |
1070 | | // mb_rows, cols are in units of 16 pixels. We assume 3 planes all at full |
1071 | | // resolution. We assume up to 1 token per pixel, and then allow |
1072 | | // a head room of 4. |
1073 | | |
1074 | | // Use aligned mb_rows and mb_cols to better align with actual token sizes. |
1075 | 135k | const int aligned_mb_rows = |
1076 | 135k | ALIGN_POWER_OF_TWO(mb_rows, MI_BLOCK_SIZE_LOG2 - 1); |
1077 | 135k | const int aligned_mb_cols = |
1078 | 135k | ALIGN_POWER_OF_TWO(mb_cols, MI_BLOCK_SIZE_LOG2 - 1); |
1079 | 135k | return aligned_mb_rows * aligned_mb_cols * (16 * 16 * 3 + 4); |
1080 | 135k | } Unexecuted instantiation: vp9_frame_scale.c:get_token_alloc vp9_encoder.c:get_token_alloc Line | Count | Source | 1067 | 3.99k | static INLINE int get_token_alloc(int mb_rows, int mb_cols) { | 1068 | | // TODO(JBB): double check we can't exceed this token count if we have a | 1069 | | // 32x32 transform crossing a boundary at a multiple of 16. | 1070 | | // mb_rows, cols are in units of 16 pixels. We assume 3 planes all at full | 1071 | | // resolution. We assume up to 1 token per pixel, and then allow | 1072 | | // a head room of 4. | 1073 | | | 1074 | | // Use aligned mb_rows and mb_cols to better align with actual token sizes. | 1075 | 3.99k | const int aligned_mb_rows = | 1076 | 3.99k | ALIGN_POWER_OF_TWO(mb_rows, MI_BLOCK_SIZE_LOG2 - 1); | 1077 | 3.99k | const int aligned_mb_cols = | 1078 | 3.99k | ALIGN_POWER_OF_TWO(mb_cols, MI_BLOCK_SIZE_LOG2 - 1); | 1079 | 3.99k | return aligned_mb_rows * aligned_mb_cols * (16 * 16 * 3 + 4); | 1080 | 3.99k | } |
Unexecuted instantiation: vp9_picklpf.c:get_token_alloc Unexecuted instantiation: vp9_quantize.c:get_token_alloc Unexecuted instantiation: vp9_ratectrl.c:get_token_alloc Unexecuted instantiation: vp9_rd.c:get_token_alloc Unexecuted instantiation: vp9_segmentation.c:get_token_alloc Unexecuted instantiation: vp9_speed_features.c:get_token_alloc Unexecuted instantiation: vp9_svc_layercontext.c:get_token_alloc Unexecuted instantiation: vp9_tokenize.c:get_token_alloc Unexecuted instantiation: vp9_aq_variance.c:get_token_alloc Unexecuted instantiation: vp9_aq_360.c:get_token_alloc Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_token_alloc Unexecuted instantiation: vp9_aq_complexity.c:get_token_alloc Unexecuted instantiation: vp9_alt_ref_aq.c:get_token_alloc Unexecuted instantiation: vp9_skin_detection.c:get_token_alloc Unexecuted instantiation: vp9_noise_estimate.c:get_token_alloc Unexecuted instantiation: vp9_ext_ratectrl.c:get_token_alloc Unexecuted instantiation: vp9_temporal_filter.c:get_token_alloc Unexecuted instantiation: vp9_tpl_model.c:get_token_alloc Unexecuted instantiation: vp9_mbgraph.c:get_token_alloc Unexecuted instantiation: temporal_filter_sse4.c:get_token_alloc Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_token_alloc Unexecuted instantiation: vp9_cx_iface.c:get_token_alloc Unexecuted instantiation: vp9_bitstream.c:get_token_alloc Unexecuted instantiation: vp9_context_tree.c:get_token_alloc vp9_encodeframe.c:get_token_alloc Line | Count | Source | 1067 | 131k | static INLINE int get_token_alloc(int mb_rows, int mb_cols) { | 1068 | | // TODO(JBB): double check we can't exceed this token count if we have a | 1069 | | // 32x32 transform crossing a boundary at a multiple of 16. | 1070 | | // mb_rows, cols are in units of 16 pixels. We assume 3 planes all at full | 1071 | | // resolution. We assume up to 1 token per pixel, and then allow | 1072 | | // a head room of 4. | 1073 | | | 1074 | | // Use aligned mb_rows and mb_cols to better align with actual token sizes. | 1075 | 131k | const int aligned_mb_rows = | 1076 | 131k | ALIGN_POWER_OF_TWO(mb_rows, MI_BLOCK_SIZE_LOG2 - 1); | 1077 | 131k | const int aligned_mb_cols = | 1078 | 131k | ALIGN_POWER_OF_TWO(mb_cols, MI_BLOCK_SIZE_LOG2 - 1); | 1079 | 131k | return aligned_mb_rows * aligned_mb_cols * (16 * 16 * 3 + 4); | 1080 | 131k | } |
Unexecuted instantiation: vp9_encodemb.c:get_token_alloc Unexecuted instantiation: vp9_encodemv.c:get_token_alloc Unexecuted instantiation: vp9_ethread.c:get_token_alloc Unexecuted instantiation: vp9_firstpass.c:get_token_alloc Unexecuted instantiation: vp9_lookahead.c:get_token_alloc Unexecuted instantiation: vp9_multi_thread.c:get_token_alloc Unexecuted instantiation: vp9_mcomp.c:get_token_alloc Unexecuted instantiation: vp9_rdopt.c:get_token_alloc Unexecuted instantiation: vp9_pickmode.c:get_token_alloc |
1081 | | |
1082 | | // Get the allocated token size for a tile. It does the same calculation as in |
1083 | | // the frame token allocation. |
1084 | 57.7k | static INLINE int allocated_tokens(TileInfo tile) { |
1085 | 57.7k | int tile_mb_rows = (tile.mi_row_end - tile.mi_row_start + 1) >> 1; |
1086 | 57.7k | int tile_mb_cols = (tile.mi_col_end - tile.mi_col_start + 1) >> 1; |
1087 | | |
1088 | 57.7k | return get_token_alloc(tile_mb_rows, tile_mb_cols); |
1089 | 57.7k | } Unexecuted instantiation: vp9_frame_scale.c:allocated_tokens Unexecuted instantiation: vp9_encoder.c:allocated_tokens Unexecuted instantiation: vp9_picklpf.c:allocated_tokens Unexecuted instantiation: vp9_quantize.c:allocated_tokens Unexecuted instantiation: vp9_ratectrl.c:allocated_tokens Unexecuted instantiation: vp9_rd.c:allocated_tokens Unexecuted instantiation: vp9_segmentation.c:allocated_tokens Unexecuted instantiation: vp9_speed_features.c:allocated_tokens Unexecuted instantiation: vp9_svc_layercontext.c:allocated_tokens Unexecuted instantiation: vp9_tokenize.c:allocated_tokens Unexecuted instantiation: vp9_aq_variance.c:allocated_tokens Unexecuted instantiation: vp9_aq_360.c:allocated_tokens Unexecuted instantiation: vp9_aq_cyclicrefresh.c:allocated_tokens Unexecuted instantiation: vp9_aq_complexity.c:allocated_tokens Unexecuted instantiation: vp9_alt_ref_aq.c:allocated_tokens Unexecuted instantiation: vp9_skin_detection.c:allocated_tokens Unexecuted instantiation: vp9_noise_estimate.c:allocated_tokens Unexecuted instantiation: vp9_ext_ratectrl.c:allocated_tokens Unexecuted instantiation: vp9_temporal_filter.c:allocated_tokens Unexecuted instantiation: vp9_tpl_model.c:allocated_tokens Unexecuted instantiation: vp9_mbgraph.c:allocated_tokens Unexecuted instantiation: temporal_filter_sse4.c:allocated_tokens Unexecuted instantiation: highbd_temporal_filter_sse4.c:allocated_tokens Unexecuted instantiation: vp9_cx_iface.c:allocated_tokens Unexecuted instantiation: vp9_bitstream.c:allocated_tokens Unexecuted instantiation: vp9_context_tree.c:allocated_tokens vp9_encodeframe.c:allocated_tokens Line | Count | Source | 1084 | 57.7k | static INLINE int allocated_tokens(TileInfo tile) { | 1085 | 57.7k | int tile_mb_rows = (tile.mi_row_end - tile.mi_row_start + 1) >> 1; | 1086 | 57.7k | int tile_mb_cols = (tile.mi_col_end - tile.mi_col_start + 1) >> 1; | 1087 | | | 1088 | 57.7k | return get_token_alloc(tile_mb_rows, tile_mb_cols); | 1089 | 57.7k | } |
Unexecuted instantiation: vp9_encodemb.c:allocated_tokens Unexecuted instantiation: vp9_encodemv.c:allocated_tokens Unexecuted instantiation: vp9_ethread.c:allocated_tokens Unexecuted instantiation: vp9_firstpass.c:allocated_tokens Unexecuted instantiation: vp9_lookahead.c:allocated_tokens Unexecuted instantiation: vp9_multi_thread.c:allocated_tokens Unexecuted instantiation: vp9_mcomp.c:allocated_tokens Unexecuted instantiation: vp9_rdopt.c:allocated_tokens Unexecuted instantiation: vp9_pickmode.c:allocated_tokens |
1090 | | |
1091 | | static INLINE void get_start_tok(VP9_COMP *cpi, int tile_row, int tile_col, |
1092 | 74.2k | int mi_row, TOKENEXTRA **tok) { |
1093 | 74.2k | VP9_COMMON *const cm = &cpi->common; |
1094 | 74.2k | const int tile_cols = 1 << cm->log2_tile_cols; |
1095 | 74.2k | TileDataEnc *this_tile = &cpi->tile_data[tile_row * tile_cols + tile_col]; |
1096 | 74.2k | const TileInfo *const tile_info = &this_tile->tile_info; |
1097 | | |
1098 | 74.2k | int tile_mb_cols = (tile_info->mi_col_end - tile_info->mi_col_start + 1) >> 1; |
1099 | 74.2k | const int mb_row = (mi_row - tile_info->mi_row_start) >> 1; |
1100 | | |
1101 | 74.2k | *tok = |
1102 | 74.2k | cpi->tile_tok[tile_row][tile_col] + get_token_alloc(mb_row, tile_mb_cols); |
1103 | 74.2k | } Unexecuted instantiation: vp9_frame_scale.c:get_start_tok Unexecuted instantiation: vp9_encoder.c:get_start_tok Unexecuted instantiation: vp9_picklpf.c:get_start_tok Unexecuted instantiation: vp9_quantize.c:get_start_tok Unexecuted instantiation: vp9_ratectrl.c:get_start_tok Unexecuted instantiation: vp9_rd.c:get_start_tok Unexecuted instantiation: vp9_segmentation.c:get_start_tok Unexecuted instantiation: vp9_speed_features.c:get_start_tok Unexecuted instantiation: vp9_svc_layercontext.c:get_start_tok Unexecuted instantiation: vp9_tokenize.c:get_start_tok Unexecuted instantiation: vp9_aq_variance.c:get_start_tok Unexecuted instantiation: vp9_aq_360.c:get_start_tok Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_start_tok Unexecuted instantiation: vp9_aq_complexity.c:get_start_tok Unexecuted instantiation: vp9_alt_ref_aq.c:get_start_tok Unexecuted instantiation: vp9_skin_detection.c:get_start_tok Unexecuted instantiation: vp9_noise_estimate.c:get_start_tok Unexecuted instantiation: vp9_ext_ratectrl.c:get_start_tok Unexecuted instantiation: vp9_temporal_filter.c:get_start_tok Unexecuted instantiation: vp9_tpl_model.c:get_start_tok Unexecuted instantiation: vp9_mbgraph.c:get_start_tok Unexecuted instantiation: temporal_filter_sse4.c:get_start_tok Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_start_tok Unexecuted instantiation: vp9_cx_iface.c:get_start_tok Unexecuted instantiation: vp9_bitstream.c:get_start_tok Unexecuted instantiation: vp9_context_tree.c:get_start_tok vp9_encodeframe.c:get_start_tok Line | Count | Source | 1092 | 74.2k | int mi_row, TOKENEXTRA **tok) { | 1093 | 74.2k | VP9_COMMON *const cm = &cpi->common; | 1094 | 74.2k | const int tile_cols = 1 << cm->log2_tile_cols; | 1095 | 74.2k | TileDataEnc *this_tile = &cpi->tile_data[tile_row * tile_cols + tile_col]; | 1096 | 74.2k | const TileInfo *const tile_info = &this_tile->tile_info; | 1097 | | | 1098 | 74.2k | int tile_mb_cols = (tile_info->mi_col_end - tile_info->mi_col_start + 1) >> 1; | 1099 | 74.2k | const int mb_row = (mi_row - tile_info->mi_row_start) >> 1; | 1100 | | | 1101 | 74.2k | *tok = | 1102 | 74.2k | cpi->tile_tok[tile_row][tile_col] + get_token_alloc(mb_row, tile_mb_cols); | 1103 | 74.2k | } |
Unexecuted instantiation: vp9_encodemb.c:get_start_tok Unexecuted instantiation: vp9_encodemv.c:get_start_tok Unexecuted instantiation: vp9_ethread.c:get_start_tok Unexecuted instantiation: vp9_firstpass.c:get_start_tok Unexecuted instantiation: vp9_lookahead.c:get_start_tok Unexecuted instantiation: vp9_multi_thread.c:get_start_tok Unexecuted instantiation: vp9_mcomp.c:get_start_tok Unexecuted instantiation: vp9_rdopt.c:get_start_tok Unexecuted instantiation: vp9_pickmode.c:get_start_tok |
1104 | | |
1105 | | int64_t vp9_get_y_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b); |
1106 | | #if CONFIG_VP9_HIGHBITDEPTH |
1107 | | int64_t vp9_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a, |
1108 | | const YV12_BUFFER_CONFIG *b); |
1109 | | #endif // CONFIG_VP9_HIGHBITDEPTH |
1110 | | |
1111 | | void vp9_scale_references(VP9_COMP *cpi); |
1112 | | |
1113 | | void vp9_update_reference_frames(VP9_COMP *cpi); |
1114 | | |
1115 | | void vp9_get_ref_frame_info(FRAME_UPDATE_TYPE update_type, int ref_frame_flags, |
1116 | | RefCntBuffer *ref_frame_bufs[MAX_INTER_REF_FRAMES], |
1117 | | int *ref_frame_coding_indexes, |
1118 | | int *ref_frame_valid_list); |
1119 | | |
1120 | | void vp9_set_high_precision_mv(VP9_COMP *cpi, int allow_high_precision_mv); |
1121 | | |
1122 | | #if CONFIG_VP9_HIGHBITDEPTH |
1123 | | void vp9_scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src, |
1124 | | YV12_BUFFER_CONFIG *dst, int bd); |
1125 | | #else |
1126 | | void vp9_scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src, |
1127 | | YV12_BUFFER_CONFIG *dst); |
1128 | | #endif // CONFIG_VP9_HIGHBITDEPTH |
1129 | | |
1130 | | YV12_BUFFER_CONFIG *vp9_scale_if_required( |
1131 | | VP9_COMMON *cm, YV12_BUFFER_CONFIG *unscaled, YV12_BUFFER_CONFIG *scaled, |
1132 | | int use_normative_scaler, INTERP_FILTER filter_type, int phase_scaler); |
1133 | | |
1134 | | void vp9_apply_encoding_flags(VP9_COMP *cpi, vpx_enc_frame_flags_t flags); |
1135 | | |
1136 | 895k | static INLINE int is_one_pass_svc(const struct VP9_COMP *const cpi) { |
1137 | 895k | return (cpi->use_svc && cpi->oxcf.pass == 0); |
1138 | 895k | } Unexecuted instantiation: vp9_frame_scale.c:is_one_pass_svc vp9_encoder.c:is_one_pass_svc Line | Count | Source | 1136 | 789k | static INLINE int is_one_pass_svc(const struct VP9_COMP *const cpi) { | 1137 | 789k | return (cpi->use_svc && cpi->oxcf.pass == 0); | 1138 | 789k | } |
Unexecuted instantiation: vp9_picklpf.c:is_one_pass_svc Unexecuted instantiation: vp9_quantize.c:is_one_pass_svc vp9_ratectrl.c:is_one_pass_svc Line | Count | Source | 1136 | 53.0k | static INLINE int is_one_pass_svc(const struct VP9_COMP *const cpi) { | 1137 | 53.0k | return (cpi->use_svc && cpi->oxcf.pass == 0); | 1138 | 53.0k | } |
Unexecuted instantiation: vp9_rd.c:is_one_pass_svc Unexecuted instantiation: vp9_segmentation.c:is_one_pass_svc Unexecuted instantiation: vp9_speed_features.c:is_one_pass_svc Unexecuted instantiation: vp9_svc_layercontext.c:is_one_pass_svc Unexecuted instantiation: vp9_tokenize.c:is_one_pass_svc Unexecuted instantiation: vp9_aq_variance.c:is_one_pass_svc Unexecuted instantiation: vp9_aq_360.c:is_one_pass_svc Unexecuted instantiation: vp9_aq_cyclicrefresh.c:is_one_pass_svc Unexecuted instantiation: vp9_aq_complexity.c:is_one_pass_svc Unexecuted instantiation: vp9_alt_ref_aq.c:is_one_pass_svc Unexecuted instantiation: vp9_skin_detection.c:is_one_pass_svc Unexecuted instantiation: vp9_noise_estimate.c:is_one_pass_svc Unexecuted instantiation: vp9_ext_ratectrl.c:is_one_pass_svc Unexecuted instantiation: vp9_temporal_filter.c:is_one_pass_svc Unexecuted instantiation: vp9_tpl_model.c:is_one_pass_svc Unexecuted instantiation: vp9_mbgraph.c:is_one_pass_svc Unexecuted instantiation: temporal_filter_sse4.c:is_one_pass_svc Unexecuted instantiation: highbd_temporal_filter_sse4.c:is_one_pass_svc vp9_cx_iface.c:is_one_pass_svc Line | Count | Source | 1136 | 53.0k | static INLINE int is_one_pass_svc(const struct VP9_COMP *const cpi) { | 1137 | 53.0k | return (cpi->use_svc && cpi->oxcf.pass == 0); | 1138 | 53.0k | } |
Unexecuted instantiation: vp9_bitstream.c:is_one_pass_svc Unexecuted instantiation: vp9_context_tree.c:is_one_pass_svc Unexecuted instantiation: vp9_encodeframe.c:is_one_pass_svc Unexecuted instantiation: vp9_encodemb.c:is_one_pass_svc Unexecuted instantiation: vp9_encodemv.c:is_one_pass_svc Unexecuted instantiation: vp9_ethread.c:is_one_pass_svc Unexecuted instantiation: vp9_firstpass.c:is_one_pass_svc Unexecuted instantiation: vp9_lookahead.c:is_one_pass_svc Unexecuted instantiation: vp9_multi_thread.c:is_one_pass_svc Unexecuted instantiation: vp9_mcomp.c:is_one_pass_svc Unexecuted instantiation: vp9_rdopt.c:is_one_pass_svc Unexecuted instantiation: vp9_pickmode.c:is_one_pass_svc |
1139 | | |
1140 | | #if CONFIG_VP9_TEMPORAL_DENOISING |
1141 | | static INLINE int denoise_svc(const struct VP9_COMP *const cpi) { |
1142 | | return (!cpi->use_svc || (cpi->use_svc && cpi->svc.spatial_layer_id >= |
1143 | | cpi->svc.first_layer_denoise)); |
1144 | | } |
1145 | | #endif |
1146 | | |
1147 | 372k | #define MIN_LOOKAHEAD_FOR_ARFS 4 |
1148 | 186k | static INLINE int is_altref_enabled(const VP9_COMP *const cpi) { |
1149 | 186k | return !(cpi->oxcf.mode == REALTIME && cpi->oxcf.rc_mode == VPX_CBR) && |
1150 | 186k | cpi->oxcf.lag_in_frames >= MIN_LOOKAHEAD_FOR_ARFS && |
1151 | 186k | cpi->oxcf.enable_auto_arf; |
1152 | 186k | } Unexecuted instantiation: vp9_frame_scale.c:is_altref_enabled vp9_encoder.c:is_altref_enabled Line | Count | Source | 1148 | 133k | static INLINE int is_altref_enabled(const VP9_COMP *const cpi) { | 1149 | 133k | return !(cpi->oxcf.mode == REALTIME && cpi->oxcf.rc_mode == VPX_CBR) && | 1150 | 133k | cpi->oxcf.lag_in_frames >= MIN_LOOKAHEAD_FOR_ARFS && | 1151 | 133k | cpi->oxcf.enable_auto_arf; | 1152 | 133k | } |
Unexecuted instantiation: vp9_picklpf.c:is_altref_enabled Unexecuted instantiation: vp9_quantize.c:is_altref_enabled vp9_ratectrl.c:is_altref_enabled Line | Count | Source | 1148 | 53.0k | static INLINE int is_altref_enabled(const VP9_COMP *const cpi) { | 1149 | 53.0k | return !(cpi->oxcf.mode == REALTIME && cpi->oxcf.rc_mode == VPX_CBR) && | 1150 | 53.0k | cpi->oxcf.lag_in_frames >= MIN_LOOKAHEAD_FOR_ARFS && | 1151 | 53.0k | cpi->oxcf.enable_auto_arf; | 1152 | 53.0k | } |
Unexecuted instantiation: vp9_rd.c:is_altref_enabled Unexecuted instantiation: vp9_segmentation.c:is_altref_enabled Unexecuted instantiation: vp9_speed_features.c:is_altref_enabled Unexecuted instantiation: vp9_svc_layercontext.c:is_altref_enabled Unexecuted instantiation: vp9_tokenize.c:is_altref_enabled Unexecuted instantiation: vp9_aq_variance.c:is_altref_enabled Unexecuted instantiation: vp9_aq_360.c:is_altref_enabled Unexecuted instantiation: vp9_aq_cyclicrefresh.c:is_altref_enabled Unexecuted instantiation: vp9_aq_complexity.c:is_altref_enabled Unexecuted instantiation: vp9_alt_ref_aq.c:is_altref_enabled Unexecuted instantiation: vp9_skin_detection.c:is_altref_enabled Unexecuted instantiation: vp9_noise_estimate.c:is_altref_enabled Unexecuted instantiation: vp9_ext_ratectrl.c:is_altref_enabled Unexecuted instantiation: vp9_temporal_filter.c:is_altref_enabled Unexecuted instantiation: vp9_tpl_model.c:is_altref_enabled Unexecuted instantiation: vp9_mbgraph.c:is_altref_enabled Unexecuted instantiation: temporal_filter_sse4.c:is_altref_enabled Unexecuted instantiation: highbd_temporal_filter_sse4.c:is_altref_enabled Unexecuted instantiation: vp9_cx_iface.c:is_altref_enabled Unexecuted instantiation: vp9_bitstream.c:is_altref_enabled Unexecuted instantiation: vp9_context_tree.c:is_altref_enabled Unexecuted instantiation: vp9_encodeframe.c:is_altref_enabled Unexecuted instantiation: vp9_encodemb.c:is_altref_enabled Unexecuted instantiation: vp9_encodemv.c:is_altref_enabled Unexecuted instantiation: vp9_ethread.c:is_altref_enabled Unexecuted instantiation: vp9_firstpass.c:is_altref_enabled Unexecuted instantiation: vp9_lookahead.c:is_altref_enabled Unexecuted instantiation: vp9_multi_thread.c:is_altref_enabled Unexecuted instantiation: vp9_mcomp.c:is_altref_enabled Unexecuted instantiation: vp9_rdopt.c:is_altref_enabled Unexecuted instantiation: vp9_pickmode.c:is_altref_enabled |
1153 | | |
1154 | | static INLINE void set_ref_ptrs(const VP9_COMMON *const cm, MACROBLOCKD *xd, |
1155 | | MV_REFERENCE_FRAME ref0, |
1156 | 59.3M | MV_REFERENCE_FRAME ref1) { |
1157 | 59.3M | xd->block_refs[0] = |
1158 | 59.3M | &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME : 0]; |
1159 | 59.3M | xd->block_refs[1] = |
1160 | 59.3M | &cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME : 0]; |
1161 | 59.3M | } Unexecuted instantiation: vp9_frame_scale.c:set_ref_ptrs vp9_encoder.c:set_ref_ptrs Line | Count | Source | 1156 | 53.1k | MV_REFERENCE_FRAME ref1) { | 1157 | 53.1k | xd->block_refs[0] = | 1158 | 53.1k | &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME : 0]; | 1159 | 53.1k | xd->block_refs[1] = | 1160 | 53.1k | &cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME : 0]; | 1161 | 53.1k | } |
Unexecuted instantiation: vp9_picklpf.c:set_ref_ptrs Unexecuted instantiation: vp9_quantize.c:set_ref_ptrs Unexecuted instantiation: vp9_ratectrl.c:set_ref_ptrs Unexecuted instantiation: vp9_rd.c:set_ref_ptrs Unexecuted instantiation: vp9_segmentation.c:set_ref_ptrs Unexecuted instantiation: vp9_speed_features.c:set_ref_ptrs Unexecuted instantiation: vp9_svc_layercontext.c:set_ref_ptrs Unexecuted instantiation: vp9_tokenize.c:set_ref_ptrs Unexecuted instantiation: vp9_aq_variance.c:set_ref_ptrs Unexecuted instantiation: vp9_aq_360.c:set_ref_ptrs Unexecuted instantiation: vp9_aq_cyclicrefresh.c:set_ref_ptrs Unexecuted instantiation: vp9_aq_complexity.c:set_ref_ptrs Unexecuted instantiation: vp9_alt_ref_aq.c:set_ref_ptrs Unexecuted instantiation: vp9_skin_detection.c:set_ref_ptrs Unexecuted instantiation: vp9_noise_estimate.c:set_ref_ptrs Unexecuted instantiation: vp9_ext_ratectrl.c:set_ref_ptrs Unexecuted instantiation: vp9_temporal_filter.c:set_ref_ptrs Unexecuted instantiation: vp9_tpl_model.c:set_ref_ptrs Unexecuted instantiation: vp9_mbgraph.c:set_ref_ptrs Unexecuted instantiation: temporal_filter_sse4.c:set_ref_ptrs Unexecuted instantiation: highbd_temporal_filter_sse4.c:set_ref_ptrs Unexecuted instantiation: vp9_cx_iface.c:set_ref_ptrs Unexecuted instantiation: vp9_bitstream.c:set_ref_ptrs Unexecuted instantiation: vp9_context_tree.c:set_ref_ptrs vp9_encodeframe.c:set_ref_ptrs Line | Count | Source | 1156 | 2.99M | MV_REFERENCE_FRAME ref1) { | 1157 | 2.99M | xd->block_refs[0] = | 1158 | 2.99M | &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME : 0]; | 1159 | 2.99M | xd->block_refs[1] = | 1160 | 2.99M | &cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME : 0]; | 1161 | 2.99M | } |
Unexecuted instantiation: vp9_encodemb.c:set_ref_ptrs Unexecuted instantiation: vp9_encodemv.c:set_ref_ptrs Unexecuted instantiation: vp9_ethread.c:set_ref_ptrs Unexecuted instantiation: vp9_firstpass.c:set_ref_ptrs Unexecuted instantiation: vp9_lookahead.c:set_ref_ptrs Unexecuted instantiation: vp9_multi_thread.c:set_ref_ptrs Unexecuted instantiation: vp9_mcomp.c:set_ref_ptrs Line | Count | Source | 1156 | 56.2M | MV_REFERENCE_FRAME ref1) { | 1157 | 56.2M | xd->block_refs[0] = | 1158 | 56.2M | &cm->frame_refs[ref0 >= LAST_FRAME ? ref0 - LAST_FRAME : 0]; | 1159 | 56.2M | xd->block_refs[1] = | 1160 | 56.2M | &cm->frame_refs[ref1 >= LAST_FRAME ? ref1 - LAST_FRAME : 0]; | 1161 | 56.2M | } |
Unexecuted instantiation: vp9_pickmode.c:set_ref_ptrs |
1162 | | |
1163 | 21.8M | static INLINE int get_chessboard_index(const int frame_index) { |
1164 | 21.8M | return frame_index & 0x1; |
1165 | 21.8M | } Unexecuted instantiation: vp9_frame_scale.c:get_chessboard_index Unexecuted instantiation: vp9_encoder.c:get_chessboard_index Unexecuted instantiation: vp9_picklpf.c:get_chessboard_index Unexecuted instantiation: vp9_quantize.c:get_chessboard_index Unexecuted instantiation: vp9_ratectrl.c:get_chessboard_index Unexecuted instantiation: vp9_rd.c:get_chessboard_index Unexecuted instantiation: vp9_segmentation.c:get_chessboard_index Unexecuted instantiation: vp9_speed_features.c:get_chessboard_index Unexecuted instantiation: vp9_svc_layercontext.c:get_chessboard_index Unexecuted instantiation: vp9_tokenize.c:get_chessboard_index Unexecuted instantiation: vp9_aq_variance.c:get_chessboard_index Unexecuted instantiation: vp9_aq_360.c:get_chessboard_index Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_chessboard_index Unexecuted instantiation: vp9_aq_complexity.c:get_chessboard_index Unexecuted instantiation: vp9_alt_ref_aq.c:get_chessboard_index Unexecuted instantiation: vp9_skin_detection.c:get_chessboard_index Unexecuted instantiation: vp9_noise_estimate.c:get_chessboard_index Unexecuted instantiation: vp9_ext_ratectrl.c:get_chessboard_index Unexecuted instantiation: vp9_temporal_filter.c:get_chessboard_index Unexecuted instantiation: vp9_tpl_model.c:get_chessboard_index Unexecuted instantiation: vp9_mbgraph.c:get_chessboard_index Unexecuted instantiation: temporal_filter_sse4.c:get_chessboard_index Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_chessboard_index Unexecuted instantiation: vp9_cx_iface.c:get_chessboard_index Unexecuted instantiation: vp9_bitstream.c:get_chessboard_index Unexecuted instantiation: vp9_context_tree.c:get_chessboard_index Unexecuted instantiation: vp9_encodeframe.c:get_chessboard_index Unexecuted instantiation: vp9_encodemb.c:get_chessboard_index Unexecuted instantiation: vp9_encodemv.c:get_chessboard_index Unexecuted instantiation: vp9_ethread.c:get_chessboard_index Unexecuted instantiation: vp9_firstpass.c:get_chessboard_index Unexecuted instantiation: vp9_lookahead.c:get_chessboard_index Unexecuted instantiation: vp9_multi_thread.c:get_chessboard_index Unexecuted instantiation: vp9_mcomp.c:get_chessboard_index vp9_rdopt.c:get_chessboard_index Line | Count | Source | 1163 | 21.8M | static INLINE int get_chessboard_index(const int frame_index) { | 1164 | 21.8M | return frame_index & 0x1; | 1165 | 21.8M | } |
Unexecuted instantiation: vp9_pickmode.c:get_chessboard_index |
1166 | | |
1167 | 34.7M | static INLINE int *cond_cost_list(const struct VP9_COMP *cpi, int *cost_list) { |
1168 | 34.7M | return cpi->sf.mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL; |
1169 | 34.7M | } Unexecuted instantiation: vp9_frame_scale.c:cond_cost_list Unexecuted instantiation: vp9_encoder.c:cond_cost_list Unexecuted instantiation: vp9_picklpf.c:cond_cost_list Unexecuted instantiation: vp9_quantize.c:cond_cost_list Unexecuted instantiation: vp9_ratectrl.c:cond_cost_list Unexecuted instantiation: vp9_rd.c:cond_cost_list Unexecuted instantiation: vp9_segmentation.c:cond_cost_list Unexecuted instantiation: vp9_speed_features.c:cond_cost_list Unexecuted instantiation: vp9_svc_layercontext.c:cond_cost_list Unexecuted instantiation: vp9_tokenize.c:cond_cost_list Unexecuted instantiation: vp9_aq_variance.c:cond_cost_list Unexecuted instantiation: vp9_aq_360.c:cond_cost_list Unexecuted instantiation: vp9_aq_cyclicrefresh.c:cond_cost_list Unexecuted instantiation: vp9_aq_complexity.c:cond_cost_list Unexecuted instantiation: vp9_alt_ref_aq.c:cond_cost_list Unexecuted instantiation: vp9_skin_detection.c:cond_cost_list Unexecuted instantiation: vp9_noise_estimate.c:cond_cost_list Unexecuted instantiation: vp9_ext_ratectrl.c:cond_cost_list Unexecuted instantiation: vp9_temporal_filter.c:cond_cost_list Unexecuted instantiation: vp9_tpl_model.c:cond_cost_list Unexecuted instantiation: vp9_mbgraph.c:cond_cost_list Unexecuted instantiation: temporal_filter_sse4.c:cond_cost_list Unexecuted instantiation: highbd_temporal_filter_sse4.c:cond_cost_list Unexecuted instantiation: vp9_cx_iface.c:cond_cost_list Unexecuted instantiation: vp9_bitstream.c:cond_cost_list Unexecuted instantiation: vp9_context_tree.c:cond_cost_list vp9_encodeframe.c:cond_cost_list Line | Count | Source | 1167 | 919k | static INLINE int *cond_cost_list(const struct VP9_COMP *cpi, int *cost_list) { | 1168 | 919k | return cpi->sf.mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL; | 1169 | 919k | } |
Unexecuted instantiation: vp9_encodemb.c:cond_cost_list Unexecuted instantiation: vp9_encodemv.c:cond_cost_list Unexecuted instantiation: vp9_ethread.c:cond_cost_list Unexecuted instantiation: vp9_firstpass.c:cond_cost_list Unexecuted instantiation: vp9_lookahead.c:cond_cost_list Unexecuted instantiation: vp9_multi_thread.c:cond_cost_list Unexecuted instantiation: vp9_mcomp.c:cond_cost_list vp9_rdopt.c:cond_cost_list Line | Count | Source | 1167 | 33.8M | static INLINE int *cond_cost_list(const struct VP9_COMP *cpi, int *cost_list) { | 1168 | 33.8M | return cpi->sf.mv.subpel_search_method != SUBPEL_TREE ? cost_list : NULL; | 1169 | 33.8M | } |
Unexecuted instantiation: vp9_pickmode.c:cond_cost_list |
1170 | | |
1171 | 57.7k | static INLINE int get_num_vert_units(TileInfo tile, int shift) { |
1172 | 57.7k | int num_vert_units = |
1173 | 57.7k | (tile.mi_row_end - tile.mi_row_start + (1 << shift) - 1) >> shift; |
1174 | 57.7k | return num_vert_units; |
1175 | 57.7k | } Unexecuted instantiation: vp9_frame_scale.c:get_num_vert_units Unexecuted instantiation: vp9_encoder.c:get_num_vert_units Unexecuted instantiation: vp9_picklpf.c:get_num_vert_units Unexecuted instantiation: vp9_quantize.c:get_num_vert_units Unexecuted instantiation: vp9_ratectrl.c:get_num_vert_units Unexecuted instantiation: vp9_rd.c:get_num_vert_units Unexecuted instantiation: vp9_segmentation.c:get_num_vert_units Unexecuted instantiation: vp9_speed_features.c:get_num_vert_units Unexecuted instantiation: vp9_svc_layercontext.c:get_num_vert_units Unexecuted instantiation: vp9_tokenize.c:get_num_vert_units Unexecuted instantiation: vp9_aq_variance.c:get_num_vert_units Unexecuted instantiation: vp9_aq_360.c:get_num_vert_units Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_num_vert_units Unexecuted instantiation: vp9_aq_complexity.c:get_num_vert_units Unexecuted instantiation: vp9_alt_ref_aq.c:get_num_vert_units Unexecuted instantiation: vp9_skin_detection.c:get_num_vert_units Unexecuted instantiation: vp9_noise_estimate.c:get_num_vert_units Unexecuted instantiation: vp9_ext_ratectrl.c:get_num_vert_units Unexecuted instantiation: vp9_temporal_filter.c:get_num_vert_units Unexecuted instantiation: vp9_tpl_model.c:get_num_vert_units Unexecuted instantiation: vp9_mbgraph.c:get_num_vert_units Unexecuted instantiation: temporal_filter_sse4.c:get_num_vert_units Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_num_vert_units Unexecuted instantiation: vp9_cx_iface.c:get_num_vert_units Unexecuted instantiation: vp9_bitstream.c:get_num_vert_units Unexecuted instantiation: vp9_context_tree.c:get_num_vert_units vp9_encodeframe.c:get_num_vert_units Line | Count | Source | 1171 | 57.7k | static INLINE int get_num_vert_units(TileInfo tile, int shift) { | 1172 | 57.7k | int num_vert_units = | 1173 | 57.7k | (tile.mi_row_end - tile.mi_row_start + (1 << shift) - 1) >> shift; | 1174 | 57.7k | return num_vert_units; | 1175 | 57.7k | } |
Unexecuted instantiation: vp9_encodemb.c:get_num_vert_units Unexecuted instantiation: vp9_encodemv.c:get_num_vert_units Unexecuted instantiation: vp9_ethread.c:get_num_vert_units Unexecuted instantiation: vp9_firstpass.c:get_num_vert_units Unexecuted instantiation: vp9_lookahead.c:get_num_vert_units Unexecuted instantiation: vp9_multi_thread.c:get_num_vert_units Unexecuted instantiation: vp9_mcomp.c:get_num_vert_units Unexecuted instantiation: vp9_rdopt.c:get_num_vert_units Unexecuted instantiation: vp9_pickmode.c:get_num_vert_units |
1176 | | |
1177 | 74.2k | static INLINE int get_num_cols(TileInfo tile, int shift) { |
1178 | 74.2k | int num_cols = |
1179 | 74.2k | (tile.mi_col_end - tile.mi_col_start + (1 << shift) - 1) >> shift; |
1180 | 74.2k | return num_cols; |
1181 | 74.2k | } Unexecuted instantiation: vp9_frame_scale.c:get_num_cols Unexecuted instantiation: vp9_encoder.c:get_num_cols Unexecuted instantiation: vp9_picklpf.c:get_num_cols Unexecuted instantiation: vp9_quantize.c:get_num_cols Unexecuted instantiation: vp9_ratectrl.c:get_num_cols Unexecuted instantiation: vp9_rd.c:get_num_cols Unexecuted instantiation: vp9_segmentation.c:get_num_cols Unexecuted instantiation: vp9_speed_features.c:get_num_cols Unexecuted instantiation: vp9_svc_layercontext.c:get_num_cols Unexecuted instantiation: vp9_tokenize.c:get_num_cols Unexecuted instantiation: vp9_aq_variance.c:get_num_cols Unexecuted instantiation: vp9_aq_360.c:get_num_cols Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_num_cols Unexecuted instantiation: vp9_aq_complexity.c:get_num_cols Unexecuted instantiation: vp9_alt_ref_aq.c:get_num_cols Unexecuted instantiation: vp9_skin_detection.c:get_num_cols Unexecuted instantiation: vp9_noise_estimate.c:get_num_cols Unexecuted instantiation: vp9_ext_ratectrl.c:get_num_cols Unexecuted instantiation: vp9_temporal_filter.c:get_num_cols Unexecuted instantiation: vp9_tpl_model.c:get_num_cols Unexecuted instantiation: vp9_mbgraph.c:get_num_cols Unexecuted instantiation: temporal_filter_sse4.c:get_num_cols Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_num_cols Unexecuted instantiation: vp9_cx_iface.c:get_num_cols Unexecuted instantiation: vp9_bitstream.c:get_num_cols Unexecuted instantiation: vp9_context_tree.c:get_num_cols vp9_encodeframe.c:get_num_cols Line | Count | Source | 1177 | 74.2k | static INLINE int get_num_cols(TileInfo tile, int shift) { | 1178 | 74.2k | int num_cols = | 1179 | 74.2k | (tile.mi_col_end - tile.mi_col_start + (1 << shift) - 1) >> shift; | 1180 | 74.2k | return num_cols; | 1181 | 74.2k | } |
Unexecuted instantiation: vp9_encodemb.c:get_num_cols Unexecuted instantiation: vp9_encodemv.c:get_num_cols Unexecuted instantiation: vp9_ethread.c:get_num_cols Unexecuted instantiation: vp9_firstpass.c:get_num_cols Unexecuted instantiation: vp9_lookahead.c:get_num_cols Unexecuted instantiation: vp9_multi_thread.c:get_num_cols Unexecuted instantiation: vp9_mcomp.c:get_num_cols Unexecuted instantiation: vp9_rdopt.c:get_num_cols Unexecuted instantiation: vp9_pickmode.c:get_num_cols |
1182 | | |
1183 | 70.6k | static INLINE int get_level_index(VP9_LEVEL level) { |
1184 | 70.6k | int i; |
1185 | 1.06M | for (i = 0; i < VP9_LEVELS; ++i) { |
1186 | 989k | if (level == vp9_level_defs[i].level) return i; |
1187 | 989k | } |
1188 | 70.6k | return -1; |
1189 | 70.6k | } Unexecuted instantiation: vp9_frame_scale.c:get_level_index vp9_encoder.c:get_level_index Line | Count | Source | 1183 | 38.5k | static INLINE int get_level_index(VP9_LEVEL level) { | 1184 | 38.5k | int i; | 1185 | 577k | for (i = 0; i < VP9_LEVELS; ++i) { | 1186 | 539k | if (level == vp9_level_defs[i].level) return i; | 1187 | 539k | } | 1188 | 38.5k | return -1; | 1189 | 38.5k | } |
Unexecuted instantiation: vp9_picklpf.c:get_level_index Unexecuted instantiation: vp9_quantize.c:get_level_index Unexecuted instantiation: vp9_ratectrl.c:get_level_index Unexecuted instantiation: vp9_rd.c:get_level_index Unexecuted instantiation: vp9_segmentation.c:get_level_index Unexecuted instantiation: vp9_speed_features.c:get_level_index Unexecuted instantiation: vp9_svc_layercontext.c:get_level_index Unexecuted instantiation: vp9_tokenize.c:get_level_index Unexecuted instantiation: vp9_aq_variance.c:get_level_index Unexecuted instantiation: vp9_aq_360.c:get_level_index Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_level_index Unexecuted instantiation: vp9_aq_complexity.c:get_level_index Unexecuted instantiation: vp9_alt_ref_aq.c:get_level_index Unexecuted instantiation: vp9_skin_detection.c:get_level_index Unexecuted instantiation: vp9_noise_estimate.c:get_level_index Unexecuted instantiation: vp9_ext_ratectrl.c:get_level_index Unexecuted instantiation: vp9_temporal_filter.c:get_level_index Unexecuted instantiation: vp9_tpl_model.c:get_level_index Unexecuted instantiation: vp9_mbgraph.c:get_level_index Unexecuted instantiation: temporal_filter_sse4.c:get_level_index Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_level_index vp9_cx_iface.c:get_level_index Line | Count | Source | 1183 | 32.1k | static INLINE int get_level_index(VP9_LEVEL level) { | 1184 | 32.1k | int i; | 1185 | 482k | for (i = 0; i < VP9_LEVELS; ++i) { | 1186 | 450k | if (level == vp9_level_defs[i].level) return i; | 1187 | 450k | } | 1188 | 32.1k | return -1; | 1189 | 32.1k | } |
Unexecuted instantiation: vp9_bitstream.c:get_level_index Unexecuted instantiation: vp9_context_tree.c:get_level_index Unexecuted instantiation: vp9_encodeframe.c:get_level_index Unexecuted instantiation: vp9_encodemb.c:get_level_index Unexecuted instantiation: vp9_encodemv.c:get_level_index Unexecuted instantiation: vp9_ethread.c:get_level_index Unexecuted instantiation: vp9_firstpass.c:get_level_index Unexecuted instantiation: vp9_lookahead.c:get_level_index Unexecuted instantiation: vp9_multi_thread.c:get_level_index Unexecuted instantiation: vp9_mcomp.c:get_level_index Unexecuted instantiation: vp9_rdopt.c:get_level_index Unexecuted instantiation: vp9_pickmode.c:get_level_index |
1190 | | |
1191 | | // Return the log2 value of max column tiles corresponding to the level that |
1192 | | // the picture size fits into. |
1193 | | static INLINE int log_tile_cols_from_picsize_level(uint32_t width, |
1194 | 0 | uint32_t height) { |
1195 | 0 | int i; |
1196 | 0 | const uint32_t pic_size = width * height; |
1197 | 0 | const uint32_t pic_breadth = VPXMAX(width, height); |
1198 | 0 | for (i = LEVEL_1; i < LEVEL_MAX; ++i) { |
1199 | 0 | if (vp9_level_defs[i].max_luma_picture_size >= pic_size && |
1200 | 0 | vp9_level_defs[i].max_luma_picture_breadth >= pic_breadth) { |
1201 | 0 | return get_msb(vp9_level_defs[i].max_col_tiles); |
1202 | 0 | } |
1203 | 0 | } |
1204 | 0 | return INT_MAX; |
1205 | 0 | } Unexecuted instantiation: vp9_frame_scale.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_encoder.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_picklpf.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_quantize.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_ratectrl.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_rd.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_segmentation.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_speed_features.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_svc_layercontext.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_tokenize.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_aq_variance.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_aq_360.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_aq_cyclicrefresh.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_aq_complexity.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_alt_ref_aq.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_skin_detection.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_noise_estimate.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_ext_ratectrl.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_temporal_filter.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_tpl_model.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_mbgraph.c:log_tile_cols_from_picsize_level Unexecuted instantiation: temporal_filter_sse4.c:log_tile_cols_from_picsize_level Unexecuted instantiation: highbd_temporal_filter_sse4.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_cx_iface.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_bitstream.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_context_tree.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_encodeframe.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_encodemb.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_encodemv.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_ethread.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_firstpass.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_lookahead.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_multi_thread.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_mcomp.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_rdopt.c:log_tile_cols_from_picsize_level Unexecuted instantiation: vp9_pickmode.c:log_tile_cols_from_picsize_level |
1206 | | |
1207 | | VP9_LEVEL vp9_get_level(const Vp9LevelSpec *const level_spec); |
1208 | | |
1209 | | vpx_codec_err_t vp9_set_roi_map(VP9_COMP *cpi, unsigned char *map, |
1210 | | unsigned int rows, unsigned int cols, |
1211 | | int delta_q[8], int delta_lf[8], int skip[8], |
1212 | | int ref_frame[8]); |
1213 | | |
1214 | | void vp9_new_framerate(VP9_COMP *cpi, double framerate); |
1215 | | |
1216 | | void vp9_set_row_mt(VP9_COMP *cpi); |
1217 | | |
1218 | | int vp9_get_psnr(const VP9_COMP *cpi, PSNR_STATS *psnr); |
1219 | | |
1220 | 3.99k | #define LAYER_IDS_TO_IDX(sl, tl, num_tl) ((sl) * (num_tl) + (tl)) |
1221 | | |
1222 | 53.1k | static INLINE void alloc_frame_mvs(VP9_COMMON *const cm, int buffer_idx) { |
1223 | 53.1k | RefCntBuffer *const new_fb_ptr = &cm->buffer_pool->frame_bufs[buffer_idx]; |
1224 | 53.1k | if (new_fb_ptr->mvs == NULL || new_fb_ptr->mi_rows < cm->mi_rows || |
1225 | 53.1k | new_fb_ptr->mi_cols < cm->mi_cols) { |
1226 | 8.80k | vpx_free(new_fb_ptr->mvs); |
1227 | 8.80k | CHECK_MEM_ERROR(&cm->error, new_fb_ptr->mvs, |
1228 | 8.80k | (MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols, |
1229 | 8.80k | sizeof(*new_fb_ptr->mvs))); |
1230 | 8.80k | new_fb_ptr->mi_rows = cm->mi_rows; |
1231 | 8.80k | new_fb_ptr->mi_cols = cm->mi_cols; |
1232 | 8.80k | } |
1233 | 53.1k | } Unexecuted instantiation: vp9_frame_scale.c:alloc_frame_mvs vp9_encoder.c:alloc_frame_mvs Line | Count | Source | 1222 | 53.1k | static INLINE void alloc_frame_mvs(VP9_COMMON *const cm, int buffer_idx) { | 1223 | 53.1k | RefCntBuffer *const new_fb_ptr = &cm->buffer_pool->frame_bufs[buffer_idx]; | 1224 | 53.1k | if (new_fb_ptr->mvs == NULL || new_fb_ptr->mi_rows < cm->mi_rows || | 1225 | 53.1k | new_fb_ptr->mi_cols < cm->mi_cols) { | 1226 | 8.80k | vpx_free(new_fb_ptr->mvs); | 1227 | 8.80k | CHECK_MEM_ERROR(&cm->error, new_fb_ptr->mvs, | 1228 | 8.80k | (MV_REF *)vpx_calloc(cm->mi_rows * cm->mi_cols, | 1229 | 8.80k | sizeof(*new_fb_ptr->mvs))); | 1230 | 8.80k | new_fb_ptr->mi_rows = cm->mi_rows; | 1231 | 8.80k | new_fb_ptr->mi_cols = cm->mi_cols; | 1232 | 8.80k | } | 1233 | 53.1k | } |
Unexecuted instantiation: vp9_picklpf.c:alloc_frame_mvs Unexecuted instantiation: vp9_quantize.c:alloc_frame_mvs Unexecuted instantiation: vp9_ratectrl.c:alloc_frame_mvs Unexecuted instantiation: vp9_rd.c:alloc_frame_mvs Unexecuted instantiation: vp9_segmentation.c:alloc_frame_mvs Unexecuted instantiation: vp9_speed_features.c:alloc_frame_mvs Unexecuted instantiation: vp9_svc_layercontext.c:alloc_frame_mvs Unexecuted instantiation: vp9_tokenize.c:alloc_frame_mvs Unexecuted instantiation: vp9_aq_variance.c:alloc_frame_mvs Unexecuted instantiation: vp9_aq_360.c:alloc_frame_mvs Unexecuted instantiation: vp9_aq_cyclicrefresh.c:alloc_frame_mvs Unexecuted instantiation: vp9_aq_complexity.c:alloc_frame_mvs Unexecuted instantiation: vp9_alt_ref_aq.c:alloc_frame_mvs Unexecuted instantiation: vp9_skin_detection.c:alloc_frame_mvs Unexecuted instantiation: vp9_noise_estimate.c:alloc_frame_mvs Unexecuted instantiation: vp9_ext_ratectrl.c:alloc_frame_mvs Unexecuted instantiation: vp9_temporal_filter.c:alloc_frame_mvs Unexecuted instantiation: vp9_tpl_model.c:alloc_frame_mvs Unexecuted instantiation: vp9_mbgraph.c:alloc_frame_mvs Unexecuted instantiation: temporal_filter_sse4.c:alloc_frame_mvs Unexecuted instantiation: highbd_temporal_filter_sse4.c:alloc_frame_mvs Unexecuted instantiation: vp9_cx_iface.c:alloc_frame_mvs Unexecuted instantiation: vp9_bitstream.c:alloc_frame_mvs Unexecuted instantiation: vp9_context_tree.c:alloc_frame_mvs Unexecuted instantiation: vp9_encodeframe.c:alloc_frame_mvs Unexecuted instantiation: vp9_encodemb.c:alloc_frame_mvs Unexecuted instantiation: vp9_encodemv.c:alloc_frame_mvs Unexecuted instantiation: vp9_ethread.c:alloc_frame_mvs Unexecuted instantiation: vp9_firstpass.c:alloc_frame_mvs Unexecuted instantiation: vp9_lookahead.c:alloc_frame_mvs Unexecuted instantiation: vp9_multi_thread.c:alloc_frame_mvs Unexecuted instantiation: vp9_mcomp.c:alloc_frame_mvs Unexecuted instantiation: vp9_rdopt.c:alloc_frame_mvs Unexecuted instantiation: vp9_pickmode.c:alloc_frame_mvs |
1234 | | |
1235 | | static INLINE int mv_cost(const MV *mv, const int *joint_cost, |
1236 | 1.07G | int *const comp_cost[2]) { |
1237 | 1.07G | assert(mv->row >= -MV_MAX && mv->row < MV_MAX); |
1238 | 1.07G | assert(mv->col >= -MV_MAX && mv->col < MV_MAX); |
1239 | 1.07G | return joint_cost[vp9_get_mv_joint(mv)] + comp_cost[0][mv->row] + |
1240 | 1.07G | comp_cost[1][mv->col]; |
1241 | 1.07G | } Unexecuted instantiation: vp9_frame_scale.c:mv_cost Unexecuted instantiation: vp9_encoder.c:mv_cost Unexecuted instantiation: vp9_picklpf.c:mv_cost Unexecuted instantiation: vp9_quantize.c:mv_cost Unexecuted instantiation: vp9_ratectrl.c:mv_cost Unexecuted instantiation: vp9_rd.c:mv_cost Unexecuted instantiation: vp9_segmentation.c:mv_cost Unexecuted instantiation: vp9_speed_features.c:mv_cost Unexecuted instantiation: vp9_svc_layercontext.c:mv_cost Unexecuted instantiation: vp9_tokenize.c:mv_cost Unexecuted instantiation: vp9_aq_variance.c:mv_cost Unexecuted instantiation: vp9_aq_360.c:mv_cost Unexecuted instantiation: vp9_aq_cyclicrefresh.c:mv_cost Unexecuted instantiation: vp9_aq_complexity.c:mv_cost Unexecuted instantiation: vp9_alt_ref_aq.c:mv_cost Unexecuted instantiation: vp9_skin_detection.c:mv_cost Unexecuted instantiation: vp9_noise_estimate.c:mv_cost Unexecuted instantiation: vp9_ext_ratectrl.c:mv_cost Unexecuted instantiation: vp9_temporal_filter.c:mv_cost Unexecuted instantiation: vp9_tpl_model.c:mv_cost Unexecuted instantiation: vp9_mbgraph.c:mv_cost Unexecuted instantiation: temporal_filter_sse4.c:mv_cost Unexecuted instantiation: highbd_temporal_filter_sse4.c:mv_cost Unexecuted instantiation: vp9_cx_iface.c:mv_cost Unexecuted instantiation: vp9_bitstream.c:mv_cost Unexecuted instantiation: vp9_context_tree.c:mv_cost Unexecuted instantiation: vp9_encodeframe.c:mv_cost Unexecuted instantiation: vp9_encodemb.c:mv_cost Unexecuted instantiation: vp9_encodemv.c:mv_cost Unexecuted instantiation: vp9_ethread.c:mv_cost Unexecuted instantiation: vp9_firstpass.c:mv_cost Unexecuted instantiation: vp9_lookahead.c:mv_cost Unexecuted instantiation: vp9_multi_thread.c:mv_cost Line | Count | Source | 1236 | 1.07G | int *const comp_cost[2]) { | 1237 | 1.07G | assert(mv->row >= -MV_MAX && mv->row < MV_MAX); | 1238 | 1.07G | assert(mv->col >= -MV_MAX && mv->col < MV_MAX); | 1239 | 1.07G | return joint_cost[vp9_get_mv_joint(mv)] + comp_cost[0][mv->row] + | 1240 | 1.07G | comp_cost[1][mv->col]; | 1241 | 1.07G | } |
Unexecuted instantiation: vp9_rdopt.c:mv_cost Unexecuted instantiation: vp9_pickmode.c:mv_cost |
1242 | | |
1243 | | static INLINE int mvsad_err_cost(const MACROBLOCK *x, const MV *mv, |
1244 | 626M | const MV *ref, int sad_per_bit) { |
1245 | 626M | MV diff; |
1246 | 626M | diff.row = mv->row - ref->row; |
1247 | 626M | diff.col = mv->col - ref->col; |
1248 | 626M | return ROUND_POWER_OF_TWO( |
1249 | 626M | (unsigned)mv_cost(&diff, x->nmvjointsadcost, x->nmvsadcost) * sad_per_bit, |
1250 | 626M | VP9_PROB_COST_SHIFT); |
1251 | 626M | } Unexecuted instantiation: vp9_frame_scale.c:mvsad_err_cost Unexecuted instantiation: vp9_encoder.c:mvsad_err_cost Unexecuted instantiation: vp9_picklpf.c:mvsad_err_cost Unexecuted instantiation: vp9_quantize.c:mvsad_err_cost Unexecuted instantiation: vp9_ratectrl.c:mvsad_err_cost Unexecuted instantiation: vp9_rd.c:mvsad_err_cost Unexecuted instantiation: vp9_segmentation.c:mvsad_err_cost Unexecuted instantiation: vp9_speed_features.c:mvsad_err_cost Unexecuted instantiation: vp9_svc_layercontext.c:mvsad_err_cost Unexecuted instantiation: vp9_tokenize.c:mvsad_err_cost Unexecuted instantiation: vp9_aq_variance.c:mvsad_err_cost Unexecuted instantiation: vp9_aq_360.c:mvsad_err_cost Unexecuted instantiation: vp9_aq_cyclicrefresh.c:mvsad_err_cost Unexecuted instantiation: vp9_aq_complexity.c:mvsad_err_cost Unexecuted instantiation: vp9_alt_ref_aq.c:mvsad_err_cost Unexecuted instantiation: vp9_skin_detection.c:mvsad_err_cost Unexecuted instantiation: vp9_noise_estimate.c:mvsad_err_cost Unexecuted instantiation: vp9_ext_ratectrl.c:mvsad_err_cost Unexecuted instantiation: vp9_temporal_filter.c:mvsad_err_cost Unexecuted instantiation: vp9_tpl_model.c:mvsad_err_cost Unexecuted instantiation: vp9_mbgraph.c:mvsad_err_cost Unexecuted instantiation: temporal_filter_sse4.c:mvsad_err_cost Unexecuted instantiation: highbd_temporal_filter_sse4.c:mvsad_err_cost Unexecuted instantiation: vp9_cx_iface.c:mvsad_err_cost Unexecuted instantiation: vp9_bitstream.c:mvsad_err_cost Unexecuted instantiation: vp9_context_tree.c:mvsad_err_cost Unexecuted instantiation: vp9_encodeframe.c:mvsad_err_cost Unexecuted instantiation: vp9_encodemb.c:mvsad_err_cost Unexecuted instantiation: vp9_encodemv.c:mvsad_err_cost Unexecuted instantiation: vp9_ethread.c:mvsad_err_cost Unexecuted instantiation: vp9_firstpass.c:mvsad_err_cost Unexecuted instantiation: vp9_lookahead.c:mvsad_err_cost Unexecuted instantiation: vp9_multi_thread.c:mvsad_err_cost vp9_mcomp.c:mvsad_err_cost Line | Count | Source | 1244 | 626M | const MV *ref, int sad_per_bit) { | 1245 | 626M | MV diff; | 1246 | 626M | diff.row = mv->row - ref->row; | 1247 | 626M | diff.col = mv->col - ref->col; | 1248 | 626M | return ROUND_POWER_OF_TWO( | 1249 | 626M | (unsigned)mv_cost(&diff, x->nmvjointsadcost, x->nmvsadcost) * sad_per_bit, | 1250 | 626M | VP9_PROB_COST_SHIFT); | 1251 | 626M | } |
Unexecuted instantiation: vp9_rdopt.c:mvsad_err_cost Unexecuted instantiation: vp9_pickmode.c:mvsad_err_cost |
1252 | | |
1253 | | static INLINE uint32_t get_start_mv_sad(const MACROBLOCK *x, const MV *mvp_full, |
1254 | | const MV *ref_mv_full, |
1255 | 0 | vpx_sad_fn_t sad_fn_ptr, int sadpb) { |
1256 | 0 | const int src_buf_stride = x->plane[0].src.stride; |
1257 | 0 | const uint8_t *const src_buf = x->plane[0].src.buf; |
1258 | 0 | const MACROBLOCKD *const xd = &x->e_mbd; |
1259 | 0 | const int pred_buf_stride = xd->plane[0].pre[0].stride; |
1260 | 0 | const uint8_t *const pred_buf = |
1261 | 0 | xd->plane[0].pre[0].buf + mvp_full->row * pred_buf_stride + mvp_full->col; |
1262 | 0 | uint32_t start_mv_sad = |
1263 | 0 | sad_fn_ptr(src_buf, src_buf_stride, pred_buf, pred_buf_stride); |
1264 | 0 | start_mv_sad += mvsad_err_cost(x, mvp_full, ref_mv_full, sadpb); |
1265 | |
|
1266 | 0 | return start_mv_sad; |
1267 | 0 | } Unexecuted instantiation: vp9_frame_scale.c:get_start_mv_sad Unexecuted instantiation: vp9_encoder.c:get_start_mv_sad Unexecuted instantiation: vp9_picklpf.c:get_start_mv_sad Unexecuted instantiation: vp9_quantize.c:get_start_mv_sad Unexecuted instantiation: vp9_ratectrl.c:get_start_mv_sad Unexecuted instantiation: vp9_rd.c:get_start_mv_sad Unexecuted instantiation: vp9_segmentation.c:get_start_mv_sad Unexecuted instantiation: vp9_speed_features.c:get_start_mv_sad Unexecuted instantiation: vp9_svc_layercontext.c:get_start_mv_sad Unexecuted instantiation: vp9_tokenize.c:get_start_mv_sad Unexecuted instantiation: vp9_aq_variance.c:get_start_mv_sad Unexecuted instantiation: vp9_aq_360.c:get_start_mv_sad Unexecuted instantiation: vp9_aq_cyclicrefresh.c:get_start_mv_sad Unexecuted instantiation: vp9_aq_complexity.c:get_start_mv_sad Unexecuted instantiation: vp9_alt_ref_aq.c:get_start_mv_sad Unexecuted instantiation: vp9_skin_detection.c:get_start_mv_sad Unexecuted instantiation: vp9_noise_estimate.c:get_start_mv_sad Unexecuted instantiation: vp9_ext_ratectrl.c:get_start_mv_sad Unexecuted instantiation: vp9_temporal_filter.c:get_start_mv_sad Unexecuted instantiation: vp9_tpl_model.c:get_start_mv_sad Unexecuted instantiation: vp9_mbgraph.c:get_start_mv_sad Unexecuted instantiation: temporal_filter_sse4.c:get_start_mv_sad Unexecuted instantiation: highbd_temporal_filter_sse4.c:get_start_mv_sad Unexecuted instantiation: vp9_cx_iface.c:get_start_mv_sad Unexecuted instantiation: vp9_bitstream.c:get_start_mv_sad Unexecuted instantiation: vp9_context_tree.c:get_start_mv_sad Unexecuted instantiation: vp9_encodeframe.c:get_start_mv_sad Unexecuted instantiation: vp9_encodemb.c:get_start_mv_sad Unexecuted instantiation: vp9_encodemv.c:get_start_mv_sad Unexecuted instantiation: vp9_ethread.c:get_start_mv_sad Unexecuted instantiation: vp9_firstpass.c:get_start_mv_sad Unexecuted instantiation: vp9_lookahead.c:get_start_mv_sad Unexecuted instantiation: vp9_multi_thread.c:get_start_mv_sad Unexecuted instantiation: vp9_mcomp.c:get_start_mv_sad Unexecuted instantiation: vp9_rdopt.c:get_start_mv_sad Unexecuted instantiation: vp9_pickmode.c:get_start_mv_sad |
1268 | | |
1269 | | static INLINE int num_4x4_to_edge(int plane_4x4_dim, int mb_to_edge_dim, |
1270 | 356M | int subsampling_dim, int blk_dim) { |
1271 | 356M | return plane_4x4_dim + (mb_to_edge_dim >> (5 + subsampling_dim)) - blk_dim; |
1272 | 356M | } Unexecuted instantiation: vp9_frame_scale.c:num_4x4_to_edge Unexecuted instantiation: vp9_encoder.c:num_4x4_to_edge Unexecuted instantiation: vp9_picklpf.c:num_4x4_to_edge Unexecuted instantiation: vp9_quantize.c:num_4x4_to_edge Unexecuted instantiation: vp9_ratectrl.c:num_4x4_to_edge Unexecuted instantiation: vp9_rd.c:num_4x4_to_edge Unexecuted instantiation: vp9_segmentation.c:num_4x4_to_edge Unexecuted instantiation: vp9_speed_features.c:num_4x4_to_edge Unexecuted instantiation: vp9_svc_layercontext.c:num_4x4_to_edge Unexecuted instantiation: vp9_tokenize.c:num_4x4_to_edge Unexecuted instantiation: vp9_aq_variance.c:num_4x4_to_edge Unexecuted instantiation: vp9_aq_360.c:num_4x4_to_edge Unexecuted instantiation: vp9_aq_cyclicrefresh.c:num_4x4_to_edge Unexecuted instantiation: vp9_aq_complexity.c:num_4x4_to_edge Unexecuted instantiation: vp9_alt_ref_aq.c:num_4x4_to_edge Unexecuted instantiation: vp9_skin_detection.c:num_4x4_to_edge Unexecuted instantiation: vp9_noise_estimate.c:num_4x4_to_edge Unexecuted instantiation: vp9_ext_ratectrl.c:num_4x4_to_edge Unexecuted instantiation: vp9_temporal_filter.c:num_4x4_to_edge Unexecuted instantiation: vp9_tpl_model.c:num_4x4_to_edge Unexecuted instantiation: vp9_mbgraph.c:num_4x4_to_edge Unexecuted instantiation: temporal_filter_sse4.c:num_4x4_to_edge Unexecuted instantiation: highbd_temporal_filter_sse4.c:num_4x4_to_edge Unexecuted instantiation: vp9_cx_iface.c:num_4x4_to_edge Unexecuted instantiation: vp9_bitstream.c:num_4x4_to_edge Unexecuted instantiation: vp9_context_tree.c:num_4x4_to_edge Unexecuted instantiation: vp9_encodeframe.c:num_4x4_to_edge Unexecuted instantiation: vp9_encodemb.c:num_4x4_to_edge Unexecuted instantiation: vp9_encodemv.c:num_4x4_to_edge Unexecuted instantiation: vp9_ethread.c:num_4x4_to_edge Unexecuted instantiation: vp9_firstpass.c:num_4x4_to_edge Unexecuted instantiation: vp9_lookahead.c:num_4x4_to_edge Unexecuted instantiation: vp9_multi_thread.c:num_4x4_to_edge Unexecuted instantiation: vp9_mcomp.c:num_4x4_to_edge vp9_rdopt.c:num_4x4_to_edge Line | Count | Source | 1270 | 356M | int subsampling_dim, int blk_dim) { | 1271 | 356M | return plane_4x4_dim + (mb_to_edge_dim >> (5 + subsampling_dim)) - blk_dim; | 1272 | 356M | } |
Unexecuted instantiation: vp9_pickmode.c:num_4x4_to_edge |
1273 | | |
1274 | | // Compute the sum of squares on all visible 4x4s in the transform block. |
1275 | | static int64_t sum_squares_visible(const MACROBLOCKD *xd, |
1276 | | const struct macroblockd_plane *const pd, |
1277 | | const int16_t *diff, const int diff_stride, |
1278 | | int blk_row, int blk_col, |
1279 | | const BLOCK_SIZE plane_bsize, |
1280 | | const BLOCK_SIZE tx_bsize, |
1281 | 49.7M | int *visible_width, int *visible_height) { |
1282 | 49.7M | int64_t sse; |
1283 | 49.7M | const int plane_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize]; |
1284 | 49.7M | const int plane_4x4_h = num_4x4_blocks_high_lookup[plane_bsize]; |
1285 | 49.7M | const int tx_4x4_w = num_4x4_blocks_wide_lookup[tx_bsize]; |
1286 | 49.7M | const int tx_4x4_h = num_4x4_blocks_high_lookup[tx_bsize]; |
1287 | 49.7M | const int b4x4s_to_right_edge = num_4x4_to_edge( |
1288 | 49.7M | plane_4x4_w, xd->mb_to_right_edge, pd->subsampling_x, blk_col); |
1289 | 49.7M | const int b4x4s_to_bottom_edge = num_4x4_to_edge( |
1290 | 49.7M | plane_4x4_h, xd->mb_to_bottom_edge, pd->subsampling_y, blk_row); |
1291 | 49.7M | if (tx_bsize == BLOCK_4X4 || |
1292 | 49.7M | (b4x4s_to_right_edge >= tx_4x4_w && b4x4s_to_bottom_edge >= tx_4x4_h)) { |
1293 | 49.1M | assert(tx_4x4_w == tx_4x4_h); |
1294 | 49.1M | sse = (int64_t)vpx_sum_squares_2d_i16(diff, diff_stride, tx_4x4_w << 2); |
1295 | 49.1M | *visible_width = tx_4x4_w << 2; |
1296 | 49.1M | *visible_height = tx_4x4_h << 2; |
1297 | 49.1M | } else { |
1298 | 671k | int r, c; |
1299 | 671k | const int max_r = VPXMIN(b4x4s_to_bottom_edge, tx_4x4_h); |
1300 | 671k | const int max_c = VPXMIN(b4x4s_to_right_edge, tx_4x4_w); |
1301 | 671k | sse = 0; |
1302 | | // if we are in the unrestricted motion border. |
1303 | 2.50M | for (r = 0; r < max_r; ++r) { |
1304 | | // Skip visiting the sub blocks that are wholly within the UMV. |
1305 | 8.84M | for (c = 0; c < max_c; ++c) { |
1306 | 7.01M | sse += (int64_t)vpx_sum_squares_2d_i16( |
1307 | 7.01M | diff + r * diff_stride * 4 + c * 4, diff_stride, 4); |
1308 | 7.01M | } |
1309 | 1.83M | } |
1310 | 671k | *visible_width = max_c << 2; |
1311 | 671k | *visible_height = max_r << 2; |
1312 | 671k | } |
1313 | 49.7M | return sse; |
1314 | 49.7M | } Unexecuted instantiation: vp9_frame_scale.c:sum_squares_visible Unexecuted instantiation: vp9_encoder.c:sum_squares_visible Unexecuted instantiation: vp9_picklpf.c:sum_squares_visible Unexecuted instantiation: vp9_quantize.c:sum_squares_visible Unexecuted instantiation: vp9_ratectrl.c:sum_squares_visible Unexecuted instantiation: vp9_rd.c:sum_squares_visible Unexecuted instantiation: vp9_segmentation.c:sum_squares_visible Unexecuted instantiation: vp9_speed_features.c:sum_squares_visible Unexecuted instantiation: vp9_svc_layercontext.c:sum_squares_visible Unexecuted instantiation: vp9_tokenize.c:sum_squares_visible Unexecuted instantiation: vp9_aq_variance.c:sum_squares_visible Unexecuted instantiation: vp9_aq_360.c:sum_squares_visible Unexecuted instantiation: vp9_aq_cyclicrefresh.c:sum_squares_visible Unexecuted instantiation: vp9_aq_complexity.c:sum_squares_visible Unexecuted instantiation: vp9_alt_ref_aq.c:sum_squares_visible Unexecuted instantiation: vp9_skin_detection.c:sum_squares_visible Unexecuted instantiation: vp9_noise_estimate.c:sum_squares_visible Unexecuted instantiation: vp9_ext_ratectrl.c:sum_squares_visible Unexecuted instantiation: vp9_temporal_filter.c:sum_squares_visible Unexecuted instantiation: vp9_tpl_model.c:sum_squares_visible Unexecuted instantiation: vp9_mbgraph.c:sum_squares_visible Unexecuted instantiation: temporal_filter_sse4.c:sum_squares_visible Unexecuted instantiation: highbd_temporal_filter_sse4.c:sum_squares_visible Unexecuted instantiation: vp9_cx_iface.c:sum_squares_visible Unexecuted instantiation: vp9_bitstream.c:sum_squares_visible Unexecuted instantiation: vp9_context_tree.c:sum_squares_visible Unexecuted instantiation: vp9_encodeframe.c:sum_squares_visible Unexecuted instantiation: vp9_encodemb.c:sum_squares_visible Unexecuted instantiation: vp9_encodemv.c:sum_squares_visible Unexecuted instantiation: vp9_ethread.c:sum_squares_visible Unexecuted instantiation: vp9_firstpass.c:sum_squares_visible Unexecuted instantiation: vp9_lookahead.c:sum_squares_visible Unexecuted instantiation: vp9_multi_thread.c:sum_squares_visible Unexecuted instantiation: vp9_mcomp.c:sum_squares_visible vp9_rdopt.c:sum_squares_visible Line | Count | Source | 1281 | 49.7M | int *visible_width, int *visible_height) { | 1282 | 49.7M | int64_t sse; | 1283 | 49.7M | const int plane_4x4_w = num_4x4_blocks_wide_lookup[plane_bsize]; | 1284 | 49.7M | const int plane_4x4_h = num_4x4_blocks_high_lookup[plane_bsize]; | 1285 | 49.7M | const int tx_4x4_w = num_4x4_blocks_wide_lookup[tx_bsize]; | 1286 | 49.7M | const int tx_4x4_h = num_4x4_blocks_high_lookup[tx_bsize]; | 1287 | 49.7M | const int b4x4s_to_right_edge = num_4x4_to_edge( | 1288 | 49.7M | plane_4x4_w, xd->mb_to_right_edge, pd->subsampling_x, blk_col); | 1289 | 49.7M | const int b4x4s_to_bottom_edge = num_4x4_to_edge( | 1290 | 49.7M | plane_4x4_h, xd->mb_to_bottom_edge, pd->subsampling_y, blk_row); | 1291 | 49.7M | if (tx_bsize == BLOCK_4X4 || | 1292 | 49.7M | (b4x4s_to_right_edge >= tx_4x4_w && b4x4s_to_bottom_edge >= tx_4x4_h)) { | 1293 | 49.1M | assert(tx_4x4_w == tx_4x4_h); | 1294 | 49.1M | sse = (int64_t)vpx_sum_squares_2d_i16(diff, diff_stride, tx_4x4_w << 2); | 1295 | 49.1M | *visible_width = tx_4x4_w << 2; | 1296 | 49.1M | *visible_height = tx_4x4_h << 2; | 1297 | 49.1M | } else { | 1298 | 671k | int r, c; | 1299 | 671k | const int max_r = VPXMIN(b4x4s_to_bottom_edge, tx_4x4_h); | 1300 | 671k | const int max_c = VPXMIN(b4x4s_to_right_edge, tx_4x4_w); | 1301 | 671k | sse = 0; | 1302 | | // if we are in the unrestricted motion border. | 1303 | 2.50M | for (r = 0; r < max_r; ++r) { | 1304 | | // Skip visiting the sub blocks that are wholly within the UMV. | 1305 | 8.84M | for (c = 0; c < max_c; ++c) { | 1306 | 7.01M | sse += (int64_t)vpx_sum_squares_2d_i16( | 1307 | 7.01M | diff + r * diff_stride * 4 + c * 4, diff_stride, 4); | 1308 | 7.01M | } | 1309 | 1.83M | } | 1310 | 671k | *visible_width = max_c << 2; | 1311 | 671k | *visible_height = max_r << 2; | 1312 | 671k | } | 1313 | 49.7M | return sse; | 1314 | 49.7M | } |
Unexecuted instantiation: vp9_pickmode.c:sum_squares_visible |
1315 | | |
1316 | | // Check if trellis coefficient optimization of the transform block is enabled. |
1317 | | static INLINE int do_trellis_opt(const struct macroblockd_plane *pd, |
1318 | | const int16_t *src_diff, int diff_stride, |
1319 | | int blk_row, int blk_col, |
1320 | | BLOCK_SIZE plane_bsize, TX_SIZE tx_size, |
1321 | 408M | void *arg) { |
1322 | 408M | const struct encode_b_args *const args = (struct encode_b_args *)arg; |
1323 | 408M | const MACROBLOCK *const x = args->x; |
1324 | | |
1325 | 408M | switch (args->enable_trellis_opt) { |
1326 | 291M | case DISABLE_TRELLIS_OPT: return 0; |
1327 | 0 | case ENABLE_TRELLIS_OPT: return 1; |
1328 | 116M | case ENABLE_TRELLIS_OPT_TX_RD_SRC_VAR: { |
1329 | 116M | vpx_clear_system_state(); |
1330 | | |
1331 | 116M | return (args->trellis_opt_thresh > 0.0) |
1332 | 116M | ? (x->log_block_src_var <= args->trellis_opt_thresh) |
1333 | 116M | : 1; |
1334 | 0 | } |
1335 | 0 | case ENABLE_TRELLIS_OPT_TX_RD_RESIDUAL_MSE: { |
1336 | 0 | const MACROBLOCKD *const xd = &x->e_mbd; |
1337 | 0 | const BLOCK_SIZE tx_bsize = txsize_to_bsize[tx_size]; |
1338 | 0 | #if CONFIG_VP9_HIGHBITDEPTH |
1339 | 0 | const int dequant_shift = |
1340 | 0 | (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? xd->bd - 5 : 3; |
1341 | | #else |
1342 | | const int dequant_shift = 3; |
1343 | | #endif // CONFIG_VP9_HIGHBITDEPTH |
1344 | 0 | const int qstep = pd->dequant[1] >> dequant_shift; |
1345 | 0 | int *sse_calc_done = args->sse_calc_done; |
1346 | 0 | int64_t *sse = args->sse; |
1347 | 0 | int visible_width = 0, visible_height = 0; |
1348 | | |
1349 | | // TODO: Enable the sf for high bit-depth case |
1350 | 0 | if ((xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) || !sse || |
1351 | 0 | !sse_calc_done) |
1352 | 0 | return 1; |
1353 | | |
1354 | 0 | *sse = sum_squares_visible(xd, pd, src_diff, diff_stride, blk_row, |
1355 | 0 | blk_col, plane_bsize, tx_bsize, &visible_width, |
1356 | 0 | &visible_height); |
1357 | 0 | *sse_calc_done = 1; |
1358 | |
|
1359 | 0 | vpx_clear_system_state(); |
1360 | |
|
1361 | 0 | return (*(sse) <= (int64_t)visible_width * visible_height * qstep * |
1362 | 0 | qstep * args->trellis_opt_thresh); |
1363 | 0 | } |
1364 | 0 | default: assert(0 && "Invalid trellis optimization method."); return 1; |
1365 | 408M | } |
1366 | 408M | } Unexecuted instantiation: vp9_frame_scale.c:do_trellis_opt Unexecuted instantiation: vp9_encoder.c:do_trellis_opt Unexecuted instantiation: vp9_picklpf.c:do_trellis_opt Unexecuted instantiation: vp9_quantize.c:do_trellis_opt Unexecuted instantiation: vp9_ratectrl.c:do_trellis_opt Unexecuted instantiation: vp9_rd.c:do_trellis_opt Unexecuted instantiation: vp9_segmentation.c:do_trellis_opt Unexecuted instantiation: vp9_speed_features.c:do_trellis_opt Unexecuted instantiation: vp9_svc_layercontext.c:do_trellis_opt Unexecuted instantiation: vp9_tokenize.c:do_trellis_opt Unexecuted instantiation: vp9_aq_variance.c:do_trellis_opt Unexecuted instantiation: vp9_aq_360.c:do_trellis_opt Unexecuted instantiation: vp9_aq_cyclicrefresh.c:do_trellis_opt Unexecuted instantiation: vp9_aq_complexity.c:do_trellis_opt Unexecuted instantiation: vp9_alt_ref_aq.c:do_trellis_opt Unexecuted instantiation: vp9_skin_detection.c:do_trellis_opt Unexecuted instantiation: vp9_noise_estimate.c:do_trellis_opt Unexecuted instantiation: vp9_ext_ratectrl.c:do_trellis_opt Unexecuted instantiation: vp9_temporal_filter.c:do_trellis_opt Unexecuted instantiation: vp9_tpl_model.c:do_trellis_opt Unexecuted instantiation: vp9_mbgraph.c:do_trellis_opt Unexecuted instantiation: temporal_filter_sse4.c:do_trellis_opt Unexecuted instantiation: highbd_temporal_filter_sse4.c:do_trellis_opt Unexecuted instantiation: vp9_cx_iface.c:do_trellis_opt Unexecuted instantiation: vp9_bitstream.c:do_trellis_opt Unexecuted instantiation: vp9_context_tree.c:do_trellis_opt Unexecuted instantiation: vp9_encodeframe.c:do_trellis_opt vp9_encodemb.c:do_trellis_opt Line | Count | Source | 1321 | 344M | void *arg) { | 1322 | 344M | const struct encode_b_args *const args = (struct encode_b_args *)arg; | 1323 | 344M | const MACROBLOCK *const x = args->x; | 1324 | | | 1325 | 344M | switch (args->enable_trellis_opt) { | 1326 | 256M | case DISABLE_TRELLIS_OPT: return 0; | 1327 | 0 | case ENABLE_TRELLIS_OPT: return 1; | 1328 | 88.2M | case ENABLE_TRELLIS_OPT_TX_RD_SRC_VAR: { | 1329 | 88.2M | vpx_clear_system_state(); | 1330 | | | 1331 | 88.2M | return (args->trellis_opt_thresh > 0.0) | 1332 | 88.2M | ? (x->log_block_src_var <= args->trellis_opt_thresh) | 1333 | 88.2M | : 1; | 1334 | 0 | } | 1335 | 0 | case ENABLE_TRELLIS_OPT_TX_RD_RESIDUAL_MSE: { | 1336 | 0 | const MACROBLOCKD *const xd = &x->e_mbd; | 1337 | 0 | const BLOCK_SIZE tx_bsize = txsize_to_bsize[tx_size]; | 1338 | 0 | #if CONFIG_VP9_HIGHBITDEPTH | 1339 | 0 | const int dequant_shift = | 1340 | 0 | (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? xd->bd - 5 : 3; | 1341 | | #else | 1342 | | const int dequant_shift = 3; | 1343 | | #endif // CONFIG_VP9_HIGHBITDEPTH | 1344 | 0 | const int qstep = pd->dequant[1] >> dequant_shift; | 1345 | 0 | int *sse_calc_done = args->sse_calc_done; | 1346 | 0 | int64_t *sse = args->sse; | 1347 | 0 | int visible_width = 0, visible_height = 0; | 1348 | | | 1349 | | // TODO: Enable the sf for high bit-depth case | 1350 | 0 | if ((xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) || !sse || | 1351 | 0 | !sse_calc_done) | 1352 | 0 | return 1; | 1353 | | | 1354 | 0 | *sse = sum_squares_visible(xd, pd, src_diff, diff_stride, blk_row, | 1355 | 0 | blk_col, plane_bsize, tx_bsize, &visible_width, | 1356 | 0 | &visible_height); | 1357 | 0 | *sse_calc_done = 1; | 1358 | |
| 1359 | 0 | vpx_clear_system_state(); | 1360 | |
| 1361 | 0 | return (*(sse) <= (int64_t)visible_width * visible_height * qstep * | 1362 | 0 | qstep * args->trellis_opt_thresh); | 1363 | 0 | } | 1364 | 0 | default: assert(0 && "Invalid trellis optimization method."); return 1; | 1365 | 344M | } | 1366 | 344M | } |
Unexecuted instantiation: vp9_encodemv.c:do_trellis_opt Unexecuted instantiation: vp9_ethread.c:do_trellis_opt Unexecuted instantiation: vp9_firstpass.c:do_trellis_opt Unexecuted instantiation: vp9_lookahead.c:do_trellis_opt Unexecuted instantiation: vp9_multi_thread.c:do_trellis_opt Unexecuted instantiation: vp9_mcomp.c:do_trellis_opt vp9_rdopt.c:do_trellis_opt Line | Count | Source | 1321 | 63.1M | void *arg) { | 1322 | 63.1M | const struct encode_b_args *const args = (struct encode_b_args *)arg; | 1323 | 63.1M | const MACROBLOCK *const x = args->x; | 1324 | | | 1325 | 63.1M | switch (args->enable_trellis_opt) { | 1326 | 35.2M | case DISABLE_TRELLIS_OPT: return 0; | 1327 | 0 | case ENABLE_TRELLIS_OPT: return 1; | 1328 | 27.8M | case ENABLE_TRELLIS_OPT_TX_RD_SRC_VAR: { | 1329 | 27.8M | vpx_clear_system_state(); | 1330 | | | 1331 | 27.8M | return (args->trellis_opt_thresh > 0.0) | 1332 | 27.8M | ? (x->log_block_src_var <= args->trellis_opt_thresh) | 1333 | 27.8M | : 1; | 1334 | 0 | } | 1335 | 0 | case ENABLE_TRELLIS_OPT_TX_RD_RESIDUAL_MSE: { | 1336 | 0 | const MACROBLOCKD *const xd = &x->e_mbd; | 1337 | 0 | const BLOCK_SIZE tx_bsize = txsize_to_bsize[tx_size]; | 1338 | 0 | #if CONFIG_VP9_HIGHBITDEPTH | 1339 | 0 | const int dequant_shift = | 1340 | 0 | (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? xd->bd - 5 : 3; | 1341 | | #else | 1342 | | const int dequant_shift = 3; | 1343 | | #endif // CONFIG_VP9_HIGHBITDEPTH | 1344 | 0 | const int qstep = pd->dequant[1] >> dequant_shift; | 1345 | 0 | int *sse_calc_done = args->sse_calc_done; | 1346 | 0 | int64_t *sse = args->sse; | 1347 | 0 | int visible_width = 0, visible_height = 0; | 1348 | | | 1349 | | // TODO: Enable the sf for high bit-depth case | 1350 | 0 | if ((xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) || !sse || | 1351 | 0 | !sse_calc_done) | 1352 | 0 | return 1; | 1353 | | | 1354 | 0 | *sse = sum_squares_visible(xd, pd, src_diff, diff_stride, blk_row, | 1355 | 0 | blk_col, plane_bsize, tx_bsize, &visible_width, | 1356 | 0 | &visible_height); | 1357 | 0 | *sse_calc_done = 1; | 1358 | |
| 1359 | 0 | vpx_clear_system_state(); | 1360 | |
| 1361 | 0 | return (*(sse) <= (int64_t)visible_width * visible_height * qstep * | 1362 | 0 | qstep * args->trellis_opt_thresh); | 1363 | 0 | } | 1364 | 0 | default: assert(0 && "Invalid trellis optimization method."); return 1; | 1365 | 63.1M | } | 1366 | 63.1M | } |
Unexecuted instantiation: vp9_pickmode.c:do_trellis_opt |
1367 | | |
1368 | | #if CONFIG_COLLECT_COMPONENT_TIMING |
1369 | | static INLINE void start_timing(VP9_COMP *cpi, int component) { |
1370 | | vpx_usec_timer_start(&cpi->component_timer[component]); |
1371 | | } |
1372 | | static INLINE void end_timing(VP9_COMP *cpi, int component) { |
1373 | | vpx_usec_timer_mark(&cpi->component_timer[component]); |
1374 | | cpi->frame_component_time[component] += |
1375 | | vpx_usec_timer_elapsed(&cpi->component_timer[component]); |
1376 | | } |
1377 | | static INLINE char const *get_frame_type_enum(int type) { |
1378 | | switch (type) { |
1379 | | case 0: return "KEY_FRAME"; |
1380 | | case 1: return "INTER_FRAME"; |
1381 | | default: assert(0); |
1382 | | } |
1383 | | return "error"; |
1384 | | } |
1385 | | #endif |
1386 | | |
1387 | | #ifdef __cplusplus |
1388 | | } // extern "C" |
1389 | | #endif |
1390 | | |
1391 | | #endif // VPX_VP9_ENCODER_VP9_ENCODER_H_ |