Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
fd44e245
Commit
fd44e245
authored
Oct 13, 2016
by
Yaowu Xu
Committed by
Gerrit Code Review
Oct 13, 2016
Browse files
Merge "Removing Daala-specific deringing code" into nextgenv2
parents
12cbaac7
2c616e61
Changes
4
Hide whitespace changes
Inline
Side-by-side
av1/common/dering.c
View file @
fd44e245
...
...
@@ -116,8 +116,7 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
sbc
*
bsize
[
pli
]
*
MAX_MIB_SIZE
],
stride
,
nhb
,
nvb
,
sbc
,
sbr
,
nhsb
,
nvsb
,
dec
[
pli
],
dir
,
pli
,
&
bskip
[
MAX_MIB_SIZE
*
sbr
*
cm
->
mi_cols
+
MAX_MIB_SIZE
*
sbc
],
cm
->
mi_cols
,
threshold
,
OD_DERING_NO_CHECK_OVERLAP
,
coeff_shift
);
cm
->
mi_cols
,
threshold
,
coeff_shift
);
for
(
r
=
0
;
r
<
bsize
[
pli
]
*
nvb
;
++
r
)
{
for
(
c
=
0
;
c
<
bsize
[
pli
]
*
nhb
;
++
c
)
{
#if CONFIG_AOM_HIGHBITDEPTH
...
...
av1/common/od_dering.c
View file @
fd44e245
...
...
@@ -35,9 +35,6 @@ const int OD_DIRECTION_OFFSETS_TABLE[8][3] = {
{
1
*
OD_FILT_BSTRIDE
+
0
,
2
*
OD_FILT_BSTRIDE
-
1
,
3
*
OD_FILT_BSTRIDE
-
1
},
};
const
double
OD_DERING_GAIN_TABLE
[
OD_DERING_LEVELS
]
=
{
0
,
0
.
5
,
0
.
707
,
1
,
1
.
41
,
2
};
/* Detect direction. 0 means 45-degree up-right, 2 is horizontal, and so on.
The search minimizes the weighted variance along all the lines in a
particular direction, i.e. the squared error between the input and a
...
...
@@ -252,7 +249,7 @@ void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride,
int
sby
,
int
nhsb
,
int
nvsb
,
int
xdec
,
int
dir
[
OD_DERING_NBLOCKS
][
OD_DERING_NBLOCKS
],
int
pli
,
unsigned
char
*
bskip
,
int
skip_stride
,
int
threshold
,
int
overlap
,
int
coeff_shift
)
{
int
coeff_shift
)
{
int
i
;
int
j
;
int
bx
;
...
...
@@ -299,35 +296,7 @@ void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride,
}
for
(
by
=
0
;
by
<
nvb
;
by
++
)
{
for
(
bx
=
0
;
bx
<
nhb
;
bx
++
)
{
int
skip
;
#if defined(DAALA_ODINTRIN)
int
xstart
;
int
ystart
;
int
xend
;
int
yend
;
xstart
=
ystart
=
0
;
xend
=
yend
=
(
2
>>
xdec
);
if
(
overlap
)
{
xstart
-=
(
sbx
!=
0
);
ystart
-=
(
sby
!=
0
);
xend
+=
(
sbx
!=
nhsb
-
1
);
yend
+=
(
sby
!=
nvsb
-
1
);
}
skip
=
1
;
/* We look at whether the current block and its 4x4 surrounding (due to
lapping) are skipped to avoid filtering the same content multiple
times. */
for
(
i
=
ystart
;
i
<
yend
;
i
++
)
{
for
(
j
=
xstart
;
j
<
xend
;
j
++
)
{
skip
=
skip
&&
bskip
[((
by
<<
1
>>
xdec
)
+
i
)
*
skip_stride
+
(
bx
<<
1
>>
xdec
)
+
j
];
}
}
#else
(
void
)
overlap
;
skip
=
bskip
[
by
*
skip_stride
+
bx
];
#endif
if
(
skip
)
thresh
[
by
][
bx
]
=
0
;
if
(
bskip
[
by
*
skip_stride
+
bx
])
thresh
[
by
][
bx
]
=
0
;
}
}
for
(
by
=
0
;
by
<
nvb
;
by
++
)
{
...
...
av1/common/od_dering.h
View file @
fd44e245
...
...
@@ -21,12 +21,6 @@ typedef int16_t od_dering_in;
#define OD_DERINGSIZES (2)
#define OD_DERING_NO_CHECK_OVERLAP (0)
#define OD_DERING_CHECK_OVERLAP (1)
#define OD_DERING_LEVELS (6)
extern
const
double
OD_DERING_GAIN_TABLE
[
OD_DERING_LEVELS
];
#define OD_DERING_NBLOCKS (OD_BSIZE_MAX / 8)
#define OD_FILT_BORDER (3)
...
...
@@ -54,7 +48,7 @@ void od_dering(const od_dering_opt_vtbl *vtbl, int16_t *y, int ystride,
int
sby
,
int
nhsb
,
int
nvsb
,
int
xdec
,
int
dir
[
OD_DERING_NBLOCKS
][
OD_DERING_NBLOCKS
],
int
pli
,
unsigned
char
*
bskip
,
int
skip_stride
,
int
threshold
,
int
overlap
,
int
coeff_shift
);
int
coeff_shift
);
void
od_filter_dering_direction_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
int
ln
,
int
threshold
,
int
dir
);
void
od_filter_dering_orthogonal_c
(
int16_t
*
y
,
int
ystride
,
const
int16_t
*
in
,
...
...
av1/encoder/pickdering.c
View file @
fd44e245
...
...
@@ -108,13 +108,13 @@ int av1_dering_search(YV12_BUFFER_CONFIG *frame, const YV12_BUFFER_CONFIG *ref,
int
threshold
;
level
=
compute_level_from_index
(
best_level
,
gi
);
threshold
=
level
<<
coeff_shift
;
od_dering
(
&
OD_DERING_VTBL_C
,
dst
,
MAX_MIB_SIZE
*
bsize
[
0
],
&
src
[
sbr
*
stride
*
bsize
[
0
]
*
MAX_MIB_SIZE
+
sbc
*
bsize
[
0
]
*
MAX_MIB_SIZE
]
,
cm
->
mi_cols
*
bsize
[
0
],
nhb
,
nvb
,
sbc
,
sbr
,
nhsb
,
nvsb
,
0
,
dir
,
0
,
&
bskip
[
MAX_MIB_SIZE
*
sbr
*
cm
->
mi_cols
+
MAX_MIB_SIZE
*
sbc
],
cm
->
mi_cols
,
threshold
,
OD_DERING_NO_CHECK_OVERLAP
,
coeff_shift
);
od_dering
(
&
OD_DERING_VTBL_C
,
dst
,
MAX_MIB_SIZE
*
bsize
[
0
],
&
src
[
sbr
*
stride
*
bsize
[
0
]
*
MAX_MIB_SIZE
+
sbc
*
bsize
[
0
]
*
MAX_MIB_SIZE
],
cm
->
mi_cols
*
bsize
[
0
],
nhb
,
nvb
,
sbc
,
sbr
,
nhsb
,
nvsb
,
0
,
dir
,
0
,
&
bskip
[
MAX_MIB_SIZE
*
sbr
*
cm
->
mi_cols
+
MAX_MIB_SIZE
*
sbc
],
cm
->
mi_cols
,
threshold
,
coeff_shift
);
cur_mse
=
(
int
)
compute_dist
(
dst
,
MAX_MIB_SIZE
*
bsize
[
0
],
&
ref_coeff
[
sbr
*
stride
*
bsize
[
0
]
*
MAX_MIB_SIZE
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment