Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 422p and 440p conversions appear to be buggy #1709

Open
philipl opened this issue Aug 6, 2023 · 2 comments
Open

[Bug]: 422p and 440p conversions appear to be buggy #1709

philipl opened this issue Aug 6, 2023 · 2 comments
Assignees
Labels
VP Video Processing

Comments

@philipl
Copy link
Contributor

philipl commented Aug 6, 2023

Which component impacted?

Video Processing

Is it regression? Good in old configuration?

No, this issue exist a long time

What happened?

ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -i video-x264-8bit-420.mp4 -vf scale_vaapi=format=yuv422p,hwdownload,format=yuv422p output.mp4

This command line demonstrates the bug, and doesn't require #1708.

It takes a normal video that is decoded to a functional format (nv12 in this case) and then converts it to yuv422p (422H), which we then download and encode in software. The resulting video frames have mangled chroma as shown in the screenshot:

mpv-shot0001

Conversion to yuv440p (422V) is also buggy and in a consistent way (the green area is on the right instead of the bottom).

What's the usage scenario when you are seeing the problem?

Transcode for media delivery, Playback

What impacted?

Playback of 8bit 4:2:2 content (eg: hevc) in mpv. mpv cannot directly display packed yuyv422, so we need to do a conversion. Normally, this conversion is done to XYUV (a 4:4:4 format) but after #1708, yuv422p will appear as a valid conversion target, and will be preferred, because it has matching subsampling. The buggy conversion then puts a bad image on the screen for the user.

Debug Information

Compiled using latest master (385f5cf)

Do you want to contribute a patch to fix the issue?

None

@intel-mediadev
Copy link
Contributor

Auto Created VSMGWL-67202 for further analysis.

@MicroYY
Copy link
Contributor

MicroYY commented Aug 11, 2023

As I know, 422H/422V is neither supported as VP output, nor as encode input format.
Refer to https://github.com/intel/media-driver/blob/master/docs/media_features.md

ffmpeg configuration depends on driver capability which means it should report error for unsupported format. For this case no configuration error is found. We will check current caps settings and fix potential issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VP Video Processing
Projects
None yet
Development

No branches or pull requests

5 participants