Skip to content

H264: fix botw 1080p cutscene green screen#1898

Open
lijunyu-cn wants to merge 1 commit into
cemu-project:mainfrom
lijunyu-cn:fix_botw_cutscene_green_screen
Open

H264: fix botw 1080p cutscene green screen#1898
lijunyu-cn wants to merge 1 commit into
cemu-project:mainfrom
lijunyu-cn:fix_botw_cutscene_green_screen

Conversation

@lijunyu-cn

Copy link
Copy Markdown
Contributor

No description provided.

@Exzap

Exzap commented May 4, 2026

Copy link
Copy Markdown
Member

can you explain the changes

@rcaridade145

Copy link
Copy Markdown
Contributor

This does conflict with #1894

@lijunyu-cn

Copy link
Copy Markdown
Contributor Author

Typically, the length parameter passed to H264DECGetImageSize points to several bytes after the end of the SPS NAL unit. These extra bytes are passed into h264Parser_ParseSPS, which eventually returns false when readTrailingRBSPBits is called within parseNAL_seq_parameter_set_rbsp. This behavior causes H264DECGetImageSize to consistently fail to obtain the correct width and height values.

Considering that h264Parser_ParseSPS, parseNAL_seq_parameter_set_rbsp, and readTrailingRBSPBits are very fundamental decoder functions, much existing code might rely on their current behavior. Therefore, I only made modifications within H264DECGetImageSize. By simply truncating the extra data after the first found SPS NAL unit, h264Parser_ParseSPS can now return the correct width and height parameters.

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