- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 888
JpegEncoder - Optimize Some Low Hanging Fruit #1533
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
Conversation
| This is all working on my SB2. I'll have to crack open the mac to see what's happening here. 😢 | 
| Definitely a Jit issue. Removing inlining changed the error. I’ll manually inline everything into the method. | 
| Codecov Report
 @@            Coverage Diff             @@
##           master    #1533      +/-   ##
==========================================
- Coverage   83.52%   83.47%   -0.05%     
==========================================
  Files         742      742              
  Lines       32802    32830      +28     
  Branches     3671     3667       -4     
==========================================
+ Hits        27399    27406       +7     
- Misses       4689     4709      +20     
- Partials      714      715       +1     
 Flags with carried forward coverage won't be shown. Click here to find out more. 
 Continue to review full report at Codecov. 
 | 
| Everything works now. Will try and recreate the JIT issue and open an issue upstream | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one suggestion.
| Is this code just for dividing your 8x8 blocks by the quantization table?  If so, why not calculate the reciprocal of the QT values up front so you can multiply instead?  Also, you can probably use  | 
| 
 I'll be honest @saucecontrol and say it's been a while since I looked at all this so I've forgotten a lot of how jpeg works. I'm just limiting changes to known bottlenecks (that part was actually the least of the three). Regarding  | 
| Ha, I've just started re-learning everything I've ever semi-understood about JPEG. Didn't expect the quantization to be much of a bottleneck, but it seems you got some good gains from widening the vectors, so it may be worth looking into some other time. | 
| 
 Man... I cannot wait to see what you bring to the table. | 
| Getting so close now... 
 | 
JpegEncoder - Optimize Some Low Hanging Fruit
Prerequisites
Description
I had a go at optimizing some of the methods identified by @tkp1n here
#1476 (comment)
BEFORE
AFTER