mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-10-28 10:04:37 +08:00
avfilter/vf_huesaturation: skip the luminance shear when the luminance vector is zero
Found-by: zhang xingxing Fixes: float division by 0 Fixes: WgQdanA8nq8x Fixes: swarm-Division-by-zero-in-hue-rotation-with-zero-weights-bda2e7
This commit is contained in:
1 parent
2ff5405601
commit
89909a18c1
1 file changed
+2
-2
@@ -321,8 +321,8 @@ static void hue_rotate_matrix(float matrix[4][4], float rotation,
|
||||
y_rotate_matrix(matrix, yrs, yrc);
|
||||
|
||||
transform_point(matrix, rlw, glw, blw, &lx, &ly, &lz);
|
||||
zsx = lx / lz;
|
||||
zsy = ly / lz;
|
||||
zsx = lz ? lx / lz : 0.f;
|
||||
zsy = lz ? ly / lz : 0.f;
|
||||
z_shear_matrix(matrix, zsx, zsy);
|
||||
|
||||
zrs = sinf(rotation * M_PI / 180.f);
|
||||
|
||||
Reference in new issue
Block a user