Skip to content

Support l1 weights in B slice header#95

Closed
Yang2096 wants to merge 1 commit intodholroyd:masterfrom
Yang2096:fix-weights
Closed

Support l1 weights in B slice header#95
Yang2096 wants to merge 1 commit intodholroyd:masterfrom
Yang2096:fix-weights

Conversation

@Yang2096
Copy link
Copy Markdown
Contributor

According to the H264 specification 7.3.3.2 Prediction weight table syntax, there is two layers of luma/chroma weight in B slice header.
image

@scottlamb
Copy link
Copy Markdown
Collaborator

Thanks! The code looks correct to me. Could you throw in a test and a "BREAKING CHANGE:" entry in CHANGELOG.md?

@Yang2096
Copy link
Copy Markdown
Contributor Author

It is hard to find or create a video that contains such slice header, i tried to encode a video using ffmpeg with -c:v libx264 -x264-params weightp=2:weightb=1, but the best i can get is l0 prediction weight.
Any suggestion?

@dholroyd
Copy link
Copy Markdown
Owner

dholroyd commented Mar 6, 2026

Looks like I implemented this in 27c6da1 having forgotten that this PR was open - sorry 😓

Do the changes in master meet your needs?

@Yang2096 Yang2096 closed this Mar 8, 2026
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.

3 participants