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

implement intensity compensation for VC-1 decoding for Ivybridge and better #234

Merged
merged 3 commits into from
Jul 28, 2017

Conversation

carpalis
Copy link
Contributor

@carpalis carpalis commented Jul 25, 2017

VC1-decoder: implement intensity compensation for VC-1

Intensity compensation was not present for B-frames, but only for P-frames. When a P-frame flags intensity compensation for its forward reference frame, all subsequent B-frames that use this reference frame as well, need to do intensity compensation as well.

Fixes: #13 [IVB/BYT/BSW] Macroblocking artifact seen on a VC1 video file

Signed-off-by: Jerome Borsboom jerome.borsboom@carpalis.nl

Intensity compensation was not present for B-frames, but only for P-frames. When a P-frame flags intensity compensation for its forward reference frame, all subsequent B-frames that use this reference frame as well, need to do intensity compensation as well.
@xhaihao
Copy link
Contributor

xhaihao commented Jul 26, 2017

Could you please add a line of 'Fixes #xxx' to the commit message so that others know which issue is resolved by this commit?

intensitycomp_single_fwd = gen7_vc1_surface->intensity_compensation;
luma_scale1 = gen7_vc1_surface->luma_scale;
luma_shift1 = gen7_vc1_surface->luma_shift;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Does P frame also use the parameters from the reference frame? the commit message only says all subsequent B-frames need to do intensity compensation.

Copy link
Contributor Author

@carpalis carpalis Jul 26, 2017

Choose a reason for hiding this comment

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

The commit message only referenced the changes in intensity compensation. For P-frames intensity compensation was already working.

It is the P-frame that sets the parameters for its reference frame. Subsequently, the P-frame also uses this intensity compensated reference frame. Any B-frames that follow this P-frame and that reference that same reference frame also use the intensity compensation on the reference frame. (See 8.3.8 in VC-1 spec).

The patch stores the intensity compensation status with each surface. When such a surface is used as a reference, the stored intensity compensation status is used to program the graphics hardware.

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks for the explanation in detail

@xhaihao xhaihao merged commit c4df0f4 into intel:master Jul 28, 2017
MilhouseVH referenced this pull request Aug 30, 2017
Intensity compensation was not present for B-frames, but only for P-frames. When a P-frame flags intensity compensation for its forward reference frame, all subsequent B-frames that use this reference frame as well, need to do intensity compensation as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants