-
Notifications
You must be signed in to change notification settings - Fork 351
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
[ffmpeg][vaapi][ARGB/BGRA] mismatch of ARGB/BRGA #690
Comments
@fulinjie Could you share your video clip for debugging? Thanks. |
@wangyan-intel Random clips should be ok, since the cmdline simply decoded a clips and do color space convert. |
I tried it by one MP4 h264 clip but cannot find this issue. the commit of iHD driver is c2aae3e. Could you please double check it? Thanks. |
Hi Yan, update to latest version of iHD driver, and this issue still exists. vaCreateImage is used instead of vaDeriveImage, thus makes the performance drop. |
Fixes intel#690. Signed-off-by: Yan Wang <[email protected]>
Hi @wangyan42164, how is this going? |
Since issue for ARGB/BGRA mismatch in driver is not addressed: intel/media-driver#690 Provided a work around in ffmpeg to test the hwmap: ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -v verbose -c:v h264_qsv -i Nature.h264 -vf scale_qsv=format=rgb32,hwdownload,format=rgb32 -f null - Signed-off-by: Linjie Fu <[email protected]>
Since issue for ARGB/BGRA mismatch in driver is not addressed: intel/media-driver#690 Provided a work around in ffmpeg to test the hwmap: ffmpeg -hwaccel qsv -qsv_device /dev/dri/renderD128 -v verbose -c:v h264_qsv -i Nature.h264 -vf scale_qsv=format=rgb32,hwmap=mode=direct,format=rgb32 -f rawvideo /dev/null Signed-off-by: Linjie Fu <[email protected]>
@XinfengZhang As I know, @Jister is working on this? |
We're trying @wangyan42164 's fix. As it's an old PR and contains confilct, @wangyan42164 could you pls rebase the patch? |
Signed-off-by: Gu, Lihao <[email protected]>
fix: intel#690 Signed-off-by: Gu, Lihao <[email protected]>
fix: intel#690 Signed-off-by: Gu, Lihao <[email protected]>
fix: intel#690 Signed-off-by: Gu, Lihao <[email protected]>
fix: intel#690 Signed-off-by: [email protected]
Fix: intel#690 Signed-off-by: Gu, Lihao <[email protected]>
@LhGu What's the status of your PR? |
It is under review. |
There is a limitation in the driver stack. It only supports the hex order is B-G-R-A, and our driver treats the hex order as VA_FOURCC_ARGB format. I already have two PRs(#1334, #1335 )to work around it. However, any work around code may be confused and affect our internal test cases. Just for this issue, you can use this FFmpeg command to get the same output: This command output is the same as original command (B-G-R-A) , and its VA_FOURCC will be consistent with FFmpeg. This case requests the read access, and prefers not to be given direct-mapped memory. The reason has been explained in the below link: https://github.com/FFmpeg/FFmpeg/blob/3883c9d1479d3e653bb66c9960fdd2ebd6ba9594/libavutil/hwcontext_vaapi.c#L780 I think that we can close this issue with no driver code changed. |
This issue needs feedback, but no feedback from submitter yet. I will close this issue if no more information provided from submitter in 1 month. Please feel free to re-open this issue if it still exist. |
Close it now, and please feel free to re-open this issue if you want to discuss more. |
cmdline:
ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i Nature.h264 -vf scale_vaapi=format=rgb32,hwdownload,format=rgb32 -f rawvideo /dev/null
https://github.com/FFmpeg/FFmpeg/blob/3883c9d1479d3e653bb66c9960fdd2ebd6ba9594/libavutil/hwcontext_vaapi.c#L607
if (expected_format->fourcc == test_image.format.fourcc) {
expected_format->fourcc is different from test_image.format.fourcc.
There is mismatch between ffmpeg and media driver for ARGB/BGRA, thus vaDeriveImage can't be used, and it causes the performance drop.
The text was updated successfully, but these errors were encountered: