Commit 14072aa6 authored by Urvang Joshi's avatar Urvang Joshi

When lossless is used, disable all filtering.

Lossless use includes both explicit request by user and implicit
selection by by the encoder. This is because, both cases are equivalent
from the decoder point of view.

All filtering including loop filter, cdef and loop restoration is
disabled in this case.

BUG=aomedia:1635

Change-Id: I9485399ab1cb6b57779fadb62acfe223efa77a34
parent e3974704
......@@ -1135,6 +1135,7 @@ static void filter_frame_on_unit(const RestorationTileLimits *limits,
void av1_loop_restoration_filter_frame(YV12_BUFFER_CONFIG *frame,
AV1_COMMON *cm) {
assert(!cm->all_lossless);
const int num_planes = av1_num_planes(cm);
typedef void (*copy_fun)(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst);
......
......@@ -4061,18 +4061,20 @@ static void superres_post_encode(AV1_COMP *cpi) {
static void loopfilter_frame(AV1_COMP *cpi, AV1_COMMON *cm) {
const int num_planes = av1_num_planes(cm);
MACROBLOCKD *xd = &cpi->td.mb.e_mbd;
assert(IMPLIES(is_lossless_requested(&cpi->oxcf), cm->all_lossless));
struct loopfilter *lf = &cm->lf;
int no_loopfilter = 0;
int no_restoration = !cpi->oxcf.using_restoration;
if (is_lossless_requested(&cpi->oxcf) || cm->large_scale_tile) {
if (cm->all_lossless || cm->large_scale_tile) {
no_loopfilter = 1;
no_restoration = 1;
}
int no_cdef = 0;
if (is_lossless_requested(&cpi->oxcf) || !cpi->oxcf.using_cdef ||
cm->large_scale_tile) {
if (cm->all_lossless || !cpi->oxcf.using_cdef || cm->large_scale_tile) {
no_cdef = 1;
}
......
......@@ -1266,6 +1266,7 @@ static int rest_tiles_in_plane(const AV1_COMMON *cm, int plane) {
void av1_pick_filter_restoration(const YV12_BUFFER_CONFIG *src, AV1_COMP *cpi) {
AV1_COMMON *const cm = &cpi->common;
const int num_planes = av1_num_planes(cm);
assert(!cm->all_lossless);
int ntiles[2];
for (int is_uv = 0; is_uv < 2; ++is_uv)
......
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