FFmpeg/libavfilter
Niklas Haas c8bc6fabd7 avfilter/vf_scale: fix 4:1:0 interlaced chroma pos
The current logic hard-coded a check for v_sub == 1. We can extend this
logic slightly to cover the case of interlaced 4:1:0 (which has v_sub ==
2).

Here is a diagram explaining this scenario (with center-siting):

a   a   a   a   a   a   a   a

b   b   b   b   b   b   b   b
      X               X
a   a   a   a   a   a   a   a

b   b   b   b   b   b   b   b

a   a   a   a   a   a   a   a

b   b   b   b   b   b   b   b
      Y               Y
a   a   a   a   a   a   a   a

b   b   b   b   b   b   b   b

a = even luma rows
b = odd luma rows
X = even chroma sample
Y = odd chroma sample

In progressive mode, the chroma samples sit at (384, 384) respectively.

Relative to the 8x4 grid of even luma samples (a), the X sample sits at:
  h_chr_pos = 384
  v_chr_pos = 192

Relative to the 8x4 grid of odd luma samples (b), the Y sample sits at:
  h_chr_pos = 384
  v_chr_pos = 576

The new code calculates the correct values in all circumstances.
2024-08-16 11:43:37 +02:00
..
2023-11-18 19:55:42 +01:00
2024-07-07 23:36:29 +02:00
2023-11-16 20:53:18 +02:00
2024-07-01 22:31:02 +02:00
2024-07-01 22:31:02 +02:00
2024-07-01 22:31:02 +02:00
2024-02-16 21:34:38 +01:00
2024-07-15 01:59:41 +02:00
2024-07-21 16:34:28 +02:00
2024-04-18 14:43:07 +08:00
2024-07-05 18:06:14 +08:00