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

Top left corner "pink rectangle" glitch (I found fix) #9

Open
rep-stosw opened this issue Aug 17, 2022 · 0 comments
Open

Top left corner "pink rectangle" glitch (I found fix) #9

rep-stosw opened this issue Aug 17, 2022 · 0 comments

Comments

@rep-stosw
Copy link

rep-stosw commented Aug 17, 2022

In some frame sizes (160x128, 480x320, ...) there was a glitch in top left corner.

Solution: in function h264enc *h264enc_new(const struct h264enc_params *p) need to increase size for buffers:

	/* allocate reference picture memory */
	unsigned int luma_size = ALIGN(c->mb_width * 16, 32) * ALIGN(c->mb_height * 16, 32);
	unsigned int chroma_size = ALIGN(c->mb_width * 16, 32) * ALIGN(c->mb_height * 8, 32);

luma_size*=2;  //ugly fix
chroma_size*=2;

This fix this problem!

JPG
Clipboard01

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

No branches or pull requests

1 participant