CLPF: Remove redundant function argument.
Change-Id: I31bea3b1f76493060edd7e1bd616a223841d5f77
This commit is contained in:
Родитель
ecf9a0c821
Коммит
ded69f5668
|
@ -73,13 +73,14 @@ void aom_clpf_block_hbd_c(const uint16_t *src, uint16_t *dst, int sstride,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Return number of filtered blocks
|
// Return number of filtered blocks
|
||||||
int av1_clpf_frame(
|
int av1_clpf_frame(const YV12_BUFFER_CONFIG *frame,
|
||||||
const YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *org,
|
const YV12_BUFFER_CONFIG *org, AV1_COMMON *cm,
|
||||||
AV1_COMMON *cm, int enable_fb_flag, unsigned int strength,
|
int enable_fb_flag, unsigned int strength,
|
||||||
unsigned int fb_size_log2, uint8_t *blocks, int plane,
|
unsigned int fb_size_log2, uint8_t *blocks, int plane,
|
||||||
int (*decision)(int, int, const YV12_BUFFER_CONFIG *,
|
int (*decision)(int, int, const YV12_BUFFER_CONFIG *,
|
||||||
const YV12_BUFFER_CONFIG *, const AV1_COMMON *cm, int, int,
|
const YV12_BUFFER_CONFIG *,
|
||||||
int, unsigned int, unsigned int, uint8_t *, int)) {
|
const AV1_COMMON *cm, int, int, int,
|
||||||
|
unsigned int, unsigned int, uint8_t *)) {
|
||||||
/* Constrained low-pass filter (CLPF) */
|
/* Constrained low-pass filter (CLPF) */
|
||||||
int c, k, l, m, n;
|
int c, k, l, m, n;
|
||||||
const int subx = plane != AOM_PLANE_Y && frame->subsampling_x;
|
const int subx = plane != AOM_PLANE_Y && frame->subsampling_x;
|
||||||
|
@ -151,7 +152,7 @@ int av1_clpf_frame(
|
||||||
if (!allskip && // Do not filter the block if all is skip encoded
|
if (!allskip && // Do not filter the block if all is skip encoded
|
||||||
(!enable_fb_flag ||
|
(!enable_fb_flag ||
|
||||||
decision(k, l, frame, org, cm, bs, w / bs, h / bs, strength,
|
decision(k, l, frame, org, cm, bs, w / bs, h / bs, strength,
|
||||||
fb_size_log2, blocks + block_index, plane))) {
|
fb_size_log2, blocks + block_index))) {
|
||||||
// Iterate over all smaller blocks inside the filter block
|
// Iterate over all smaller blocks inside the filter block
|
||||||
for (m = 0; m < ((h + bs - 1) >> bslog); m++) {
|
for (m = 0; m < ((h + bs - 1) >> bslog); m++) {
|
||||||
for (n = 0; n < ((w + bs - 1) >> bslog); n++) {
|
for (n = 0; n < ((w + bs - 1) >> bslog); n++) {
|
||||||
|
|
|
@ -24,6 +24,6 @@ int av1_clpf_frame(const YV12_BUFFER_CONFIG *frame,
|
||||||
int (*decision)(int, int, const YV12_BUFFER_CONFIG *,
|
int (*decision)(int, int, const YV12_BUFFER_CONFIG *,
|
||||||
const YV12_BUFFER_CONFIG *,
|
const YV12_BUFFER_CONFIG *,
|
||||||
const AV1_COMMON *cm, int, int, int,
|
const AV1_COMMON *cm, int, int, int,
|
||||||
unsigned int, unsigned int, uint8_t *, int));
|
unsigned int, unsigned int, uint8_t *));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2068,8 +2068,7 @@ static int clpf_bit(UNUSED int k, UNUSED int l,
|
||||||
UNUSED const YV12_BUFFER_CONFIG *org,
|
UNUSED const YV12_BUFFER_CONFIG *org,
|
||||||
UNUSED const AV1_COMMON *cm, UNUSED int block_size,
|
UNUSED const AV1_COMMON *cm, UNUSED int block_size,
|
||||||
UNUSED int w, UNUSED int h, UNUSED unsigned int strength,
|
UNUSED int w, UNUSED int h, UNUSED unsigned int strength,
|
||||||
UNUSED unsigned int fb_size_log2, uint8_t *bit,
|
UNUSED unsigned int fb_size_log2, uint8_t *bit) {
|
||||||
UNUSED int comp) {
|
|
||||||
return *bit;
|
return *bit;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -127,45 +127,32 @@ void aom_clpf_detect_multi_hbd_c(const uint16_t *rec, const uint16_t *org,
|
||||||
int av1_clpf_decision(int k, int l, const YV12_BUFFER_CONFIG *rec,
|
int av1_clpf_decision(int k, int l, const YV12_BUFFER_CONFIG *rec,
|
||||||
const YV12_BUFFER_CONFIG *org, const AV1_COMMON *cm,
|
const YV12_BUFFER_CONFIG *org, const AV1_COMMON *cm,
|
||||||
int block_size, int w, int h, unsigned int strength,
|
int block_size, int w, int h, unsigned int strength,
|
||||||
unsigned int fb_size_log2, uint8_t *res, int plane) {
|
unsigned int fb_size_log2, uint8_t *res) {
|
||||||
int m, n, sum0 = 0, sum1 = 0;
|
int m, n, sum0 = 0, sum1 = 0;
|
||||||
const int subx = plane != AOM_PLANE_Y && rec->subsampling_x;
|
|
||||||
const int suby = plane != AOM_PLANE_Y && rec->subsampling_y;
|
|
||||||
uint8_t *rec_buffer =
|
|
||||||
plane != AOM_PLANE_Y
|
|
||||||
? (plane == AOM_PLANE_U ? rec->u_buffer : rec->v_buffer)
|
|
||||||
: rec->y_buffer;
|
|
||||||
uint8_t *org_buffer =
|
|
||||||
plane != AOM_PLANE_Y
|
|
||||||
? (plane == AOM_PLANE_U ? org->u_buffer : org->v_buffer)
|
|
||||||
: org->y_buffer;
|
|
||||||
int rec_width = plane != AOM_PLANE_Y ? rec->uv_crop_width : rec->y_crop_width;
|
|
||||||
int rec_height =
|
|
||||||
plane != AOM_PLANE_Y ? rec->uv_crop_height : rec->y_crop_height;
|
|
||||||
int rec_stride = plane != AOM_PLANE_Y ? rec->uv_stride : rec->y_stride;
|
|
||||||
int org_stride = plane != AOM_PLANE_Y ? org->uv_stride : org->y_stride;
|
|
||||||
for (m = 0; m < h; m++) {
|
for (m = 0; m < h; m++) {
|
||||||
for (n = 0; n < w; n++) {
|
for (n = 0; n < w; n++) {
|
||||||
int xpos = (l << fb_size_log2) + n * block_size;
|
int xpos = (l << fb_size_log2) + n * block_size;
|
||||||
int ypos = (k << fb_size_log2) + m * block_size;
|
int ypos = (k << fb_size_log2) + m * block_size;
|
||||||
if (!cm->mi_grid_visible[(ypos << suby) / MI_SIZE * cm->mi_stride +
|
if (!cm->mi_grid_visible[ypos / MI_SIZE * cm->mi_stride + xpos / MI_SIZE]
|
||||||
(xpos << subx) / MI_SIZE]
|
|
||||||
->mbmi.skip) {
|
->mbmi.skip) {
|
||||||
#if CONFIG_AOM_HIGHBITDEPTH
|
#if CONFIG_AOM_HIGHBITDEPTH
|
||||||
if (cm->use_highbitdepth) {
|
if (cm->use_highbitdepth) {
|
||||||
aom_clpf_detect_hbd(
|
aom_clpf_detect_hbd(CONVERT_TO_SHORTPTR(rec->y_buffer),
|
||||||
CONVERT_TO_SHORTPTR(rec_buffer), CONVERT_TO_SHORTPTR(org_buffer),
|
CONVERT_TO_SHORTPTR(org->y_buffer), rec->y_stride,
|
||||||
rec_stride, org_stride, xpos, ypos, rec_width, rec_height, &sum0,
|
org->y_stride, xpos, ypos, rec->y_crop_width,
|
||||||
&sum1, strength, cm->bit_depth - 8, block_size);
|
rec->y_crop_height, &sum0, &sum1, strength,
|
||||||
|
cm->bit_depth - 8, block_size);
|
||||||
} else {
|
} else {
|
||||||
aom_clpf_detect(rec_buffer, org_buffer, rec_stride, org_stride, xpos,
|
aom_clpf_detect(rec->y_buffer, org->y_buffer, rec->y_stride,
|
||||||
ypos, rec_width, rec_height, &sum0, &sum1, strength,
|
org->y_stride, xpos, ypos, rec->y_crop_width,
|
||||||
|
rec->y_crop_height, &sum0, &sum1, strength,
|
||||||
block_size);
|
block_size);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
aom_clpf_detect(rec_buffer, org_buffer, rec_stride, org_stride, xpos,
|
aom_clpf_detect(rec->y_buffer, org->y_buffer, rec->y_stride,
|
||||||
ypos, rec_width, rec_height, &sum0, &sum1, strength,
|
org->y_stride, xpos, ypos, rec->y_crop_width,
|
||||||
block_size);
|
rec->y_crop_height, &sum0, &sum1, strength, block_size);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
int av1_clpf_decision(int k, int l, const YV12_BUFFER_CONFIG *rec,
|
int av1_clpf_decision(int k, int l, const YV12_BUFFER_CONFIG *rec,
|
||||||
const YV12_BUFFER_CONFIG *org, const AV1_COMMON *cm,
|
const YV12_BUFFER_CONFIG *org, const AV1_COMMON *cm,
|
||||||
int block_size, int w, int h, unsigned int strength,
|
int block_size, int w, int h, unsigned int strength,
|
||||||
unsigned int fb_size_log2, uint8_t *res, int plane);
|
unsigned int fb_size_log2, uint8_t *res);
|
||||||
|
|
||||||
void av1_clpf_test_frame(const YV12_BUFFER_CONFIG *rec,
|
void av1_clpf_test_frame(const YV12_BUFFER_CONFIG *rec,
|
||||||
const YV12_BUFFER_CONFIG *org, const AV1_COMMON *cm,
|
const YV12_BUFFER_CONFIG *org, const AV1_COMMON *cm,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче