Commit 7c6a49ba authored by Yunqing Wang's avatar Yunqing Wang Committed by Gerrit Code Review
Browse files

Merge "Rename a loopfilter parameter"

parents f1761a74 11a9366e
...@@ -1244,12 +1244,12 @@ void vp9_loop_filter_rows(const YV12_BUFFER_CONFIG *frame_buffer, ...@@ -1244,12 +1244,12 @@ void vp9_loop_filter_rows(const YV12_BUFFER_CONFIG *frame_buffer,
void vp9_loop_filter_frame(VP9_COMMON *cm, MACROBLOCKD *xd, void vp9_loop_filter_frame(VP9_COMMON *cm, MACROBLOCKD *xd,
int frame_filter_level, int frame_filter_level,
int y_only, int partial) { int y_only, int partial_frame) {
int start_mi_row, end_mi_row, mi_rows_to_filter; int start_mi_row, end_mi_row, mi_rows_to_filter;
if (!frame_filter_level) return; if (!frame_filter_level) return;
start_mi_row = 0; start_mi_row = 0;
mi_rows_to_filter = cm->mi_rows; mi_rows_to_filter = cm->mi_rows;
if (partial && cm->mi_rows > 8) { if (partial_frame && cm->mi_rows > 8) {
start_mi_row = cm->mi_rows >> 1; start_mi_row = cm->mi_rows >> 1;
start_mi_row &= 0xfffffff8; start_mi_row &= 0xfffffff8;
mi_rows_to_filter = MAX(cm->mi_rows / 8, 8); mi_rows_to_filter = MAX(cm->mi_rows / 8, 8);
......
...@@ -107,7 +107,7 @@ void vp9_loop_filter_frame_init(struct VP9Common *cm, int default_filt_lvl); ...@@ -107,7 +107,7 @@ void vp9_loop_filter_frame_init(struct VP9Common *cm, int default_filt_lvl);
void vp9_loop_filter_frame(struct VP9Common *cm, void vp9_loop_filter_frame(struct VP9Common *cm,
struct macroblockd *mbd, struct macroblockd *mbd,
int filter_level, int filter_level,
int y_only, int partial); int y_only, int partial_frame);
// Apply the loop filter to [start, stop) macro block rows in frame_buffer. // Apply the loop filter to [start, stop) macro block rows in frame_buffer.
void vp9_loop_filter_rows(const YV12_BUFFER_CONFIG *frame_buffer, void vp9_loop_filter_rows(const YV12_BUFFER_CONFIG *frame_buffer,
......
...@@ -134,7 +134,7 @@ void vp9_loop_filter_frame_mt(VP9D_COMP *pbi, ...@@ -134,7 +134,7 @@ void vp9_loop_filter_frame_mt(VP9D_COMP *pbi,
VP9_COMMON *cm, VP9_COMMON *cm,
MACROBLOCKD *xd, MACROBLOCKD *xd,
int frame_filter_level, int frame_filter_level,
int y_only, int partial) { int y_only, int partial_frame) {
// Number of superblock rows and cols // Number of superblock rows and cols
const int sb_rows = mi_cols_aligned_to_sb(cm->mi_rows) >> MI_BLOCK_SIZE_LOG2; const int sb_rows = mi_cols_aligned_to_sb(cm->mi_rows) >> MI_BLOCK_SIZE_LOG2;
int i; int i;
......
...@@ -55,6 +55,6 @@ void vp9_loop_filter_frame_mt(struct VP9Decompressor *pbi, ...@@ -55,6 +55,6 @@ void vp9_loop_filter_frame_mt(struct VP9Decompressor *pbi,
struct VP9Common *cm, struct VP9Common *cm,
struct macroblockd *xd, struct macroblockd *xd,
int frame_filter_level, int frame_filter_level,
int y_only, int partial); int y_only, int partial_frame);
#endif // VP9_DECODER_VP9_DTHREAD_H_ #endif // VP9_DECODER_VP9_DTHREAD_H_
...@@ -36,11 +36,11 @@ void vp9_set_alt_lf_level(VP9_COMP *cpi, int filt_val) { ...@@ -36,11 +36,11 @@ void vp9_set_alt_lf_level(VP9_COMP *cpi, int filt_val) {
static int try_filter_frame(const YV12_BUFFER_CONFIG *sd, VP9_COMP *const cpi, static int try_filter_frame(const YV12_BUFFER_CONFIG *sd, VP9_COMP *const cpi,
MACROBLOCKD *const xd, VP9_COMMON *const cm, MACROBLOCKD *const xd, VP9_COMMON *const cm,
int filt_level, int partial) { int filt_level, int partial_frame) {
int filt_err; int filt_err;
vp9_set_alt_lf_level(cpi, filt_level); vp9_set_alt_lf_level(cpi, filt_level);
vp9_loop_filter_frame(cm, xd, filt_level, 1, partial); vp9_loop_filter_frame(cm, xd, filt_level, 1, partial_frame);
filt_err = vp9_calc_ss_err(sd, cm->frame_to_show); filt_err = vp9_calc_ss_err(sd, cm->frame_to_show);
...@@ -51,7 +51,7 @@ static int try_filter_frame(const YV12_BUFFER_CONFIG *sd, VP9_COMP *const cpi, ...@@ -51,7 +51,7 @@ static int try_filter_frame(const YV12_BUFFER_CONFIG *sd, VP9_COMP *const cpi,
} }
static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
int partial) { int partial_frame) {
MACROBLOCKD *const xd = &cpi->mb.e_mbd; MACROBLOCKD *const xd = &cpi->mb.e_mbd;
VP9_COMMON *const cm = &cpi->common; VP9_COMMON *const cm = &cpi->common;
struct loopfilter *const lf = &cm->lf; struct loopfilter *const lf = &cm->lf;
...@@ -73,7 +73,7 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, ...@@ -73,7 +73,7 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
// Make a copy of the unfiltered / processed recon buffer // Make a copy of the unfiltered / processed recon buffer
vpx_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf); vpx_yv12_copy_y(cm->frame_to_show, &cpi->last_frame_uf);
best_err = try_filter_frame(sd, cpi, xd, cm, filt_mid, partial); best_err = try_filter_frame(sd, cpi, xd, cm, filt_mid, partial_frame);
filt_best = filt_mid; filt_best = filt_mid;
ss_err[filt_mid] = best_err; ss_err[filt_mid] = best_err;
...@@ -95,7 +95,7 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, ...@@ -95,7 +95,7 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
if (filt_direction <= 0 && filt_low != filt_mid) { if (filt_direction <= 0 && filt_low != filt_mid) {
// Get Low filter error score // Get Low filter error score
if (ss_err[filt_low] < 0) { if (ss_err[filt_low] < 0) {
filt_err = try_filter_frame(sd, cpi, xd, cm, filt_low, partial); filt_err = try_filter_frame(sd, cpi, xd, cm, filt_low, partial_frame);
ss_err[filt_low] = filt_err; ss_err[filt_low] = filt_err;
} else { } else {
filt_err = ss_err[filt_low]; filt_err = ss_err[filt_low];
...@@ -114,7 +114,7 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi, ...@@ -114,7 +114,7 @@ static void search_filter_level(const YV12_BUFFER_CONFIG *sd, VP9_COMP *cpi,
// Now look at filt_high // Now look at filt_high
if (filt_direction >= 0 && filt_high != filt_mid) { if (filt_direction >= 0 && filt_high != filt_mid) {
if (ss_err[filt_high] < 0) { if (ss_err[filt_high] < 0) {
filt_err = try_filter_frame(sd, cpi, xd, cm, filt_high, partial); filt_err = try_filter_frame(sd, cpi, xd, cm, filt_high, partial_frame);
ss_err[filt_high] = filt_err; ss_err[filt_high] = filt_err;
} else { } else {
filt_err = ss_err[filt_high]; filt_err = ss_err[filt_high];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment