Opened 3 months ago
Closed 7 days ago
#11239 closed defect (fixed)
Copy unscaled NV12 -> NV12 (and other format with 2 planes) broken.
Reported by: | Aleksoid1978 | Owned by: | Niklas Haas <git@haasn.dev> |
---|---|---|---|
Priority: | normal | Component: | swscale |
Version: | unspecified | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Summary of the bug:
sws_scale NV12 -> NV12 (and other format with 2 planes) unscaled result picture is broken, UV is not copy.
I think problem in planarCopyWrapper:
this line https://github.com/FFmpeg/FFmpeg/blob/master/libswscale/swscale_unscaled.c#L1865
NV12 has only 2 plane and second plane ignored in this function.
Change History (7)
comment:1 by , 3 months ago
Description: | modified (diff) |
---|---|
Summary: | Copy unscaled NV12 -> NV12 broken. → Copy unscaled NV12 -> NV12 (and other format with 2 planes) broken. |
comment:2 by , 3 months ago
comment:4 by , 2 months ago
comment:5 by , 2 months ago
I tried the following command and got a similar problem as Aleksoid1978.
ffmpeg -i nv12.mkv -vf scale nv12_test.mkv
The output file has corrupted colors, everything is in green tones.
Sample: https://www.mediafire.com/file/x5c4372yqxcvcpq/NV12.mkv/file
ffmpeg version 7.1-full_build-www.gyan.dev
comment:6 by , 10 days ago
There are two bugs here; one is that NV12 is not being copied correctly, the other is that this case (unspecified -> tv range) is not being correctly detected as a no-op.
#10716
There is also this