aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/output.c
diff options
context:
space:
mode:
authorNiklas Haas <git@haasn.dev>2024-07-04 16:28:50 +0200
committerNiklas Haas <git@haasn.dev>2024-08-16 11:43:37 +0200
commitc8bc6fabd79ee19df93f2486b8a6ebeedb7cd27e (patch)
tree5adab4346d67313664a48670801bb5ef3177d543 /libswscale/output.c
parent15a67c0947d6fa8ff50607ef26185986813a6fd6 (diff)
downloadffmpeg-c8bc6fabd79ee19df93f2486b8a6ebeedb7cd27e.tar.gz
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.
Diffstat (limited to 'libswscale/output.c')
0 files changed, 0 insertions, 0 deletions