Files
ffmpeg/libavfilter
marcos ashton 26df498cdf libavfilter/vf_v360: fix operator precedence in stereo loop condition
The loop condition in the DEFINE_REMAP macro:

  stereo < 1 + s->out_stereo > STEREO_2D

is parsed by C as:

  (stereo < (1 + s->out_stereo)) > STEREO_2D

Since STEREO_2D is 0 and relational operators return 0 or 1, the
outer comparison against 0 is a no-op for STEREO_2D and STEREO_SBS.
But for STEREO_TB (value 2) the loop runs 3 iterations instead of 2,
producing an out-of-bounds stereo pass.

Add parentheses so the comparison is evaluated first:

  stereo < 1 + (s->out_stereo > STEREO_2D)

This gives 1 iteration for 2D and 2 for any stereo format (SBS or TB),
matching the actual number of stereo views.

Signed-off-by: marcos ashton <marcosashiglesias@gmail.com>
(cherry picked from commit 9559a6036d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2026-05-05 15:21:13 +02:00
..
2025-12-03 20:26:49 +01:00
2022-07-07 17:52:32 +02:00
2025-12-03 20:26:49 +01:00
2022-02-20 12:38:52 +01:00
2022-07-10 17:20:15 +02:00
2025-12-03 20:26:49 +01:00
2022-02-09 09:40:33 +01:00
2022-02-07 00:31:23 +01:00
2025-12-03 20:26:49 +01:00
2022-03-16 14:05:26 +02:00
2022-07-13 00:27:37 +02:00
2022-04-23 10:58:29 +02:00
2024-07-22 10:47:13 +02:00
2025-12-03 20:26:49 +01:00