-
Notifications
You must be signed in to change notification settings - Fork 17
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
It always uses decode_mcu_slow even with dinfo.dct_method = J_DCT_METHOD::JDCT_IFAST #8
Comments
You're changing DCT method, but profiling MCU entropy decoding. These are completely different unrelated things. Use of |
BTW, MozJPEG is slow by design. It intentionally uses slowest (but highest quality) version of everything. |
Hm, any idea why it could be corrupt/incomplete? I'm getting complete frames out at the end, and I'm just forwarding the data that I'm getting from the webcam. Could it be because it's a cheap webcam that delivers corrupted MJPEG frames?
Is there any jpeg decoder that's faster and also has Rust bindings? :) (Btw, with this crate I'm getting 9-10% CPU usage (and without webcam decoding, my application only has 4% CPU usage). I tried the |
I haven't studied MJPEG spec, so I can't say why exactly it's like that. If you could reproduce the issue with pure C code, you could ask about it in libjpeg-turbo project (MozJPEG is a fork of libjpeg-turbo). |
When I write
dinfo.dct_method = J_DCT_METHOD::JDCT_IFAST;
it seems to call the samedecode_mcu_slow
function as without.It seems to not change anything (same CPU usage when decoding 30fps 1080p MJPEG).
Is this library hardcoded to use
ISLOW
or is it dictated by the specific jpeg image that it cannot be decoded withIFAST
?This is what I'm doing every frame:
I profiled it, and
IFAST
made no difference, I got the same execution times as without setting it:Any idea how I can make it really use
IFAST
? :)The text was updated successfully, but these errors were encountered: