make the filtering process match libvpx and ffvp8
libvpx (and ffvp8) implementations are completely skipping the deblocking step if loop_filter_level is 0, which is _not_ equivalent to performing the loop-filtering with a 0 value for loop_filter_level. In the latter case (which we followed), few pixels were modified here and there and you could observe off-by-1 errors on few places. This patch will reconcile the 3 implementations (since the difference is minor, skipping the deblocking step will save CPU for virtually no visible difference). The spec will be made clearer about the expected behaviour: * if the global loop_filter_level is 0, turn deblocking off. * if it's not 0 but the local loop_filter_level ends up being 0 for whatever reason (lf_delta, mode delta, ref delta, etc.) on a particular macroblock, skip the deblocking too. Change-Id: I157f1f8de463b8a76caddb3f347b7fbc7bd527d2
This commit is contained in:
parent
dd60138d20
commit
d5bc05a47b
@ -126,6 +126,9 @@ static void DoFilter(VP8Decoder* const dec, int mb_x, int mb_y) {
|
||||
const int level = mb->f_level_;
|
||||
const int ilevel = mb->f_ilevel_;
|
||||
const int limit = 2 * level + ilevel;
|
||||
if (level == 0) {
|
||||
return;
|
||||
}
|
||||
if (dec->filter_type_ == 1) { // simple
|
||||
if (mb_x > 0) {
|
||||
VP8SimpleHFilter16(y_dst, y_bps, limit + 4);
|
||||
|
Loading…
Reference in New Issue
Block a user