temporal filter naming changes

be more consistant with the naming pattern, especially wrt rtcd

Change-Id: I3df50686a09f1dab0a9620b5adbb8a1577b40f2f
This commit is contained in:
Johann 2010-11-30 10:23:43 -05:00
parent 092b5bef37
commit 4b6219cb33
4 changed files with 35 additions and 34 deletions

View File

@ -95,7 +95,7 @@ void vp8_cmachine_specific_config(VP8_COMP *cpi)
cpi->rtcd.search.full_search = vp8_full_search_sad; cpi->rtcd.search.full_search = vp8_full_search_sad;
cpi->rtcd.search.diamond_search = vp8_diamond_search_sad; cpi->rtcd.search.diamond_search = vp8_diamond_search_sad;
cpi->rtcd.temporal.filter = vp8_apply_temporal_filter_c; cpi->rtcd.temporal.apply = vp8_temporal_filter_apply_c;
#endif #endif
// Pure C: // Pure C:

View File

@ -73,7 +73,7 @@ int vp8_estimate_entropy_savings(VP8_COMP *cpi);
int vp8_calc_ss_err(YV12_BUFFER_CONFIG *source, YV12_BUFFER_CONFIG *dest, const vp8_variance_rtcd_vtable_t *rtcd); 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); 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); static void set_default_lf_deltas(VP8_COMP *cpi);
@ -4971,7 +4971,7 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
{ {
int thiserr; int thiserr;
cpi->oxcf.arnr_strength = i; 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, thiserr = vp8_calc_low_ss_err(&cpi->alt_ref_buffer.source_buffer,
&cpi->src_buffer[start_frame].source_buffer, IF_RTCD(&cpi->rtcd.variance)); &cpi->src_buffer[start_frame].source_buffer, IF_RTCD(&cpi->rtcd.variance));
@ -4986,7 +4986,7 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
if (besti != -1) if (besti != -1)
{ {
cpi->oxcf.arnr_strength = besti; cpi->oxcf.arnr_strength = besti;
vp8cx_temp_filter_c(cpi); vp8_temporal_filter_prepare_c(cpi);
s = &cpi->alt_ref_buffer; s = &cpi->alt_ref_buffer;
// FWG not sure if I need to copy this data for the Alt Ref frame // FWG not sure if I need to copy this data for the Alt Ref frame
@ -4998,7 +4998,7 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
s = &cpi->src_buffer[cpi->last_alt_ref_sei]; s = &cpi->src_buffer[cpi->last_alt_ref_sei];
#else #else
vp8cx_temp_filter_c(cpi); vp8_temporal_filter_prepare_c(cpi);
s = &cpi->alt_ref_buffer; s = &cpi->alt_ref_buffer;
// FWG not sure if I need to copy this data for the Alt Ref frame // FWG not sure if I need to copy this data for the Alt Ref frame

View File

@ -59,7 +59,7 @@ static int modifier_lut[7][19] =
{16, 16, 16, 16, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 5, 4, 2, 1} {16, 16, 16, 16, 15, 15, 14, 14, 13, 12, 11, 10, 9, 8, 7, 5, 4, 2, 1}
}; };
#endif #endif
static void build_predictors_mb static void vp8_temporal_filter_predictors_mb_c
( (
MACROBLOCKD *x, MACROBLOCKD *x,
unsigned char *y_mb_ptr, unsigned char *y_mb_ptr,
@ -111,7 +111,7 @@ static void build_predictors_mb
RECON_INVOKE(&x->rtcd->recon, copy8x8)(vptr, stride, &pred[320], 8); 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 char *frame1,
unsigned int stride, unsigned int stride,
@ -171,7 +171,7 @@ void vp8_apply_temporal_filter_c
#if ALT_REF_MC_ENABLED #if ALT_REF_MC_ENABLED
static int dummy_cost[2*mv_max+1]; 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, VP8_COMP *cpi,
YV12_BUFFER_CONFIG *arf_frame, YV12_BUFFER_CONFIG *arf_frame,
@ -308,7 +308,7 @@ static int find_matching_mb
} }
#endif #endif
static void vp8cx_temp_blur1_c static void vp8_temporal_filter_iterate_c
( (
VP8_COMP *cpi, VP8_COMP *cpi,
int frame_count, int frame_count,
@ -412,11 +412,12 @@ static void vp8cx_temp_blur1_c
#define THRESH_HIGH 20000 #define THRESH_HIGH 20000
// Correlation has been lost try MC // Correlation has been lost try MC
err = find_matching_mb ( cpi, err = vp8_temporal_filter_find_matching_mb_c
cpi->frames[alt_ref_index], (cpi,
cpi->frames[frame], cpi->frames[alt_ref_index],
mb_y_offset, cpi->frames[frame],
THRESH_LOW ); mb_y_offset,
THRESH_LOW);
if (filter_weight[frame] < 2) if (filter_weight[frame] < 2)
{ {
@ -429,18 +430,18 @@ static void vp8cx_temp_blur1_c
if (filter_weight[frame] != 0) if (filter_weight[frame] != 0)
{ {
// Construct the predictors // Construct the predictors
build_predictors_mb ( vp8_temporal_filter_predictors_mb_c
mbd, (mbd,
cpi->frames[frame]->y_buffer + mb_y_offset, cpi->frames[frame]->y_buffer + mb_y_offset,
cpi->frames[frame]->u_buffer + mb_uv_offset, cpi->frames[frame]->u_buffer + mb_uv_offset,
cpi->frames[frame]->v_buffer + mb_uv_offset, cpi->frames[frame]->v_buffer + mb_uv_offset,
cpi->frames[frame]->y_stride, cpi->frames[frame]->y_stride,
mbd->block[0].bmi.mv.as_mv.row, mbd->block[0].bmi.mv.as_mv.row,
mbd->block[0].bmi.mv.as_mv.col, mbd->block[0].bmi.mv.as_mv.col,
predictor ); predictor);
// Apply the filter (YUV) // Apply the filter (YUV)
TEMPORAL_INVOKE(&cpi->rtcd.temporal, filter) TEMPORAL_INVOKE(&cpi->rtcd.temporal, apply)
(f->y_buffer + mb_y_offset, (f->y_buffer + mb_y_offset,
f->y_stride, f->y_stride,
predictor, predictor,
@ -450,7 +451,7 @@ static void vp8cx_temp_blur1_c
accumulator, accumulator,
count); count);
TEMPORAL_INVOKE(&cpi->rtcd.temporal, filter) TEMPORAL_INVOKE(&cpi->rtcd.temporal, apply)
(f->u_buffer + mb_uv_offset, (f->u_buffer + mb_uv_offset,
f->uv_stride, f->uv_stride,
predictor + 256, predictor + 256,
@ -460,7 +461,7 @@ static void vp8cx_temp_blur1_c
accumulator + 256, accumulator + 256,
count + 256); count + 256);
TEMPORAL_INVOKE(&cpi->rtcd.temporal, filter) TEMPORAL_INVOKE(&cpi->rtcd.temporal, apply)
(f->v_buffer + mb_uv_offset, (f->v_buffer + mb_uv_offset,
f->uv_stride, f->uv_stride,
predictor + 320, predictor + 320,
@ -537,7 +538,7 @@ static void vp8cx_temp_blur1_c
mbd->pre.v_buffer = v_buffer; mbd->pre.v_buffer = v_buffer;
} }
void vp8cx_temp_filter_c void vp8_temporal_filter_prepare_c
( (
VP8_COMP *cpi VP8_COMP *cpi
) )
@ -645,7 +646,7 @@ void vp8cx_temp_filter_c
= &cpi->src_buffer[which_buffer].source_buffer; = &cpi->src_buffer[which_buffer].source_buffer;
} }
vp8cx_temp_blur1_c ( vp8_temporal_filter_iterate_c (
cpi, cpi,
frames_to_blur, frames_to_blur,
frames_to_blur_backward, frames_to_blur_backward,

View File

@ -12,7 +12,7 @@
#ifndef __INC_VP8_TEMPORAL_FILTER_H #ifndef __INC_VP8_TEMPORAL_FILTER_H
#define __INC_VP8_TEMPORAL_FILTER_H #define __INC_VP8_TEMPORAL_FILTER_H
#define prototype_filter(sym)\ #define prototype_apply(sym)\
void (sym) \ void (sym) \
( \ ( \
unsigned char *frame1, \ unsigned char *frame1, \
@ -25,20 +25,20 @@
unsigned int *count \ unsigned int *count \
) )
#ifndef vp8_temporal_filter #ifndef vp8_temporal_filter_apply
#define vp8_temporal_filter vp8_apply_temporal_filter_c #define vp8_temporal_filter_apply vp8_temporal_filter_apply_c
#endif #endif
extern prototype_filter(vp8_temporal_filter); extern prototype_apply(vp8_temporal_filter_apply);
typedef struct typedef struct
{ {
prototype_filter(*filter); prototype_apply(*apply);
} vp8_temporal_rtcd_vtable_t; } vp8_temporal_rtcd_vtable_t;
#if CONFIG_RUNTIME_CPU_DETECT #if CONFIG_RUNTIME_CPU_DETECT
#define TEMPORAL_INVOKE(ctx,fn) (ctx)->fn #define TEMPORAL_INVOKE(ctx,fn) (ctx)->fn
#else #else
#define TEMPORAL_INVOKE(ctx,fn) vp8_temporal_##fn #define TEMPORAL_INVOKE(ctx,fn) vp8_temporal_filter_##fn
#endif #endif
#endif // __INC_VP8_TEMPORAL_FILTER_H #endif // __INC_VP8_TEMPORAL_FILTER_H