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

avcodec/vaapi_av1: correct data size when create slice data buffer #403

Closed
wants to merge 1 commit into from

Conversation

feiwan1
Copy link
Collaborator

@feiwan1 feiwan1 commented May 11, 2021

Set all tiles size to create slice data buffer, hardware will use
slice_data_offset/slice_data_size in slice parameter buffer to get
each tile's data.

This change will let it success to decode clip which has multi
tiles data inside one OBU.

Signed-off-by: Fei Wang fei.w.wang@intel.com

Set all tiles size to create slice data buffer, hardware will use
slice_data_offset/slice_data_size in slice parameter buffer to get
each tile's data.

This change will let it success to decode clip which has multi
tiles data inside one OBU.

Signed-off-by: Fei Wang <fei.w.wang@intel.com>
@xhaihao xhaihao self-requested a review May 11, 2021 07:43
Copy link
Collaborator

@xhaihao xhaihao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@a1rwulf
Copy link
Contributor

a1rwulf commented May 14, 2021

Please have a look at my comment in intel/media-driver#1155
While this is definitely an improvement, I don't think it's fully solved yet.

@feiwan1
Copy link
Collaborator Author

feiwan1 commented May 14, 2021

Please have a look at my comment in intel/media-driver#1155
While this is definitely an improvement, I don't think it's fully solved yet.

Thanks @a1rwulf to report this. I will take a look at this. Will update this PR recently.

@a1rwulf
Copy link
Contributor

a1rwulf commented May 15, 2021

@feiwan1 sorry for the noise, the issues I still had were caused by me creating 8 instead of 16 surfaces in vaCreateSurfaces.
I can verify that your patch works fine for my 8bit samples in kodi and mpv.
Others also confirmed mpv working on their end.
Well done, thanks for the fast fix.
I have a 10bit sample that shows some artifacts in mpv and crashes in kodi, but that's unrelated and needs more investigation.

Will you submit your patch to the ffmpeg ML?

@feiwan1
Copy link
Collaborator Author

feiwan1 commented May 17, 2021

8 inste

Hi @a1rwulf , I have submit the patch to ffmpeg community:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20210517015036.22156-1-fei.w.wang@intel.com/

If possible, please comment +1 if you received the ML, which will promote the patch merged.

For your 10bit case, you can use ffmpeg cmdline to check quickly, decode the clip to P010 yuv file, and check if the yuv file can be played by yuv player, if not, please share your clips to me. Thanks.
cmdline:
$ ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -v debug -c:v av1 -i input_10bit.ivf -pix_fmt yuv420p10le -vsync passthrough -y out_10bit.yuv

@a1rwulf
Copy link
Contributor

a1rwulf commented May 17, 2021

Hi @feiwan1 ,
I posted a +1 on ffmpeg's ML for your patch.
As for the 10bit sample, decoding the clip using your command into a yuv file and then playing it with ffplay, it doesn't look correct.
I used this sample: http://download.opencontent.netflix.com.s3.amazonaws.com/AV1/Chimera/Old/Chimera-AV1-10bit-1920x1080-6191kbps.mp4

Hope this helps.

@uartie
Copy link
Collaborator

uartie commented May 25, 2021

@feiwan1 is this patch resolved? If so, please close.

@feiwan1
Copy link
Collaborator Author

feiwan1 commented May 25, 2021

@feiwan1 is this patch resolved? If so, please close.

The 8bit issue is resolved, close this PR since this pr already merged into upstream. And also can avoid take resource of our CI test.

Will keep taking here with @a1rwulf about 10bit issue. Thanks.

@feiwan1 feiwan1 closed this May 25, 2021
@feiwan1
Copy link
Collaborator Author

feiwan1 commented May 25, 2021

Hi @a1rwulf , for your clip, I checked the first 300 frames yuv and seem the incorrect issue is some random noise appear in the end frames of an GOP. Obviously in frame about 100~110 with background. It's like:
Selection_590

Just want to confirm if you met the same issue with me? Thanks.

@a1rwulf
Copy link
Contributor

a1rwulf commented May 25, 2021

@feiwan1 yes, that's exactly how the intro looks like when I use mpv for playback.

@feiwan1
Copy link
Collaborator Author

feiwan1 commented May 25, 2021

@feiwan1 yes, that's exactly how the intro looks like when I use mpv for playback.

Ok, it seems caused by film grain, I will check it.

@a1rwulf
Copy link
Contributor

a1rwulf commented May 27, 2021

@feiwan1 glad you already have an idea of where stuff goes wrong.
Just ping me when there's something to verify.

@feiwan1
Copy link
Collaborator Author

feiwan1 commented Jun 7, 2021

Hi @a1rwulf , I developed PR #412 which can fix your 10bit issue, and improved decode quality for some other clips. You can have a try. I will submit it into community after my test and without regression. Thanks!

@a1rwulf
Copy link
Contributor

a1rwulf commented Jun 8, 2021

Thanks @feiwan1, I've built your #412 PR and the mentioned sample above can be played without artifacts now in mpv.
I don't have a lot of testclips but also the 8bit sample is still fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants