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

Macroblocking artifact seen on a VC1 video file #752

Closed
DaveBinM opened this issue Oct 16, 2019 · 25 comments · Fixed by #1419
Closed

Macroblocking artifact seen on a VC1 video file #752

DaveBinM opened this issue Oct 16, 2019 · 25 comments · Fixed by #1419
Assignees
Labels
Decode video decode related

Comments

@DaveBinM
Copy link

I'm seeing a very similar issue to intel/intel-vaapi-driver#13 in this driver as well, which I was able to replicate using the file linked here: https://docs.google.com/uc?id=0B9X316MN6HHvSlNWb1ZhSGo2X2M&export=download

This is on Ubuntu 18.04.3 (kernel 5.0.0-31-generic), with intel-media-driver/19.2.1 and a Kaby Lake G processor (https://ark.intel.com/content/www/us/en/ark/products/130411/intel-core-i7-8705g-processor-with-radeon-rx-vega-m-gl-graphics-8m-cache-up-to-4-10-ghz.html). @carpalis was able to resolve this last time.

@XinfengZhang
Copy link
Contributor

@Tianhaol could you help to check it?

@DaveBinM
Copy link
Author

DaveBinM commented Apr 7, 2020

Just following up on this one to see if there's any further news on this one?

@thorsteneb
Copy link

Confirmed that this issue is (still) present in 20.1.1 .

@DaveBinM
Copy link
Author

DaveBinM commented Sep 3, 2020

@carpalis, I'm sorry to ask, but is there any chance the work here is similar to what you did to resolve intel/intel-vaapi-driver#13? 🙂 🤞

@XinfengZhang XinfengZhang added Decode video decode related P3 Low priority no customer usage, no business requirements, not from communities, just from internal labels Jan 9, 2021
@mgutt
Copy link

mgutt commented Feb 5, 2022

Any updates? I saw the recent label "P3" means "no customer usage". I don't know what a "customer" means for intel, but there are hundreds of posts similar to this in other communities:
https://forums.plex.tv/t/movies-with-vc-1-vc1-codec-badly-pixelated-flashing/708200

@lqvnguyen
Copy link

Any chance this issue can be given some development cycles?

@XinfengZhang XinfengZhang removed the P3 Low priority no customer usage, no business requirements, not from communities, just from internal label Feb 6, 2022
@XinfengZhang
Copy link
Contributor

XinfengZhang commented Feb 6, 2022

sorry for late response, @guowillyy could you help to check whether the patch intel/intel-vaapi-driver#234 is applicable for media-driver, from the discussion, similar issue already been fixed in intel-vaapi-driver repo by the PR

@lqvnguyen
Copy link

Please do what you can as this is a showstopper, pun intended, for all users of Comet Lake and newer.

@XuanJessica
Copy link
Contributor

Hi @DaveBinM , the file link is out of date (https://docs.google.com/uc?id=0B9X316MN6HHvSlNWb1ZhSGo2X2M&export=download), could you please help to provide a valid file link that can replicate this issue? Thanks a lot.

@lqvnguyen
Copy link

lqvnguyen commented Mar 9, 2022

@XuanJessica Several samples provided here for the VC-1 decoder failures

https://drive.google.com/drive/folders/1PJ0Gjs1mdJB01bxlhi6PmnMvzk8yFOmD

@XuanJessica
Copy link
Contributor

Thanks @lqvnguyen , copy that.

@Jexu Jexu assigned XuanJessica and unassigned wangyan-intel Mar 22, 2022
@lqvnguyen
Copy link

Thanks @lqvnguyen , copy that.

Any progress?

@XuanJessica
Copy link
Contributor

Thanks @lqvnguyen , copy that.

Any progress?

Hi, we are checking priority, WIP.

@Jexu
Copy link
Contributor

Jexu commented May 18, 2022

Just check the '(1)-123.mkv' in provided bitstream.

I guess the artifact is not related to intel/intel-vaapi-driver#13 since the bitstream look more like an invalid stream. In this bitstream, first 4 decoded frame are I, B, B, P frame, as we known, B frame should have both forward and backward reference, so the bitstream should send I, P, B, B in decode order to umd at least.
So, you can simply modify the app behavior to skip decoding B frame if it doesn't have forward or backward reference, this is what ffmpeg doing at moment. You can have a try.

@guowillyy guowillyy assigned Jexu and unassigned Jexu, guowillyy and XuanJessica May 20, 2022
@Jexu
Copy link
Contributor

Jexu commented May 28, 2022

Close this issue now, feel free to re-open it again if having any concerns or otherr issues.

@Jexu Jexu closed this as completed May 28, 2022
@DaveBinM
Copy link
Author

@Jexu Which release of the driver should we expect to see the fix in?

@mgutt
Copy link

mgutt commented May 28, 2022

@Jexu Which release of the driver should we expect to see the fix in?

He says, that it can't be fixed, because the source file is corrupt. I think this could be the root cause in Plex as well, as Plex splits the source file into evenly sized clips, before transcoding them. By that the main key frame could be randomly gone lost as it is part of the previous clip. So Plex should not split the clips in size/length, instead they need to respect the key frame order/position.

That is for example the reason why MKVToolnix does not respect the expect millisecond splitting video files. It inspects at first the key frame:
https://gitlab.com/mbunkus/mkvtoolnix/-/issues/1628

@lqvnguyen
Copy link

Except PMS handles this just fine if using Nvidia or software decode.

@ChuckPa
Copy link

ChuckPa commented May 28, 2022

To remove segmentation from the argument, I allowed FFMPEG to transcode the entire file.

Input -> Output.

Run #1 - uses the default intel-media-driver with QSV

Observe the macro blocking at 1:52
Screenshot from 2022-05-28 15-50-14

Run #2 - Select i965 driver (export LIBVA_DRIVER_NAME=i965)

Observe no macroblocking at same 1:52 timestamp of same input file.
FFMPEG-VC1-i965-driver

This is exactly the same failure we saw before Carpalis fixed it.

@lqvnguyen
Copy link

@Jexu Root cause is with iHD. Please reopen and continue investigating. If you need more samples, they will be provided.

@Jexu Jexu reopened this May 29, 2022
Jexu added a commit to Jexu/media-driver that referenced this issue May 29, 2022
Enable intensity compensation to avoid the artifact for B frame decoding
Fixes intel#752
@Jexu
Copy link
Contributor

Jexu commented May 29, 2022

I just check first several frames before, except the invalid B frame decoding, it does have similar issue of intensity compensation.

Feel free to try above patch, let me know if it helps for your issue. Locally worked.

@ChuckPa
Copy link

ChuckPa commented May 29, 2022

@Jexu

I have not yet checked it, but should you wish it, here are the first 4 minutes of the video where the above screenshots were taken from.

Please feel free to use it for your testing. I will provide anything else if needed.

Intel-VC1-Input-sample.mkv

@Jexu Jexu self-assigned this May 29, 2022
@Jexu
Copy link
Contributor

Jexu commented Jun 6, 2022

Do you try above fix, if no other issues, I will get the PR merged and close this issue.

@ChuckPa
Copy link

ChuckPa commented Jun 6, 2022

@Jexu

I see no other issues at this time.
Please feel free to PR and merge

@Jexu
Copy link
Contributor

Jexu commented Jun 7, 2022

I will get the PR merged and close the issue now.

intel-mediadev pushed a commit that referenced this issue Jun 9, 2022
Enable intensity compensation to avoid the artifact for B frame decoding
Fixes #752
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Decode video decode related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants