aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/scene_sad.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2025-07-12 11:15:56 +0200
committerNiklas Haas <git@haasn.dev>2025-07-17 12:26:05 +0200
commitdc61b74c1d30e0b51febdb6c567be1ca7c1eaca5 (patch)
tree0138aa54110f993ab44ff816c37505991e7bad56 /libavfilter/scene_sad.c
parente6af82c49895825d0cbea71e24c77be6b16571c4 (diff)
downloadffmpeg-dc61b74c1d30e0b51febdb6c567be1ca7c1eaca5.tar.gz
avfilter/scene_sad: pass true depth to ff_scene_sad_get_fn()
I need to be able to distinguish between 10/12/14 and 16 bit depths, for overflow reasons.
Diffstat (limited to 'libavfilter/scene_sad.c')
-rw-r--r--libavfilter/scene_sad.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavfilter/scene_sad.c b/libavfilter/scene_sad.c
index caf911eb5d..05dd97e055 100644
--- a/libavfilter/scene_sad.c
+++ b/libavfilter/scene_sad.c
@@ -63,11 +63,10 @@ ff_scene_sad_fn ff_scene_sad_get_fn(int depth)
sad = ff_scene_sad_get_fn_x86(depth);
#endif
if (!sad) {
- if (depth == 8)
+ if (depth <= 8)
sad = ff_scene_sad_c;
- if (depth == 16)
+ else if (depth <= 16)
sad = ff_scene_sad16_c;
}
return sad;
}
-