You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Only allow nearest-neighbor filter if explicitly specified or left as default.
static avifBool nearestNeighborFilterAllowed(int chromaUpsampling)
{
return chromaUpsampling != AVIF_CHROMA_UPSAMPLING_BILINEAR && chromaUpsampling != AVIF_CHROMA_UPSAMPLING_BEST_QUALITY;
}
...
const enum FilterMode filter = nearestNeighborFilterAllowed(rgb->chromaUpsampling) ? kFilterNone : kFilterBilinear;
Suppose rgb->chromaUpsampling is AVIF_CHROMA_UPSAMPLING_AUTOMATIC. Before the commit, filter is set equal to kFilterBilinear. After the commit, filter is set equal to kFilterNone.
The effect of the bug is that AVIF_CHROMA_UPSAMPLING_AUTOMATIC doesn't use kFilterBilinear with libyuv functions.
I will write a fix.
The text was updated successfully, but these errors were encountered:
The condition for determining whether kFilterNone or kFilterBilinear
should be used was changed incorrectly in commit 95d96ea
(Refactor YUV->RGB conversion with libyuv), causing
AVIF_CHROMA_UPSAMPLING_AUTOMATIC to not use kFilterBilinear with libyuv.
Fix the condition by reverting to the original code.
FixAOMediaCodec#1475.
The condition for determining whether kFilterNone or kFilterBilinear
should be used was changed incorrectly in commit 95d96ea
(Refactor YUV->RGB conversion with libyuv), causing
AVIF_CHROMA_UPSAMPLING_AUTOMATIC to not use kFilterBilinear with libyuv.
Fix the condition by reverting to the original code.
Fix#1475.
A bug was introduced in commit 95d96ea (#1264). Here is the relevant code before and after the commit.
Before:
After:
Suppose
rgb->chromaUpsampling
isAVIF_CHROMA_UPSAMPLING_AUTOMATIC
. Before the commit,filter
is set equal tokFilterBilinear
. After the commit,filter
is set equal tokFilterNone
.The effect of the bug is that
AVIF_CHROMA_UPSAMPLING_AUTOMATIC
doesn't usekFilterBilinear
with libyuv functions.I will write a fix.
The text was updated successfully, but these errors were encountered: