int vp8_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest, const vp8_variance_rtcd_vtable_t *rtcd);
int vp8_calc_low_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest, const vp8_variance_rtcd_vtable_t *rtcd);
-extern void vp8cx_temp_filter_c(VP8_COMP *cpi);
+extern void vp8_temporal_filter_prepare_c(VP8_COMP *cpi);
static void set_default_lf_deltas(VP8_COMP *cpi);
{
int thiserr;
cpi->oxcf.arnr_strength = i;
- vp8cx_temp_filter_c(cpi);
+ vp8_temporal_filter_prepare_c(cpi);
thiserr = vp8_calc_low_ss_err(&cpi->alt_ref_buffer.source_buffer,
&cpi->src_buffer[start_frame].source_buffer, IF_RTCD(&cpi->rtcd.variance));
if (besti != -1)
{
cpi->oxcf.arnr_strength = besti;
- vp8cx_temp_filter_c(cpi);
+ vp8_temporal_filter_prepare_c(cpi);
s = &cpi->alt_ref_buffer;
// FWG not sure if I need to copy this data for the Alt Ref frame
s = &cpi->src_buffer[cpi->last_alt_ref_sei];
#else
- vp8cx_temp_filter_c(cpi);
+ vp8_temporal_filter_prepare_c(cpi);
s = &cpi->alt_ref_buffer;
// FWG not sure if I need to copy this data for the Alt Ref frame
{16, 16, 16, 16, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 5, 4, 2, 1}
};
#endif
-static void build_predictors_mb
+static void vp8_temporal_filter_predictors_mb_c
(
MACROBLOCKD *x,
unsigned char *y_mb_ptr,
RECON_INVOKE(&x->rtcd->recon, copy8x8)(vptr, stride, &pred[320], 8);
}
}
-void vp8_apply_temporal_filter_c
+void vp8_temporal_filter_apply_c
(
unsigned char *frame1,
unsigned int stride,
#if ALT_REF_MC_ENABLED
static int dummy_cost[2*mv_max+1];
-static int find_matching_mb
+static int vp8_temporal_filter_find_matching_mb_c
(
VP8_COMP *cpi,
YV12_BUFFER_CONFIG *arf_frame,
}
#endif
-static void vp8cx_temp_blur1_c
+static void vp8_temporal_filter_iterate_c
(
VP8_COMP *cpi,
int frame_count,
#define THRESH_HIGH 20000
// Correlation has been lost try MC
- err = find_matching_mb ( cpi,
- cpi->frames[alt_ref_index],
- cpi->frames[frame],
- mb_y_offset,
- THRESH_LOW );
+ err = vp8_temporal_filter_find_matching_mb_c
+ (cpi,
+ cpi->frames[alt_ref_index],
+ cpi->frames[frame],
+ mb_y_offset,
+ THRESH_LOW);
if (filter_weight[frame] < 2)
{
if (filter_weight[frame] != 0)
{
// Construct the predictors
- build_predictors_mb (
- mbd,
- cpi->frames[frame]->y_buffer + mb_y_offset,
- cpi->frames[frame]->u_buffer + mb_uv_offset,
- cpi->frames[frame]->v_buffer + mb_uv_offset,
- cpi->frames[frame]->y_stride,
- mbd->block[0].bmi.mv.as_mv.row,
- mbd->block[0].bmi.mv.as_mv.col,
- predictor );
+ vp8_temporal_filter_predictors_mb_c
+ (mbd,
+ cpi->frames[frame]->y_buffer + mb_y_offset,
+ cpi->frames[frame]->u_buffer + mb_uv_offset,
+ cpi->frames[frame]->v_buffer + mb_uv_offset,
+ cpi->frames[frame]->y_stride,
+ mbd->block[0].bmi.mv.as_mv.row,
+ mbd->block[0].bmi.mv.as_mv.col,
+ predictor);
// Apply the filter (YUV)
- TEMPORAL_INVOKE(&cpi->rtcd.temporal, filter)
+ TEMPORAL_INVOKE(&cpi->rtcd.temporal, apply)
(f->y_buffer + mb_y_offset,
f->y_stride,
predictor,
accumulator,
count);
- TEMPORAL_INVOKE(&cpi->rtcd.temporal, filter)
+ TEMPORAL_INVOKE(&cpi->rtcd.temporal, apply)
(f->u_buffer + mb_uv_offset,
f->uv_stride,
predictor + 256,
accumulator + 256,
count + 256);
- TEMPORAL_INVOKE(&cpi->rtcd.temporal, filter)
+ TEMPORAL_INVOKE(&cpi->rtcd.temporal, apply)
(f->v_buffer + mb_uv_offset,
f->uv_stride,
predictor + 320,
mbd->pre.v_buffer = v_buffer;
}
-void vp8cx_temp_filter_c
+void vp8_temporal_filter_prepare_c
(
VP8_COMP *cpi
)
= &cpi->src_buffer[which_buffer].source_buffer;
}
- vp8cx_temp_blur1_c (
+ vp8_temporal_filter_iterate_c (
cpi,
frames_to_blur,
frames_to_blur_backward,
#ifndef __INC_VP8_TEMPORAL_FILTER_H
#define __INC_VP8_TEMPORAL_FILTER_H
-#define prototype_filter(sym)\
+#define prototype_apply(sym)\
void (sym) \
( \
unsigned char *frame1, \
unsigned int *count \
)
-#ifndef vp8_temporal_filter
-#define vp8_temporal_filter vp8_apply_temporal_filter_c
+#ifndef vp8_temporal_filter_apply
+#define vp8_temporal_filter_apply vp8_temporal_filter_apply_c
#endif
-extern prototype_filter(vp8_temporal_filter);
+extern prototype_apply(vp8_temporal_filter_apply);
typedef struct
{
- prototype_filter(*filter);
+ prototype_apply(*apply);
} vp8_temporal_rtcd_vtable_t;
#if CONFIG_RUNTIME_CPU_DETECT
#define TEMPORAL_INVOKE(ctx,fn) (ctx)->fn
#else
-#define TEMPORAL_INVOKE(ctx,fn) vp8_temporal_##fn
+#define TEMPORAL_INVOKE(ctx,fn) vp8_temporal_filter_##fn
#endif
#endif // __INC_VP8_TEMPORAL_FILTER_H