Files
ffmpeg/libavfilter
marcos ashton 520a3042d2 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 18:55:09 +02:00
..
2025-12-07 15:55:56 +00:00
2020-02-14 09:59:27 +01:00
2021-01-01 15:25:48 +01:00
2021-03-01 06:10:44 +01:00
2019-12-10 16:09:14 +01:00
2025-03-16 22:12:18 +01:00
2021-03-06 12:42:16 +01:00
2021-01-17 12:06:01 +01:00
2021-01-17 12:06:01 +01:00
2021-03-06 12:41:30 +01:00
2020-02-14 21:49:47 +01:00
2025-12-07 15:55:56 +00:00
2025-12-07 15:55:56 +00:00
2019-10-23 12:37:46 +02:00
2020-02-04 18:28:04 +01:00
2020-02-29 22:31:01 +01:00
2021-02-07 11:48:28 +01:00
2021-02-18 09:59:37 +08:00
2021-01-25 00:48:35 +01:00
2020-03-17 22:46:36 +01:00
2021-01-01 15:25:48 +01:00
2021-03-06 12:42:16 +01:00
2021-02-11 00:45:08 +01:00
2024-07-22 10:47:15 +02:00
2025-12-07 15:55:56 +00:00
2020-03-17 22:46:36 +01:00
2021-02-08 11:06:29 +01:00
2021-01-26 12:19:09 +01:00
2021-02-18 09:59:37 +08:00
2021-02-16 22:26:56 +01:00
2021-03-01 06:10:44 +01:00
2020-03-17 22:46:36 +01:00