} VP8_CONFIG;
- void vp9_initialize();
+ void vp9_initialize_enc();
VP8_PTR vp9_create_compressor(VP8_CONFIG *oxcf);
void vp9_remove_compressor(VP8_PTR *comp);
// receive a frames worth of data caller can assume that a copy of this frame is made
// and not just a copy of the pointer..
- int vp9_receive_raw_frame(VP8_PTR comp, unsigned int frame_flags, YV12_BUFFER_CONFIG *sd, int64_t time_stamp, int64_t end_time_stamp);
- int vp9_get_compressed_data(VP8_PTR comp, unsigned int *frame_flags, unsigned long *size, unsigned char *dest, int64_t *time_stamp, int64_t *time_end, int flush);
- int vp9_get_preview_raw_frame(VP8_PTR comp, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *flags);
+ int vp9_receive_raw_frame(VP8_PTR comp, unsigned int frame_flags,
+ YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
+ int64_t end_time_stamp);
+
+ int vp9_get_compressed_data(VP8_PTR comp, unsigned int *frame_flags,
+ unsigned long *size, unsigned char *dest,
+ int64_t *time_stamp, int64_t *time_end,
+ int flush);
+
+ int vp9_get_preview_raw_frame(VP8_PTR comp, YV12_BUFFER_CONFIG *dest,
+ vp8_ppflags_t *flags);
int vp9_use_as_reference(VP8_PTR comp, int ref_frame_flags);
+
int vp9_update_reference(VP8_PTR comp, int ref_frame_flags);
- int vp9_get_reference(VP8_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd);
- int vp9_set_reference(VP8_PTR comp, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd);
+
+ int vp9_get_reference_enc(VP8_PTR comp, VP8_REFFRAME ref_frame_flag,
+ YV12_BUFFER_CONFIG *sd);
+
+ int vp9_set_reference_enc(VP8_PTR comp, VP8_REFFRAME ref_frame_flag,
+ YV12_BUFFER_CONFIG *sd);
+
int vp9_update_entropy(VP8_PTR comp, int update);
- int vp9_set_roimap(VP8_PTR comp, unsigned char *map, unsigned int rows, unsigned int cols, int delta_q[4], int delta_lf[4], unsigned int threshold[4]);
- int vp9_set_active_map(VP8_PTR comp, unsigned char *map, unsigned int rows, unsigned int cols);
- int vp9_set_internal_size(VP8_PTR comp, VPX_SCALING horiz_mode, VPX_SCALING vert_mode);
+
+ int vp9_set_roimap(VP8_PTR comp, unsigned char *map,
+ unsigned int rows, unsigned int cols,
+ int delta_q[4], int delta_lf[4],
+ unsigned int threshold[4]);
+
+ int vp9_set_active_map(VP8_PTR comp, unsigned char *map,
+ unsigned int rows, unsigned int cols);
+
+ int vp9_set_internal_size(VP8_PTR comp,
+ VPX_SCALING horiz_mode, VPX_SCALING vert_mode);
+
int vp9_get_quantizer(VP8_PTR c);
#ifdef __cplusplus
}
}
-void vp9_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned long *size) {
+void vp9_pack_bitstream(VP8_COMP *cpi, unsigned char *dest,
+ unsigned long *size) {
int i, j;
VP8_HEADER oh;
VP8_COMMON *const pc = &cpi->common;
compute_update_table();
- // vp8_kf_default_bmode_probs() is called in vp9_setup_key_frame() once for each
- // K frame before encode frame. pc->kf_bmode_prob doesn't get changed anywhere
- // else. No need to call it again here. --yw
- // vp8_kf_default_bmode_probs( pc->kf_bmode_prob);
+ /* vp8_kf_default_bmode_probs() is called in vp9_setup_key_frame() once
+ * for each K frame before encode frame. pc->kf_bmode_prob doesn't get
+ * changed anywhere else. No need to call it again here. --yw
+ * vp8_kf_default_bmode_probs( pc->kf_bmode_prob);
+ */
- // every keyframe send startcode, width, height, scale factor, clamp and color type
+ /* every keyframe send startcode, width, height, scale factor, clamp
+ * and color type.
+ */
if (oh.type == KEY_FRAME) {
int v;
}
}
-void vp9_short_fhaar2x2_c(short *input, short *output, int pitch) { // pitch = 8
+void vp9_short_fhaar2x2_c(short *input, short *output, int pitch) {
/* [1 1; 1 -1] orthogonal transform */
/* use position: 0,1, 4, 8 */
int i;
op1[1] = (ip1[0] - ip1[1] + ip1[4] - ip1[8]) >> 1;
op1[4] = (ip1[0] + ip1[1] - ip1[4] - ip1[8]) >> 1;
op1[8] = (ip1[0] - ip1[1] - ip1[4] + ip1[8]) >> 1;
-
}
/* For test */
int mb_row_debug, mb_col_debug;
#endif
-extern void vp9cx_initialize_me_consts(VP8_COMP *cpi, int QIndex);
+extern void vp9_initialize_me_consts(VP8_COMP *cpi, int QIndex);
+
extern void vp9_auto_select_speed(VP8_COMP *cpi);
-extern void vp8cx_init_mbrthread_data(VP8_COMP *cpi,
- MACROBLOCK *x,
- MB_ROW_COMP *mbr_ei,
- int mb_row,
- int count);
+
int64_t vp9_rd_pick_inter_mode_sb(VP8_COMP *cpi, MACROBLOCK *x,
int recon_yoffset, int recon_uvoffset,
int *returnrate, int *returndistortion);
-extern void vp9cx_pick_mode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
- int recon_yoffset,
- int recon_uvoffset, int *r, int *d);
+
+extern void vp9_pick_mode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
+ int recon_yoffset,
+ int recon_uvoffset, int *r, int *d);
+
void vp9_build_block_offsets(MACROBLOCK *x);
+
void vp9_setup_block_ptrs(MACROBLOCK *x);
-void vp9cx_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
- int recon_yoffset, int recon_uvoffset,
- int output_enabled);
-void vp9cx_encode_inter_superblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
- int recon_yoffset, int recon_uvoffset, int mb_col, int mb_row);
-void vp9cx_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x,
- TOKENEXTRA **t, int output_enabled);
-void vp9cx_encode_intra_super_block(VP8_COMP *cpi,
- MACROBLOCK *x,
- TOKENEXTRA **t, int mb_col);
+
+void vp9_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
+ int recon_yoffset, int recon_uvoffset,
+ int output_enabled);
+
+void vp9_encode_inter_superblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
+ int recon_yoffset, int recon_uvoffset,
+ int mb_col, int mb_row);
+
+void vp9_encode_intra_macro_block(VP8_COMP *cpi, MACROBLOCK *x,
+ TOKENEXTRA **t, int output_enabled);
+
+void vp9_encode_intra_super_block(VP8_COMP *cpi, MACROBLOCK *x,
+ TOKENEXTRA **t, int mb_col);
+
static void adjust_act_zbin(VP8_COMP *cpi, MACROBLOCK *x);
#ifdef MODE_STATS
if (mbmi->segment_id > 3)
mbmi->segment_id = 0;
- vp9cx_mb_init_quantizer(cpi, x);
+ vp9_mb_init_quantizer(cpi, x);
} else
// Set to Segment 0 by default
mbmi->segment_id = 0;
*totaldist += d;
// Dummy encode, do not do the tokenization
- vp9cx_encode_intra_macro_block(cpi, x, tp, 0);
+ vp9_encode_intra_macro_block(cpi, x, tp, 0);
// Note the encoder may have changed the segment_id
// Save the coding context
cpi->seg0_progress = (((mb_col & ~1) * 2 + (mb_row & ~1) * cm->mb_cols + i) << 16) / cm->MBs;
}
- vp9cx_pick_mode_inter_macroblock(cpi, x, recon_yoffset,
- recon_uvoffset, &r, &d);
+ vp9_pick_mode_inter_macroblock(cpi, x, recon_yoffset,
+ recon_uvoffset, &r, &d);
*totalrate += r;
*totaldist += d;
// Dummy encode, do not do the tokenization
- vp9cx_encode_inter_macroblock(cpi, x, tp,
- recon_yoffset, recon_uvoffset, 0);
+ vp9_encode_inter_macroblock(cpi, x, tp,
+ recon_yoffset, recon_uvoffset, 0);
seg_id = mbmi->segment_id;
if (cpi->mb.e_mbd.segmentation_enabled && seg_id == 0) {
if (xd->mode_info_context->mbmi.segment_id > 3)
xd->mode_info_context->mbmi.segment_id = 0;
- vp9cx_mb_init_quantizer(cpi, x);
+ vp9_mb_init_quantizer(cpi, x);
}
else
/* Set to Segment 0 by default */
// Is segmentation enabled
if (xd->segmentation_enabled) {
- vp9cx_mb_init_quantizer(cpi, x);
+ vp9_mb_init_quantizer(cpi, x);
}
x->active_ptr = cpi->active_map + map_index;
if (cm->frame_type == KEY_FRAME) {
#if CONFIG_SUPERBLOCKS
if (xd->mode_info_context->mbmi.encoded_as_sb)
- vp9cx_encode_intra_super_block(cpi, x, tp, mb_col);
+ vp9_encode_intra_super_block(cpi, x, tp, mb_col);
else
#endif
- vp9cx_encode_intra_macro_block(cpi, x, tp, 1);
+ vp9_encode_intra_macro_block(cpi, x, tp, 1);
// Note the encoder may have changed the segment_id
#ifdef MODE_STATS
#if CONFIG_SUPERBLOCKS
if (xd->mode_info_context->mbmi.encoded_as_sb)
- vp9cx_encode_inter_superblock(cpi, x, tp, recon_yoffset, recon_uvoffset, mb_col, mb_row);
+ vp9_encode_inter_superblock(cpi, x, tp, recon_yoffset, recon_uvoffset,
+ mb_col, mb_row);
else
#endif
- vp9cx_encode_inter_macroblock(cpi, x, tp,
- recon_yoffset, recon_uvoffset, 1);
+ vp9_encode_inter_macroblock(cpi, x, tp,
+ recon_yoffset, recon_uvoffset, 1);
// Note the encoder may have changed the segment_id
#ifdef MODE_STATS
vp8_zero(cpi->coef_counts_16x16);
vp8_zero(cpi->hybrid_coef_counts_16x16);
- vp9cx_frame_init_quantizer(cpi);
+ vp9_frame_init_quantizer(cpi);
vp9_initialize_rd_consts(cpi, cm->base_qindex + cm->y1dc_delta_q);
- vp9cx_initialize_me_consts(cpi, cm->base_qindex);
+ vp9_initialize_me_consts(cpi, cm->base_qindex);
if (cpi->oxcf.tuning == VP8_TUNE_SSIM) {
// Initialize encode frame context.
}
}
-void vp9cx_encode_intra_super_block(VP8_COMP *cpi,
- MACROBLOCK *x,
- TOKENEXTRA **t,
- int mb_col) {
+void vp9_encode_intra_super_block(VP8_COMP *cpi,
+ MACROBLOCK *x,
+ TOKENEXTRA **t,
+ int mb_col) {
const int output_enabled = 1;
int n;
MACROBLOCKD *xd = &x->e_mbd;
}
#endif /* CONFIG_SUPERBLOCKS */
-void vp9cx_encode_intra_macro_block(VP8_COMP *cpi,
- MACROBLOCK *x,
- TOKENEXTRA **t,
- int output_enabled) {
+void vp9_encode_intra_macro_block(VP8_COMP *cpi,
+ MACROBLOCK *x,
+ TOKENEXTRA **t,
+ int output_enabled) {
MB_MODE_INFO * mbmi = &x->e_mbd.mode_info_context->mbmi;
if ((cpi->oxcf.tuning == VP8_TUNE_SSIM) && output_enabled) {
adjust_act_zbin(cpi, x);
extern void vp9_fix_contexts(MACROBLOCKD *xd);
-void vp9cx_encode_inter_macroblock (VP8_COMP *cpi, MACROBLOCK *x,
- TOKENEXTRA **t, int recon_yoffset,
- int recon_uvoffset, int output_enabled) {
+void vp9_encode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
+ TOKENEXTRA **t, int recon_yoffset,
+ int recon_uvoffset, int output_enabled) {
VP8_COMMON *cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO * mbmi = &xd->mode_info_context->mbmi;
}
#if CONFIG_SUPERBLOCKS
-void vp9cx_encode_inter_superblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
- int recon_yoffset, int recon_uvoffset, int mb_col, int mb_row) {
+void vp9_encode_inter_superblock(VP8_COMP *cpi, MACROBLOCK *x, TOKENEXTRA **t,
+ int recon_yoffset, int recon_uvoffset,
+ int mb_col, int mb_row) {
const int output_enabled = 1;
VP8_COMMON *cm = &cpi->common;
MACROBLOCKD *xd = &x->e_mbd;
vp9_ht_quantize_b_4x4(be, b, tx_type);
vp8_ihtllm_c(b->dqcoeff, b->diff, 32, tx_type, 4);
} else {
- x->vp9_short_fdct4x4(be->src_diff, be->coeff, 32) ;
+ x->vp9_short_fdct4x4(be->src_diff, be->coeff, 32);
x->quantize_b_4x4(be, b) ;
vp8_inverse_transform_b_4x4(IF_RTCD(&rtcd->common->idct), b, 32) ;
}
#endif
extern void vp9_build_block_offsets(MACROBLOCK *x);
+
extern void vp9_setup_block_ptrs(MACROBLOCK *x);
-extern void vp9cx_frame_init_quantizer(VP8_COMP *cpi);
-extern void vp9_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb, int_mv *mv);
+
+extern void vp9_frame_init_quantizer(VP8_COMP *cpi);
+
+extern void vp9_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb,
+ int_mv *mv);
+
extern void vp9_alloc_compressor_data(VP8_COMP *cpi);
#define IIFACTOR 12.5
// set up frame new frame for intra coded blocks
vp8_setup_intra_recon(new_yv12);
- vp9cx_frame_init_quantizer(cpi);
+ vp9_frame_init_quantizer(cpi);
// Initialise the MV cost table to the defaults
// if( cm->current_video_frame == 0)
// encoded in the second pass is a guess. However the sum duration is not.
// Its calculated based on the actual durations of all frames from the first
// pass.
- vp9_new_frame_rate(cpi, 10000000.0 * cpi->twopass.total_stats->count / cpi->twopass.total_stats->duration);
+ vp9_new_frame_rate(cpi,
+ 10000000.0 * cpi->twopass.total_stats->count /
+ cpi->twopass.total_stats->duration);
cpi->output_frame_rate = cpi->oxcf.frame_rate;
- cpi->twopass.bits_left = (int64_t)(cpi->twopass.total_stats->duration * cpi->oxcf.target_bandwidth / 10000000.0);
- cpi->twopass.bits_left -= (int64_t)(cpi->twopass.total_stats->duration * two_pass_min_rate / 10000000.0);
+ cpi->twopass.bits_left = (int64_t)(cpi->twopass.total_stats->duration *
+ cpi->oxcf.target_bandwidth / 10000000.0);
+ cpi->twopass.bits_left -= (int64_t)(cpi->twopass.total_stats->duration *
+ two_pass_min_rate / 10000000.0);
// Calculate a minimum intra value to be used in determining the IIratio
// scores used in the second pass. We have this minimum to make sure
void vp9_arch_x86_encoder_init(VP8_COMP *cpi);
void vp8_arch_arm_encoder_init(VP8_COMP *cpi);
-void (*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction);
-extern void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction);
+void (*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc,
+ YV12_BUFFER_CONFIG *dst_ybc,
+ int fraction);
+extern void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc,
+ YV12_BUFFER_CONFIG *dst_ybc,
+ int fraction);
void vp9_cmachine_specific_config(VP8_COMP *cpi) {
#if CONFIG_RUNTIME_CPU_DETECT
void vp9_init_mode_costs(VP8_COMP *c) {
VP8_COMMON *x = &c->common;
- {
- const vp8_tree_p T = vp8_bmode_tree;
-
- int i = 0;
-
- do {
- int j = 0;
-
- do {
- vp9_cost_tokens((int *)c->mb.bmode_costs[i][j], x->kf_bmode_prob[i][j], T);
- } while (++j < VP8_BINTRAMODES);
- } while (++i < VP8_BINTRAMODES);
-
- vp9_cost_tokens((int *)c->mb.inter_bmode_costs, x->fc.bmode_prob, T);
+ const vp8_tree_p T = vp8_bmode_tree;
+ int i, j;
+
+ for (i = 0; i < VP8_BINTRAMODES; i++) {
+ for (j = 0; j < VP8_BINTRAMODES; j++) {
+ vp9_cost_tokens((int *)c->mb.bmode_costs[i][j],
+ x->kf_bmode_prob[i][j], T);
+ }
}
+
+ vp9_cost_tokens((int *)c->mb.inter_bmode_costs, x->fc.bmode_prob, T);
vp9_cost_tokens((int *)c->mb.inter_bmode_costs,
x->fc.sub_mv_ref_prob[0], vp8_sub_mv_ref_tree);
vp9_cost_tokens(c->mb.i8x8_mode_costs,
x->fc.i8x8_mode_prob, vp8_i8x8_mode_tree);
- {
- int i;
- for (i = 0; i <= VP8_SWITCHABLE_FILTERS; ++i)
- vp9_cost_tokens((int *)c->mb.switchable_interp_costs[i],
- x->fc.switchable_interp_prob[i],
- vp8_switchable_interp_tree);
- }
+ for (i = 0; i <= VP8_SWITCHABLE_FILTERS; ++i)
+ vp9_cost_tokens((int *)c->mb.switchable_interp_costs[i],
+ x->fc.switchable_interp_prob[i],
+ vp8_switchable_interp_tree);
}
#define RTCD(x) NULL
#endif
-extern void vp9cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
-extern void vp9cx_set_alt_lf_level(VP8_COMP *cpi, int filt_val);
-extern void vp9cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
+extern void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
+
+extern void vp9_set_alt_lf_level(VP8_COMP *cpi, int filt_val);
+
+extern void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi);
extern void vp9_cmachine_specific_config(VP8_COMP *cpi);
-extern void vp8_deblock_frame(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *post, int filt_lvl, int low_var_thresh, int flag);
+
+extern void vp8_deblock_frame(YV12_BUFFER_CONFIG *source,
+ YV12_BUFFER_CONFIG *post,
+ int filt_lvl, int low_var_thresh, int flag);
+
extern void print_parms(VP8_CONFIG *ocf, char *filenam);
+
extern unsigned int vp8_get_processor_freq();
+
extern void print_tree_update_probs();
+
extern void vp8cx_create_encoder_threads(VP8_COMP *cpi);
+
extern void vp8cx_remove_encoder_threads(VP8_COMP *cpi);
+
#if HAVE_ARMV7
-extern void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc);
-extern void vp8_yv12_copy_src_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc);
+extern void vp8_yv12_copy_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc,
+ YV12_BUFFER_CONFIG *dst_ybc);
+
+extern void vp8_yv12_copy_src_frame_func_neon(YV12_BUFFER_CONFIG *src_ybc,
+ YV12_BUFFER_CONFIG *dst_ybc);
#endif
int vp9_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest);
extern unsigned int inter_b_modes[B_MODE_COUNT];
#endif
-extern void vp9cx_init_quantizer(VP8_COMP *cpi);
+extern void vp9_init_quantizer(VP8_COMP *cpi);
int vp8cx_base_skip_false_prob[QINDEX_RANGE][3];
}
-void vp9_initialize() {
+void vp9_initialize_enc() {
static int init_done = 0;
if (!init_done) {
}
if (cpi->sf.search_method == NSTEP) {
- vp9_init3smotion_compensation(&cpi->mb, cm->yv12_fb[cm->lst_fb_idx].y_stride);
+ vp9_init3smotion_compensation(&cpi->mb,
+ cm->yv12_fb[cm->lst_fb_idx].y_stride);
} else if (cpi->sf.search_method == DIAMOND) {
- vp9_init_dsmotion_compensation(&cpi->mb, cm->yv12_fb[cm->lst_fb_idx].y_stride);
+ vp9_init_dsmotion_compensation(&cpi->mb,
+ cm->yv12_fb[cm->lst_fb_idx].y_stride);
}
cpi->mb.vp9_short_fdct16x16 = vp9_short_fdct16x16;
cpi->mb.quantize_b_16x16 = vp9_regular_quantize_b_16x16;
cpi->mb.quantize_b_2x2 = vp9_regular_quantize_b_2x2;
- vp9cx_init_quantizer(cpi);
+ vp9_init_quantizer(cpi);
#if CONFIG_RUNTIME_CPU_DETECT
cpi->mb.e_mbd.rtcd = &cpi->common.rtcd;
// make sure frame 1 is okay
cpi->error_bins[0] = cpi->common.MBs;
- // vp9cx_init_quantizer() is first called here. Add check in vp9cx_frame_init_quantizer() so that vp9cx_init_quantizer is only called later
- // when needed. This will avoid unnecessary calls of vp9cx_init_quantizer() for every frame.
- vp9cx_init_quantizer(cpi);
+ /* vp9_init_quantizer() is first called here. Add check in
+ * vp9_frame_init_quantizer() so that vp9_init_quantizer is only
+ * called later when needed. This will avoid unnecessary calls of
+ * vp9_init_quantizer() for every frame.
+ */
+ vp9_init_quantizer(cpi);
vp8_loop_filter_init(cm);
return 0;
}
-int vp9_get_reference(VP8_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) {
+int vp9_get_reference_enc(VP8_PTR ptr, VP8_REFFRAME ref_frame_flag,
+ YV12_BUFFER_CONFIG *sd) {
VP8_COMP *cpi = (VP8_COMP *)(ptr);
VP8_COMMON *cm = &cpi->common;
int ref_fb_idx;
return 0;
}
-int vp9_set_reference(VP8_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_CONFIG *sd) {
+
+int vp9_set_reference_enc(VP8_PTR ptr, VP8_REFFRAME ref_frame_flag,
+ YV12_BUFFER_CONFIG *sd) {
VP8_COMP *cpi = (VP8_COMP *)(ptr);
VP8_COMMON *cm = &cpi->common;
vpx_usec_timer_start(&timer);
if (cpi->sf.auto_filter == 0)
- vp9cx_pick_filter_level_fast(cpi->Source, cpi);
-
+ vp9_pick_filter_level_fast(cpi->Source, cpi);
else
- vp9cx_pick_filter_level(cpi->Source, cpi);
+ vp9_pick_filter_level(cpi->Source, cpi);
vpx_usec_timer_mark(&timer);
cpi->time_pick_lpf += vpx_usec_timer_elapsed(&timer);
}
if (cm->filter_level > 0) {
- vp9cx_set_alt_lf_level(cpi, cm->filter_level);
+ vp9_set_alt_lf_level(cpi, cm->filter_level);
vp8_loop_filter_frame(cm, &cpi->mb.e_mbd);
}
else
zbin_oq_high = ZBIN_OQ_MAX;
- vp9_compute_frame_size_bounds(cpi, &frame_under_shoot_limit, &frame_over_shoot_limit);
+ vp9_compute_frame_size_bounds(cpi, &frame_under_shoot_limit,
+ &frame_over_shoot_limit);
// Limit Q range for the adaptive loop.
bottom_index = cpi->active_best_quality;
}
}
-static void Pass2Encode(VP8_COMP *cpi, unsigned long *size, unsigned char *dest, unsigned int *frame_flags) {
+static void Pass2Encode(VP8_COMP *cpi, unsigned long *size,
+ unsigned char *dest, unsigned int *frame_flags) {
if (!cpi->common.refresh_alt_ref_frame)
vp9_second_pass(cpi);
#endif
-int vp9_receive_raw_frame(VP8_PTR ptr, unsigned int frame_flags, YV12_BUFFER_CONFIG *sd, int64_t time_stamp, int64_t end_time) {
+int vp9_receive_raw_frame(VP8_PTR ptr, unsigned int frame_flags,
+ YV12_BUFFER_CONFIG *sd, int64_t time_stamp,
+ int64_t end_time) {
#if HAVE_ARMV7
int64_t store_reg[8];
#endif
#endif
vpx_usec_timer_start(&timer);
- if (vp9_lookahead_push(cpi->lookahead, sd, time_stamp, end_time,
- frame_flags, cpi->active_map_enabled ? cpi->active_map : NULL))
+ if (vp9_lookahead_push(cpi->lookahead, sd, time_stamp, end_time, frame_flags,
+ cpi->active_map_enabled ? cpi->active_map : NULL))
res = -1;
cm->clr_type = sd->clrtype;
vpx_usec_timer_mark(&timer);
}
-int vp9_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned long *size, unsigned char *dest, int64_t *time_stamp, int64_t *time_end, int flush) {
+int vp9_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags,
+ unsigned long *size, unsigned char *dest,
+ int64_t *time_stamp, int64_t *time_end, int flush) {
#if HAVE_ARMV7
int64_t store_reg[8];
#endif
return 0;
}
-int vp9_get_preview_raw_frame(VP8_PTR comp, YV12_BUFFER_CONFIG *dest, vp8_ppflags_t *flags) {
+int vp9_get_preview_raw_frame(VP8_PTR comp, YV12_BUFFER_CONFIG *dest,
+ vp8_ppflags_t *flags) {
VP8_COMP *cpi = (VP8_COMP *) comp;
if (cpi->common.refresh_alt_ref_frame)
}
}
-int vp9_set_roimap(VP8_PTR comp, unsigned char *map, unsigned int rows, unsigned int cols, int delta_q[4], int delta_lf[4], unsigned int threshold[4]) {
+int vp9_set_roimap(VP8_PTR comp, unsigned char *map, unsigned int rows,
+ unsigned int cols, int delta_q[4], int delta_lf[4],
+ unsigned int threshold[4]) {
VP8_COMP *cpi = (VP8_COMP *) comp;
signed char feature_data[SEG_LVL_MAX][MAX_MB_SEGMENTS];
MACROBLOCKD *xd = &cpi->mb.e_mbd;
return 0;
}
-int vp9_set_active_map(VP8_PTR comp, unsigned char *map, unsigned int rows, unsigned int cols) {
+int vp9_set_active_map(VP8_PTR comp, unsigned char *map,
+ unsigned int rows, unsigned int cols) {
VP8_COMP *cpi = (VP8_COMP *) comp;
if (rows == cpi->common.mb_rows && cols == cpi->common.mb_cols) {
}
}
-int vp9_set_internal_size(VP8_PTR comp, VPX_SCALING horiz_mode, VPX_SCALING vert_mode) {
+int vp9_set_internal_size(VP8_PTR comp,
+ VPX_SCALING horiz_mode, VPX_SCALING vert_mode) {
VP8_COMP *cpi = (VP8_COMP *) comp;
if (horiz_mode <= ONETWO)
} VP8_COMP;
-void control_data_rate(VP8_COMP *cpi);
-
void vp9_encode_frame(VP8_COMP *cpi);
-void vp9_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned long *size);
+void vp9_pack_bitstream(VP8_COMP *cpi, unsigned char *dest,
+ unsigned long *size);
void vp9_activity_masking(VP8_COMP *cpi, MACROBLOCK *x);
-int rd_cost_intra_mb(MACROBLOCKD *x);
-
void vp9_tokenize_mb(VP8_COMP *, MACROBLOCKD *, TOKENEXTRA **, int dry_run);
void vp9_stuff_mb(VP8_COMP *cpi, MACROBLOCKD *xd, TOKENEXTRA **t, int dry_run);
#define IF_RTCD(x) NULL
#endif
-extern void
-(*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc,
- YV12_BUFFER_CONFIG *dst_ybc,
- int Fraction);
-
-extern void vp8_loop_filter_frame_segment
-(
- VP8_COMMON *cm,
- MACROBLOCKD *xd,
- int default_filt_lvl,
- int segment
-);
-
-void
-vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction) {
+extern void(*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc,
+ YV12_BUFFER_CONFIG *dst_ybc,
+ int fraction);
+
+void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc,
+ YV12_BUFFER_CONFIG *dst_ybc, int Fraction) {
unsigned char *src_y, *dst_y;
int yheight;
int ystride;
vpx_memcpy(dst_y, src_y, ystride * (linestocopy + 16));
}
+
static int vp8_calc_partial_ssl_err(YV12_BUFFER_CONFIG *source,
YV12_BUFFER_CONFIG *dest, int Fraction) {
int i, j;
return max_filter_level;
}
-void vp9cx_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) {
+void vp9_pick_filter_level_fast(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) {
VP8_COMMON *cm = &cpi->common;
int best_err = 0;
filt_err = vp8_calc_partial_ssl_err(sd, cm->frame_to_show, 3);
// Re-instate the unfiltered frame
- vp9_yv12_copy_partial_frame_ptr(&cpi->last_frame_uf, cm->frame_to_show, 3);
+ vp9_yv12_copy_partial_frame_ptr(&cpi->last_frame_uf,
+ cm->frame_to_show, 3);
// Update the best case record or exit loop.
if (filt_err < best_err) {
}
// Stub function for now Alt LF not used
-void vp9cx_set_alt_lf_level(VP8_COMP *cpi, int filt_val) {
+void vp9_set_alt_lf_level(VP8_COMP *cpi, int filt_val) {
}
-void vp9cx_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) {
+void vp9_pick_filter_level(YV12_BUFFER_CONFIG *sd, VP8_COMP *cpi) {
VP8_COMMON *cm = &cpi->common;
int best_err = 0;
filter_step = (filt_mid < 16) ? 4 : filt_mid / 4;
// Get baseline error score
- vp9cx_set_alt_lf_level(cpi, filt_mid);
+ vp9_set_alt_lf_level(cpi, filt_mid);
vp8_loop_filter_frame_yonly(cm, &cpi->mb.e_mbd, filt_mid);
best_err = vp9_calc_ss_err(sd, cm->frame_to_show);
if ((filt_direction <= 0) && (filt_low != filt_mid)) {
// Get Low filter error score
- vp9cx_set_alt_lf_level(cpi, filt_low);
+ vp9_set_alt_lf_level(cpi, filt_low);
vp8_loop_filter_frame_yonly(cm, &cpi->mb.e_mbd, filt_low);
filt_err = vp9_calc_ss_err(sd, cm->frame_to_show);
// Now look at filt_high
if ((filt_direction >= 0) && (filt_high != filt_mid)) {
- vp9cx_set_alt_lf_level(cpi, filt_high);
+ vp9_set_alt_lf_level(cpi, filt_high);
vp8_loop_filter_frame_yonly(cm, &cpi->mb.e_mbd, filt_high);
filt_err = vp9_calc_ss_err(sd, cm->frame_to_show);
* these two C functions if corresponding optimized routine is not available.
* NEON optimized version implements currently the fast quantization for pair
* of blocks. */
-void vp9_regular_quantize_b_4x4_pair(BLOCK *b1, BLOCK *b2, BLOCKD *d1, BLOCKD *d2) {
+void vp9_regular_quantize_b_4x4_pair(BLOCK *b1, BLOCK *b2,
+ BLOCKD *d1, BLOCKD *d2) {
vp9_regular_quantize_b_4x4(b1, d1);
vp9_regular_quantize_b_4x4(b2, d2);
}
*shift = l;
}
-void vp9cx_init_quantizer(VP8_COMP *cpi) {
+void vp9_init_quantizer(VP8_COMP *cpi) {
int i;
int quant_val;
int Q;
}
}
-void vp9cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x) {
+void vp9_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x) {
int i;
int QIndex;
MACROBLOCKD *xd = &x->e_mbd;
x->block[24].zbin_extra = (short)zbin_extra;
}
-void vp9cx_frame_init_quantizer(VP8_COMP *cpi) {
+void vp9_frame_init_quantizer(VP8_COMP *cpi) {
// Clear Zbin mode boost for default case
cpi->zbin_mode_boost = 0;
// MB level quantizer setup
- vp9cx_mb_init_quantizer(cpi, &cpi->mb);
+ vp9_mb_init_quantizer(cpi, &cpi->mb);
}
void vp9_set_quantizer(struct VP8_COMP *cpi, int Q) {
// quantizer has to be reinitialized if any delta_q changes.
// As there are not any here for now this is inactive code.
// if(update)
- // vp9cx_init_quantizer(cpi);
+ // vp9_init_quantizer(cpi);
}
extern prototype_quantize_mb(vp9_quantize_mby_16x16);
struct VP8_COMP;
+
extern void vp9_set_quantizer(struct VP8_COMP *cpi, int Q);
-extern void vp9cx_frame_init_quantizer(struct VP8_COMP *cpi);
+
+extern void vp9_frame_init_quantizer(struct VP8_COMP *cpi);
+
extern void vp9_update_zbin_extra(struct VP8_COMP *cpi, MACROBLOCK *x);
-extern void vp9cx_mb_init_quantizer(struct VP8_COMP *cpi, MACROBLOCK *x);
-extern void vp9cx_init_quantizer(struct VP8_COMP *cpi);
+
+extern void vp9_mb_init_quantizer(struct VP8_COMP *cpi, MACROBLOCK *x);
+
+extern void vp9_init_quantizer(struct VP8_COMP *cpi);
#endif
}
-void vp9_compute_frame_size_bounds(VP8_COMP *cpi, int *frame_under_shoot_limit, int *frame_over_shoot_limit) {
+void vp9_compute_frame_size_bounds(VP8_COMP *cpi, int *frame_under_shoot_limit,
+ int *frame_over_shoot_limit) {
// Set-up bounds on acceptable frame size:
if (cpi->oxcf.fixed_q >= 0) {
// Fixed Q scenario: frame size never outranges target (there is no target!)
extern void vp9_update_rate_correction_factors(VP8_COMP *cpi, int damp_var);
extern int vp9_regulate_q(VP8_COMP *cpi, int target_bits_per_frame);
extern void vp9_adjust_key_frame_context(VP8_COMP *cpi);
-extern void vp9_compute_frame_size_bounds(VP8_COMP *cpi, int *frame_under_shoot_limit, int *frame_over_shoot_limit);
+extern void vp9_compute_frame_size_bounds(VP8_COMP *cpi,
+ int *frame_under_shoot_limit,
+ int *frame_over_shoot_limit);
// return of 0 means drop frame
extern int vp9_pick_frame_size(VP8_COMP *cpi);
#define IF_RTCD(x) NULL
#endif
-extern void vp9cx_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x);
+extern void vp9_mb_init_quantizer(VP8_COMP *cpi, MACROBLOCK *x);
extern void vp9_update_zbin_extra(VP8_COMP *cpi, MACROBLOCK *x);
#define MAXF(a,b) (((a) > (b)) ? (a) : (b))
#endif
static void fill_token_costs(
- unsigned int (*c)[COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS],
- const vp8_prob(*p)[COEF_BANDS] [PREV_COEF_CONTEXTS] [ENTROPY_NODES],
+ unsigned int (*c)[COEF_BANDS][PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS],
+ const vp8_prob(*p)[COEF_BANDS][PREV_COEF_CONTEXTS][ENTROPY_NODES],
int block_type_counts) {
int i, j, k;
for (j = 0; j < COEF_BANDS; j++)
for (k = 0; k < PREV_COEF_CONTEXTS; k++) {
if (k == 0 && ((j > 0 && i > 0) || (j > 1 && i == 0)))
- vp9_cost_tokens_skip((int *)(c [i][j][k]),
- p [i][j][k],
+ vp9_cost_tokens_skip((int *)(c[i][j][k]),
+ p[i][j][k],
vp8_coef_tree);
else
- vp9_cost_tokens((int *)(c [i][j][k]),
- p [i][j][k],
+ vp9_cost_tokens((int *)(c[i][j][k]),
+ p[i][j][k],
vp8_coef_tree);
}
}
-static int rd_iifactor [ 32 ] = { 4, 4, 3, 2, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0,
- };
+static int rd_iifactor[32] = { 4, 4, 3, 2, 1, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, };
// 3* dc_qlookup[Q]*dc_qlookup[Q];
return (11 * q * q) >> 6;
}
-void vp9cx_initialize_me_consts(VP8_COMP *cpi, int QIndex) {
+void vp9_initialize_me_consts(VP8_COMP *cpi, int QIndex) {
cpi->mb.sadperbit16 = sad_per_bit16lut[QIndex];
cpi->mb.sadperbit4 = sad_per_bit4lut[QIndex];
}
return this_rd; // if 0, this will be re-calculated by caller
}
-void vp9_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int recon_uvoffset,
- int *returnrate, int *returndistortion, int64_t *returnintra) {
+void vp9_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x,
+ int recon_yoffset, int recon_uvoffset,
+ int *returnrate, int *returndistortion,
+ int64_t *returnintra) {
VP8_COMMON *cm = &cpi->common;
MACROBLOCKD *xd = &x->e_mbd;
union b_mode_info best_bmodes[16];
}
#endif
-void vp9cx_pick_mode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
- int recon_yoffset,
- int recon_uvoffset,
- int *totalrate, int *totaldist) {
+void vp9_pick_mode_inter_macroblock(VP8_COMP *cpi, MACROBLOCK *x,
+ int recon_yoffset,
+ int recon_uvoffset,
+ int *totalrate, int *totaldist) {
MACROBLOCKD *const xd = &x->e_mbd;
MB_MODE_INFO * mbmi = &x->e_mbd.mode_info_context->mbmi;
int rate, distortion;
#define RDCOST_8x8(RM,DM,R,D) ( ((128+((int64_t)R)*(RM)) >> 8) + ((int64_t)DM)*(D) )
extern void vp9_initialize_rd_consts(VP8_COMP *cpi, int Qvalue);
-extern void vp9_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset, int recon_uvoffset,
- int *returnrate, int *returndistortion, int64_t *returnintra);
-extern void vp9_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x, int *r, int *d);
-extern void vp9_rd_pick_intra_mode_sb(VP8_COMP *cpi, MACROBLOCK *x, int *r, int *d);
-
-extern void vp9_mv_pred
-(
- VP8_COMP *cpi,
- MACROBLOCKD *xd,
- const MODE_INFO *here,
- int_mv *mvp,
- int refframe,
- int *ref_frame_sign_bias,
- int *sr,
- int near_sadidx[]
-);
+
+extern void vp9_rd_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x,
+ int recon_yoffset, int recon_uvoffset,
+ int *returnrate, int *returndistortion,
+ int64_t *returnintra);
+
+extern void vp9_rd_pick_intra_mode(VP8_COMP *cpi, MACROBLOCK *x,
+ int *r, int *d);
+
+extern void vp9_rd_pick_intra_mode_sb(VP8_COMP *cpi, MACROBLOCK *x,
+ int *r, int *d);
+
+extern void vp9_mv_pred(VP8_COMP *cpi, MACROBLOCKD *xd,
+ const MODE_INFO *here, int_mv *mvp,
+ int refframe, int *ref_frame_sign_bias,
+ int *sr, int near_sadidx[]);
+
extern void vp9_init_me_luts();
-extern void vp9_set_mbmode_and_mvs(MACROBLOCK *x, MB_PREDICTION_MODE mb, int_mv *mv);
+
+extern void vp9_set_mbmode_and_mvs(MACROBLOCK *x,
+ MB_PREDICTION_MODE mb, int_mv *mv);
+
#endif
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 16);
}
-unsigned int vp9_sad8x8_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- int max_sad) {
-
+unsigned int vp9_sad8x8_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 8, 8);
}
-unsigned int vp9_sad16x8_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- int max_sad) {
-
+unsigned int vp9_sad16x8_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 16, 8);
-
}
-
-unsigned int vp9_sad8x16_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- int max_sad) {
-
+unsigned int vp9_sad8x16_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 8, 16);
}
-unsigned int vp9_sad4x4_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- int max_sad) {
-
+unsigned int vp9_sad4x4_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ int max_sad) {
return sad_mx_n_c(src_ptr, src_stride, ref_ptr, ref_stride, 4, 4);
}
int ref_stride,
unsigned int *sad_array
) {
- sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
+ sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr, ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride, 0x7fffffff);
}
void vp9_sad32x32x8_c(const unsigned char *src_ptr,
int ref_stride,
unsigned short *sad_array
) {
- sad_array[0] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
- sad_array[3] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 3, ref_stride, 0x7fffffff);
- sad_array[4] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 4, ref_stride, 0x7fffffff);
- sad_array[5] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 5, ref_stride, 0x7fffffff);
- sad_array[6] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 6, ref_stride, 0x7fffffff);
- sad_array[7] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride, ref_ptr + 7, ref_stride, 0x7fffffff);
+ sad_array[0] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr, ref_stride,
+ 0x7fffffff);
+ sad_array[1] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride,
+ 0x7fffffff);
+ sad_array[2] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride,
+ 0x7fffffff);
+ sad_array[3] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 3, ref_stride,
+ 0x7fffffff);
+ sad_array[4] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 4, ref_stride,
+ 0x7fffffff);
+ sad_array[5] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 5, ref_stride,
+ 0x7fffffff);
+ sad_array[6] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 6, ref_stride,
+ 0x7fffffff);
+ sad_array[7] = (unsigned short)vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr + 7, ref_stride,
+ 0x7fffffff);
}
-void vp9_sad16x16x3_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
+void vp9_sad16x16x3_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr, ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride, 0x7fffffff);
}
-void vp9_sad16x16x8_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned short *sad_array
-) {
- sad_array[0] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
- sad_array[3] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 3, ref_stride, 0x7fffffff);
- sad_array[4] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 4, ref_stride, 0x7fffffff);
- sad_array[5] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 5, ref_stride, 0x7fffffff);
- sad_array[6] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 6, ref_stride, 0x7fffffff);
- sad_array[7] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride, ref_ptr + 7, ref_stride, 0x7fffffff);
+void vp9_sad16x16x8_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned short *sad_array) {
+ sad_array[0] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr, ref_stride,
+ 0x7fffffff);
+ sad_array[1] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride,
+ 0x7fffffff);
+ sad_array[2] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride,
+ 0x7fffffff);
+ sad_array[3] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 3, ref_stride,
+ 0x7fffffff);
+ sad_array[4] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 4, ref_stride,
+ 0x7fffffff);
+ sad_array[5] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 5, ref_stride,
+ 0x7fffffff);
+ sad_array[6] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 6, ref_stride,
+ 0x7fffffff);
+ sad_array[7] = (unsigned short)vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr + 7, ref_stride,
+ 0x7fffffff);
}
-void vp9_sad16x8x3_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
+void vp9_sad16x8x3_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr, ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride, 0x7fffffff);
}
-void vp9_sad16x8x8_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned short *sad_array
-) {
- sad_array[0] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
- sad_array[3] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 3, ref_stride, 0x7fffffff);
- sad_array[4] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 4, ref_stride, 0x7fffffff);
- sad_array[5] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 5, ref_stride, 0x7fffffff);
- sad_array[6] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 6, ref_stride, 0x7fffffff);
- sad_array[7] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride, ref_ptr + 7, ref_stride, 0x7fffffff);
+void vp9_sad16x8x8_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned short *sad_array) {
+ sad_array[0] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr, ref_stride,
+ 0x7fffffff);
+ sad_array[1] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride,
+ 0x7fffffff);
+ sad_array[2] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride,
+ 0x7fffffff);
+ sad_array[3] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 3, ref_stride,
+ 0x7fffffff);
+ sad_array[4] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 4, ref_stride,
+ 0x7fffffff);
+ sad_array[5] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 5, ref_stride,
+ 0x7fffffff);
+ sad_array[6] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 6, ref_stride,
+ 0x7fffffff);
+ sad_array[7] = (unsigned short)vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr + 7, ref_stride,
+ 0x7fffffff);
}
-void vp9_sad8x8x3_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
+void vp9_sad8x8x3_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr, ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride, 0x7fffffff);
}
-void vp9_sad8x8x8_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned short *sad_array
-) {
- sad_array[0] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
- sad_array[3] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 3, ref_stride, 0x7fffffff);
- sad_array[4] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 4, ref_stride, 0x7fffffff);
- sad_array[5] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 5, ref_stride, 0x7fffffff);
- sad_array[6] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 6, ref_stride, 0x7fffffff);
- sad_array[7] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride, ref_ptr + 7, ref_stride, 0x7fffffff);
+void vp9_sad8x8x8_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned short *sad_array) {
+ sad_array[0] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr, ref_stride,
+ 0x7fffffff);
+ sad_array[1] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride,
+ 0x7fffffff);
+ sad_array[2] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride,
+ 0x7fffffff);
+ sad_array[3] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 3, ref_stride,
+ 0x7fffffff);
+ sad_array[4] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 4, ref_stride,
+ 0x7fffffff);
+ sad_array[5] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 5, ref_stride,
+ 0x7fffffff);
+ sad_array[6] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 6, ref_stride,
+ 0x7fffffff);
+ sad_array[7] = (unsigned short)vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr + 7, ref_stride,
+ 0x7fffffff);
}
-void vp9_sad8x16x3_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
+void vp9_sad8x16x3_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr, ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride, 0x7fffffff);
}
-void vp9_sad8x16x8_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned short *sad_array
-) {
- sad_array[0] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
- sad_array[3] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 3, ref_stride, 0x7fffffff);
- sad_array[4] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 4, ref_stride, 0x7fffffff);
- sad_array[5] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 5, ref_stride, 0x7fffffff);
- sad_array[6] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 6, ref_stride, 0x7fffffff);
- sad_array[7] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride, ref_ptr + 7, ref_stride, 0x7fffffff);
+void vp9_sad8x16x8_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned short *sad_array) {
+ sad_array[0] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr, ref_stride,
+ 0x7fffffff);
+ sad_array[1] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride,
+ 0x7fffffff);
+ sad_array[2] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride,
+ 0x7fffffff);
+ sad_array[3] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 3, ref_stride,
+ 0x7fffffff);
+ sad_array[4] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 4, ref_stride,
+ 0x7fffffff);
+ sad_array[5] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 5, ref_stride,
+ 0x7fffffff);
+ sad_array[6] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 6, ref_stride,
+ 0x7fffffff);
+ sad_array[7] = (unsigned short)vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr + 7, ref_stride,
+ 0x7fffffff);
}
-void vp9_sad4x4x3_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
+void vp9_sad4x4x3_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr, ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride, 0x7fffffff);
}
-void vp9_sad4x4x8_c(
- const unsigned char *src_ptr,
- int src_stride,
- const unsigned char *ref_ptr,
- int ref_stride,
- unsigned short *sad_array
-) {
- sad_array[0] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr, ref_stride, 0x7fffffff);
- sad_array[1] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 1, ref_stride, 0x7fffffff);
- sad_array[2] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 2, ref_stride, 0x7fffffff);
- sad_array[3] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 3, ref_stride, 0x7fffffff);
- sad_array[4] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 4, ref_stride, 0x7fffffff);
- sad_array[5] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 5, ref_stride, 0x7fffffff);
- sad_array[6] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 6, ref_stride, 0x7fffffff);
- sad_array[7] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride, ref_ptr + 7, ref_stride, 0x7fffffff);
+void vp9_sad4x4x8_c(const unsigned char *src_ptr,
+ int src_stride,
+ const unsigned char *ref_ptr,
+ int ref_stride,
+ unsigned short *sad_array) {
+ sad_array[0] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr, ref_stride,
+ 0x7fffffff);
+ sad_array[1] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 1, ref_stride,
+ 0x7fffffff);
+ sad_array[2] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 2, ref_stride,
+ 0x7fffffff);
+ sad_array[3] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 3, ref_stride,
+ 0x7fffffff);
+ sad_array[4] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 4, ref_stride,
+ 0x7fffffff);
+ sad_array[5] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 5, ref_stride,
+ 0x7fffffff);
+ sad_array[6] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 6, ref_stride,
+ 0x7fffffff);
+ sad_array[7] = (unsigned short)vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr + 7, ref_stride,
+ 0x7fffffff);
}
void vp9_sad32x32x4d_c(const unsigned char *src_ptr,
int ref_stride,
unsigned int *sad_array
) {
- sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride, ref_ptr[0], ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride, ref_ptr[1], ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad32x32_c(src_ptr, src_stride, ref_ptr[2], ref_stride, 0x7fffffff);
- sad_array[3] = vp9_sad32x32_c(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff);
+ sad_array[0] = vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr[0], ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr[1], ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr[2], ref_stride, 0x7fffffff);
+ sad_array[3] = vp9_sad32x32_c(src_ptr, src_stride,
+ ref_ptr[3], ref_stride, 0x7fffffff);
}
-void vp9_sad16x16x4d_c(
- const unsigned char *src_ptr,
- int src_stride,
- unsigned char *ref_ptr[],
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride, ref_ptr[0], ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad16x16_c(src_ptr, src_stride, ref_ptr[1], ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad16x16_c(src_ptr, src_stride, ref_ptr[2], ref_stride, 0x7fffffff);
- sad_array[3] = vp9_sad16x16_c(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff);
+void vp9_sad16x16x4d_c(const unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr[],
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr[0], ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr[1], ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr[2], ref_stride, 0x7fffffff);
+ sad_array[3] = vp9_sad16x16_c(src_ptr, src_stride,
+ ref_ptr[3], ref_stride, 0x7fffffff);
}
-void vp9_sad16x8x4d_c(
- const unsigned char *src_ptr,
- int src_stride,
- unsigned char *ref_ptr[],
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride, ref_ptr[0], ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad16x8_c(src_ptr, src_stride, ref_ptr[1], ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad16x8_c(src_ptr, src_stride, ref_ptr[2], ref_stride, 0x7fffffff);
- sad_array[3] = vp9_sad16x8_c(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff);
+void vp9_sad16x8x4d_c(const unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr[],
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr[0], ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr[1], ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr[2], ref_stride, 0x7fffffff);
+ sad_array[3] = vp9_sad16x8_c(src_ptr, src_stride,
+ ref_ptr[3], ref_stride, 0x7fffffff);
}
-void vp9_sad8x8x4d_c(
- const unsigned char *src_ptr,
- int src_stride,
- unsigned char *ref_ptr[],
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride, ref_ptr[0], ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad8x8_c(src_ptr, src_stride, ref_ptr[1], ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad8x8_c(src_ptr, src_stride, ref_ptr[2], ref_stride, 0x7fffffff);
- sad_array[3] = vp9_sad8x8_c(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff);
+void vp9_sad8x8x4d_c(const unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr[],
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr[0], ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr[1], ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr[2], ref_stride, 0x7fffffff);
+ sad_array[3] = vp9_sad8x8_c(src_ptr, src_stride,
+ ref_ptr[3], ref_stride, 0x7fffffff);
}
-void vp9_sad8x16x4d_c(
- const unsigned char *src_ptr,
- int src_stride,
- unsigned char *ref_ptr[],
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride, ref_ptr[0], ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad8x16_c(src_ptr, src_stride, ref_ptr[1], ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad8x16_c(src_ptr, src_stride, ref_ptr[2], ref_stride, 0x7fffffff);
- sad_array[3] = vp9_sad8x16_c(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff);
+void vp9_sad8x16x4d_c(const unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr[],
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr[0], ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr[1], ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr[2], ref_stride, 0x7fffffff);
+ sad_array[3] = vp9_sad8x16_c(src_ptr, src_stride,
+ ref_ptr[3], ref_stride, 0x7fffffff);
}
-void vp9_sad4x4x4d_c(
- const unsigned char *src_ptr,
- int src_stride,
- unsigned char *ref_ptr[],
- int ref_stride,
- unsigned int *sad_array
-) {
- sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride, ref_ptr[0], ref_stride, 0x7fffffff);
- sad_array[1] = vp9_sad4x4_c(src_ptr, src_stride, ref_ptr[1], ref_stride, 0x7fffffff);
- sad_array[2] = vp9_sad4x4_c(src_ptr, src_stride, ref_ptr[2], ref_stride, 0x7fffffff);
- sad_array[3] = vp9_sad4x4_c(src_ptr, src_stride, ref_ptr[3], ref_stride, 0x7fffffff);
+void vp9_sad4x4x4d_c(const unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *ref_ptr[],
+ int ref_stride,
+ unsigned int *sad_array) {
+ sad_array[0] = vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr[0], ref_stride, 0x7fffffff);
+ sad_array[1] = vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr[1], ref_stride, 0x7fffffff);
+ sad_array[2] = vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr[2], ref_stride, 0x7fffffff);
+ sad_array[3] = vp9_sad4x4_c(src_ptr, src_stride,
+ ref_ptr[3], ref_stride, 0x7fffffff);
}
/* Copy 2 macroblocks to a buffer */
-void vp9_copy32xn_c(
- unsigned char *src_ptr,
- int src_stride,
- unsigned char *dst_ptr,
- int dst_stride,
- int height) {
+void vp9_copy32xn_c(unsigned char *src_ptr,
+ int src_stride,
+ unsigned char *dst_ptr,
+ int dst_stride,
+ int height) {
int r;
for (r = 0; r < height; r++) {
#ifndef __INC_SEGMENTATION_H__
#define __INC_SEGMENTATION_H__ 1
-extern void vp9_update_gf_useage_maps(VP8_COMP *cpi, VP8_COMMON *cm, MACROBLOCK *x);
+extern void vp9_update_gf_useage_maps(VP8_COMP *cpi, VP8_COMMON *cm,
+ MACROBLOCK *x);
extern void vp9_enable_segmentation(VP8_PTR ptr);
extern void vp9_disable_segmentation(VP8_PTR ptr);
// Valid values for a segment are 0 to 3
// Segmentation map is arrange as [Rows][Columns]
-extern void vp9_set_segmentation_map(VP8_PTR ptr, unsigned char *segmentation_map);
+extern void vp9_set_segmentation_map(VP8_PTR ptr,
+ unsigned char *segmentation_map);
// The values given for each segment can be either deltas (from the default
// value chosen for the frame) or absolute values.
// abs_delta = SEGMENT_DELTADATA (deltas) abs_delta = SEGMENT_ABSDATA (use
// the absolute values given).
//
-extern void vp9_set_segment_data(VP8_PTR ptr, signed char *feature_data, unsigned char abs_delta);
+extern void vp9_set_segment_data(VP8_PTR ptr, signed char *feature_data,
+ unsigned char abs_delta);
extern void vp9_choose_segmap_coding_method(VP8_COMP *cpi);
#include "vp8/common/filter.h"
-unsigned int vp9_get_mb_ss_c
-(
- const short *src_ptr
-) {
- unsigned int i = 0, sum = 0;
+unsigned int vp9_get_mb_ss_c(const short *src_ptr) {
+ unsigned int i, sum = 0;
- do {
+ for (i = 0; i < 256; i++) {
sum += (src_ptr[i] * src_ptr[i]);
- i++;
- } while (i < 256);
+ }
return sum;
}
-static void variance(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- int w,
- int h,
- unsigned int *sse,
- int *sum) {
+static void variance(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ int w,
+ int h,
+ unsigned int *sse,
+ int *sum) {
int i, j;
int diff;
}
#endif
-unsigned int vp9_variance16x16_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance16x16_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
-
variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 16, &var, &avg);
*sse = var;
return (var - ((avg * avg) >> 8));
}
-unsigned int vp9_variance8x16_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance8x16_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
-
variance(src_ptr, source_stride, ref_ptr, recon_stride, 8, 16, &var, &avg);
*sse = var;
return (var - ((avg * avg) >> 7));
}
-unsigned int vp9_variance16x8_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance16x8_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
-
variance(src_ptr, source_stride, ref_ptr, recon_stride, 16, 8, &var, &avg);
*sse = var;
return (var - ((avg * avg) >> 7));
}
-unsigned int vp9_variance8x8_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance8x8_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
-
variance(src_ptr, source_stride, ref_ptr, recon_stride, 8, 8, &var, &avg);
*sse = var;
return (var - ((avg * avg) >> 6));
}
-unsigned int vp9_variance4x4_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance4x4_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
-
variance(src_ptr, source_stride, ref_ptr, recon_stride, 4, 4, &var, &avg);
*sse = var;
return (var - ((avg * avg) >> 4));
}
-unsigned int vp9_mse16x16_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_mse16x16_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
* to the next.
*
****************************************************************************/
-static void var_filter_block2d_bil_first_pass
-(
- const unsigned char *src_ptr,
- unsigned short *output_ptr,
- unsigned int src_pixels_per_line,
- int pixel_step,
- unsigned int output_height,
- unsigned int output_width,
- const short *vp8_filter
-) {
+static void var_filter_block2d_bil_first_pass(const unsigned char *src_ptr,
+ unsigned short *output_ptr,
+ unsigned int src_pixels_per_line,
+ int pixel_step,
+ unsigned int output_height,
+ unsigned int output_width,
+ const short *vp8_filter) {
unsigned int i, j;
for (i = 0; i < output_height; i++) {
* to the next.
*
****************************************************************************/
-static void var_filter_block2d_bil_second_pass
-(
- const unsigned short *src_ptr,
- unsigned char *output_ptr,
- unsigned int src_pixels_per_line,
- unsigned int pixel_step,
- unsigned int output_height,
- unsigned int output_width,
- const short *vp8_filter
-) {
+static void var_filter_block2d_bil_second_pass(const unsigned short *src_ptr,
+ unsigned char *output_ptr,
+ unsigned int src_pixels_per_line,
+ unsigned int pixel_step,
+ unsigned int output_height,
+ unsigned int output_width,
+ const short *vp8_filter) {
unsigned int i, j;
int Temp;
}
-unsigned int vp9_sub_pixel_variance4x4_c
-(
- const unsigned char *src_ptr,
- int src_pixels_per_line,
- int xoffset,
- int yoffset,
- const unsigned char *dst_ptr,
- int dst_pixels_per_line,
- unsigned int *sse
-) {
+unsigned int vp9_sub_pixel_variance4x4_c(const unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ const unsigned char *dst_ptr,
+ int dst_pixels_per_line,
+ unsigned int *sse) {
unsigned char temp2[20 * 16];
const short *HFilter, *VFilter;
unsigned short FData3[5 * 4]; // Temp data bufffer used in filtering
}
-unsigned int vp9_sub_pixel_variance8x8_c
-(
- const unsigned char *src_ptr,
- int src_pixels_per_line,
- int xoffset,
- int yoffset,
- const unsigned char *dst_ptr,
- int dst_pixels_per_line,
- unsigned int *sse
-) {
+unsigned int vp9_sub_pixel_variance8x8_c(const unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ const unsigned char *dst_ptr,
+ int dst_pixels_per_line,
+ unsigned int *sse) {
unsigned short FData3[9 * 8]; // Temp data bufffer used in filtering
unsigned char temp2[20 * 16];
const short *HFilter, *VFilter;
return vp9_variance8x8_c(temp2, 8, dst_ptr, dst_pixels_per_line, sse);
}
-unsigned int vp9_sub_pixel_variance16x16_c
-(
- const unsigned char *src_ptr,
- int src_pixels_per_line,
- int xoffset,
- int yoffset,
- const unsigned char *dst_ptr,
- int dst_pixels_per_line,
- unsigned int *sse
-) {
+unsigned int vp9_sub_pixel_variance16x16_c(const unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ const unsigned char *dst_ptr,
+ int dst_pixels_per_line,
+ unsigned int *sse) {
unsigned short FData3[17 * 16]; // Temp data bufffer used in filtering
unsigned char temp2[20 * 16];
const short *HFilter, *VFilter;
}
#endif
-unsigned int vp9_variance_halfpixvar16x16_h_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance_halfpixvar16x16_h_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
return vp9_sub_pixel_variance16x16_c(src_ptr, source_stride, 8, 0,
ref_ptr, recon_stride, sse);
}
}
#if CONFIG_SUPERBLOCKS
-unsigned int vp9_variance_halfpixvar32x32_v_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance_halfpixvar32x32_v_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
return vp9_sub_pixel_variance32x32_c(src_ptr, source_stride, 0, 8,
ref_ptr, recon_stride, sse);
}
#endif
-unsigned int vp9_variance_halfpixvar16x16_hv_c(
- const unsigned char *src_ptr,
- int source_stride,
- const unsigned char *ref_ptr,
- int recon_stride,
- unsigned int *sse) {
+unsigned int vp9_variance_halfpixvar16x16_hv_c(const unsigned char *src_ptr,
+ int source_stride,
+ const unsigned char *ref_ptr,
+ int recon_stride,
+ unsigned int *sse) {
return vp9_sub_pixel_variance16x16_c(src_ptr, source_stride, 8, 8,
ref_ptr, recon_stride, sse);
}
}
#endif
-unsigned int vp9_sub_pixel_mse16x16_c
-(
- const unsigned char *src_ptr,
- int src_pixels_per_line,
- int xoffset,
- int yoffset,
- const unsigned char *dst_ptr,
- int dst_pixels_per_line,
- unsigned int *sse
-) {
- vp9_sub_pixel_variance16x16_c(src_ptr, src_pixels_per_line, xoffset, yoffset, dst_ptr, dst_pixels_per_line, sse);
+unsigned int vp9_sub_pixel_mse16x16_c(const unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ const unsigned char *dst_ptr,
+ int dst_pixels_per_line,
+ unsigned int *sse) {
+ vp9_sub_pixel_variance16x16_c(src_ptr, src_pixels_per_line,
+ xoffset, yoffset, dst_ptr,
+ dst_pixels_per_line, sse);
return *sse;
}
const unsigned char *dst_ptr,
int dst_pixels_per_line,
unsigned int *sse) {
- vp9_sub_pixel_variance32x32_c(src_ptr, src_pixels_per_line, xoffset, yoffset, dst_ptr, dst_pixels_per_line, sse);
+ vp9_sub_pixel_variance32x32_c(src_ptr, src_pixels_per_line,
+ xoffset, yoffset, dst_ptr,
+ dst_pixels_per_line, sse);
return *sse;
}
#endif
-unsigned int vp9_sub_pixel_variance16x8_c
-(
- const unsigned char *src_ptr,
- int src_pixels_per_line,
- int xoffset,
- int yoffset,
- const unsigned char *dst_ptr,
- int dst_pixels_per_line,
- unsigned int *sse
-) {
+unsigned int vp9_sub_pixel_variance16x8_c(const unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ const unsigned char *dst_ptr,
+ int dst_pixels_per_line,
+ unsigned int *sse) {
unsigned short FData3[16 * 9]; // Temp data bufffer used in filtering
unsigned char temp2[20 * 16];
const short *HFilter, *VFilter;
return vp9_variance16x8_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse);
}
-unsigned int vp9_sub_pixel_variance8x16_c
-(
- const unsigned char *src_ptr,
- int src_pixels_per_line,
- int xoffset,
- int yoffset,
- const unsigned char *dst_ptr,
- int dst_pixels_per_line,
- unsigned int *sse
-) {
+unsigned int vp9_sub_pixel_variance8x16_c(const unsigned char *src_ptr,
+ int src_pixels_per_line,
+ int xoffset,
+ int yoffset,
+ const unsigned char *dst_ptr,
+ int dst_pixels_per_line,
+ unsigned int *sse) {
unsigned short FData3[9 * 16]; // Temp data bufffer used in filtering
unsigned char temp2[20 * 16];
const short *HFilter, *VFilter;
-
HFilter = vp8_bilinear_filters[xoffset];
VFilter = vp8_bilinear_filters[yoffset];
-
- var_filter_block2d_bil_first_pass(src_ptr, FData3, src_pixels_per_line, 1, 17, 8, HFilter);
+ var_filter_block2d_bil_first_pass(src_ptr, FData3, src_pixels_per_line,
+ 1, 17, 8, HFilter);
var_filter_block2d_bil_second_pass(FData3, temp2, 8, 8, 16, 8, VFilter);
return vp9_variance8x16_c(temp2, 8, dst_ptr, dst_pixels_per_line, sse);
}
+
#if CONFIG_NEWBESTREFMV
-unsigned int vp8_variance2x16_c(
- const unsigned char *src_ptr,
- const int source_stride,
- const unsigned char *ref_ptr,
- const int recon_stride,
- unsigned int *sse) {
+unsigned int vp8_variance2x16_c(const unsigned char *src_ptr,
+ const int source_stride,
+ const unsigned char *ref_ptr,
+ const int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
return (var - ((avg * avg) >> 5));
}
-unsigned int vp8_variance16x2_c(
- const unsigned char *src_ptr,
- const int source_stride,
- const unsigned char *ref_ptr,
- const int recon_stride,
- unsigned int *sse) {
+unsigned int vp8_variance16x2_c(const unsigned char *src_ptr,
+ const int source_stride,
+ const unsigned char *ref_ptr,
+ const int recon_stride,
+ unsigned int *sse) {
unsigned int var;
int avg;
return (var - ((avg * avg) >> 5));
}
-unsigned int vp8_sub_pixel_variance16x2_c
-(
- const unsigned char *src_ptr,
- const int src_pixels_per_line,
- const int xoffset,
- const int yoffset,
- const unsigned char *dst_ptr,
- const int dst_pixels_per_line,
- unsigned int *sse
-) {
+unsigned int vp8_sub_pixel_variance16x2_c(const unsigned char *src_ptr,
+ const int src_pixels_per_line,
+ const int xoffset,
+ const int yoffset,
+ const unsigned char *dst_ptr,
+ const int dst_pixels_per_line,
+ unsigned int *sse) {
unsigned short FData3[16 * 3]; // Temp data bufffer used in filtering
unsigned char temp2[20 * 16];
const short *HFilter, *VFilter;
return vp8_variance16x2_c(temp2, 16, dst_ptr, dst_pixels_per_line, sse);
}
-unsigned int vp8_sub_pixel_variance2x16_c
-(
- const unsigned char *src_ptr,
- const int src_pixels_per_line,
- const int xoffset,
- const int yoffset,
- const unsigned char *dst_ptr,
- const int dst_pixels_per_line,
- unsigned int *sse
-) {
+unsigned int vp8_sub_pixel_variance2x16_c(const unsigned char *src_ptr,
+ const int src_pixels_per_line,
+ const int xoffset,
+ const int yoffset,
+ const unsigned char *dst_ptr,
+ const int dst_pixels_per_line,
+ unsigned int *sse) {
unsigned short FData3[2 * 17]; // Temp data bufffer used in filtering
unsigned char temp2[2 * 16];
const short *HFilter, *VFilter;
}
-int vp9_reverse_trans(int);
+int vp9_reverse_trans(int q);
static vpx_codec_err_t get_param(vpx_codec_alg_priv_t *ctx,
switch (ctrl_id) {
MAP(VP8E_GET_LAST_QUANTIZER, vp9_get_quantizer(ctx->cpi));
- MAP(VP8E_GET_LAST_QUANTIZER_64, vp9_reverse_trans(vp9_get_quantizer(ctx->cpi)));
+ MAP(VP8E_GET_LAST_QUANTIZER_64,
+ vp9_reverse_trans(vp9_get_quantizer(ctx->cpi)));
}
return VPX_CODEC_OK;
priv->deprecated_mode = NO_MODE_SET;
- vp9_initialize();
+ vp9_initialize_enc();
res = validate_config(priv, &priv->cfg, &priv->vp8_cfg);
cx_data_sz = ctx->cx_data_sz;
lib_flags = 0;
- while (cx_data_sz >= ctx->cx_data_sz / 2
- && -1 != vp9_get_compressed_data(ctx->cpi, &lib_flags, &size, cx_data, &dst_time_stamp, &dst_end_time_stamp, !img)) {
+ while (cx_data_sz >= ctx->cx_data_sz / 2 &&
+ -1 != vp9_get_compressed_data(ctx->cpi, &lib_flags, &size,
+ cx_data, &dst_time_stamp,
+ &dst_end_time_stamp, !img)) {
if (size) {
vpx_codec_pts_t round, delta;
vpx_codec_cx_pkt_t pkt;
YV12_BUFFER_CONFIG sd;
image2yuvconfig(&frame->img, &sd);
- vp9_set_reference(ctx->cpi, frame->frame_type, &sd);
+ vp9_set_reference_enc(ctx->cpi, frame->frame_type, &sd);
return VPX_CODEC_OK;
} else
return VPX_CODEC_INVALID_PARAM;
YV12_BUFFER_CONFIG sd;
image2yuvconfig(&frame->img, &sd);
- vp9_get_reference(ctx->cpi, frame->frame_type, &sd);
+ vp9_get_reference_enc(ctx->cpi, frame->frame_type, &sd);
return VPX_CODEC_OK;
} else
return VPX_CODEC_INVALID_PARAM;
if (data) {
vpx_roi_map_t *roi = (vpx_roi_map_t *)data;
- if (!vp9_set_roimap(ctx->cpi, roi->roi_map, roi->rows, roi->cols, roi->delta_q, roi->delta_lf, roi->static_threshold))
+ if (!vp9_set_roimap(ctx->cpi, roi->roi_map, roi->rows, roi->cols,
+ roi->delta_q, roi->delta_lf, roi->static_threshold))
return VPX_CODEC_OK;
else
return VPX_CODEC_INVALID_PARAM;
if (data) {
int res;
vpx_scaling_mode_t scalemode = *(vpx_scaling_mode_t *)data;
- res = vp9_set_internal_size(ctx->cpi, scalemode.h_scaling_mode, scalemode.v_scaling_mode);
+ res = vp9_set_internal_size(ctx->cpi, scalemode.h_scaling_mode,
+ scalemode.v_scaling_mode);
if (!res) {
/*force next frame a key frame to effect scaling mode */