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

LWscale positions chroma wrong. #625

Open
mightyhuhn opened this issue Nov 12, 2024 · 9 comments
Open

LWscale positions chroma wrong. #625

mightyhuhn opened this issue Nov 12, 2024 · 9 comments

Comments

@mightyhuhn
Copy link

steps to reproduce.
disable everything except p016 in lavfilter in mpc-hc
take a PNG or webp (jpg may use a different source filter)

https://slow.pics/c/UHEltdhq
Gundam5

madVR does the same but i will not rule a out a general error with video renderers.
for technical both assume mpeg2 but it seem it is moved by an entire pixel to the left.

the important of this bug report is close to none existent.

@Nevcairiel
Copy link
Owner

Whats LWscale and what does it have to do with LAV?

@mightyhuhn
Copy link
Author

good point whats the name of the lib that does the subsampling lav filter?

@kasper93
Copy link
Contributor

good point whats the name of the lib that does the subsampling lav filter?

do you mean swscale? Anyway, send input file used to produce this result.

@mightyhuhn
Copy link
Author

it's the image below the comparison i have shared it. the png.

swscale is possible.

@Nevcairiel
Copy link
Owner

Both swscale API and internals are being reworked right now anyway, also the ability to even subsample in the first place is only offered for testing and/or to ensure any kind of image is output. Its not mean to be fast or high quality.

@mightyhuhn
Copy link
Author

"the important of this bug report is close to none existent."

so we just rename this to: "chroma placement error when forcing RGB to 420" and call it a day?

i will recheck it when the rework is finished.

@kasper93
Copy link
Contributor

kasper93 commented Nov 12, 2024

Both swscale API and internals are being reworked right now anyway, also the ability to even subsample in the first place is only offered for testing and/or to ensure any kind of image is output. Its not mean to be fast or high quality.

I agree it can wait for new API, but this would likely be bigger change. For now as a hotfix you could set VideoChromaSubsampling to center chroma on output? Maybe smarter renderer like madVR reads this flag. (?)

Or set the chroma offset for swscale, even using old api... (I think haasn eventually will infer chroma loc automagically per in/out format, if possible, but probably only for new API)

Anyway, not a big deal, the aliasing with bilinear downscaling is insane anyway, so it wouldn't look much better, but indeed chroma location is a thing that is often missing/broken.

@mightyhuhn
Copy link
Author

mightyhuhn commented Nov 12, 2024

madVR ignores the chromaloc always.

mpcVR does it wrong and it looks like they copied from mpv. (for none mpeg2)

as very often i don't need this fixed there other ways to do that.

@mightyhuhn
Copy link
Author

mpcVR and mpv should do this correctly i'm just to stupid to encode.

so yes flagging it as center could be enough and doing center is not a bug it's a valid position.

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

3 participants