bugThe FreeType Project - Bugs: bug #49096, Pixel identical cross platform...

 
 

bug #49096: Pixel identical cross platform rendering and FT_CONFIG_OPTION_FORCE_INT64 on Windows

Submitted by:  Wilhelm Berg <bergwerk>
Submitted on:  Thu 15 Sep 2016 02:02:00 PM UTC  
 
Severity: 3 - NormalItem Group: None
Status: Wont FixPrivacy: Public
Assigned to: NoneOpen/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 16 Sep 2016 02:54:49 PM UTC, comment #4:

Look for FT_LONG64 in this file. I am working to merge the algorithms again using even faster code.

I will close the bug report. Please reopen if you find some significant differences of 2 or more out of 255.

Alexei Podtelezhnikov <podtelez>
Project Member
Fri 16 Sep 2016 08:01:08 AM UTC, comment #3:

Thanks Alexei.

I think we are going to look into increasing the epsilon.

Was also curious why FT_CONFIG_OPTION_FORCE_INT64 had such a great impact as I couldn't figure out where the code branches based on that option.

Wilhelm Berg <bergwerk>
Thu 15 Sep 2016 02:52:07 PM UTC, comment #2:

Right now we have two versions of smooth rendering algorithms: an old one for 32-bit and a faster new algorithms for 64-bit platform. What you describe is the difference between the outcomes. There was also some work to speed both algorithms.

As you said the difference is minimal and not visible to the naked eye but the speed gains are huge. It is possible that the new algorithm is closer to the truth too. I suggest that you implement your tests with some epsilon larger than zero or one.

If you benchmark the new version you'll see the benefits.

Alexei Podtelezhnikov <podtelez>
Project Member
Thu 15 Sep 2016 02:08:56 PM UTC, comment #1:

Sorry, forgot to mention:

  • Using Visual Studio 2015 Update 3
  • Building Release|x64
Wilhelm Berg <bergwerk>
Thu 15 Sep 2016 02:02:00 PM UTC, original submission:

During the upgrade from 2.6.1 to 2.6.5/2.7 we noticed a lot of failed visual tests for mapnik on Windows.

The reference images are created on OsX and have been perfectly identical on Linux as well as on Windows up to 2.6.1.

I've read about the expected changes associated with new sub pixel hinting and tried different settings and combinations thereof:

  • TT_CONFIG_OPTION_SUBPIXEL_HINTING
  • interpreter-version 0|35|38|40
  • no_stem_darkening 0|1
  • ...

and the number of different pixels was in the hundreds.

The only option that reduced the number of different pixels (mostly in the lower tens) was "#define FT_CONFIG_OPTION_FORCE_INT64".

Otherwise using stock "/include/freetype/config/ftoption.h" and "ftconfig.h".

The differences are minimal and almost not visible to the naked eye.
However we enforce zero difference on mapnik visual tests and would like to keep it that way.

Looking through the code I'm not sure how "#define FT_CONFIG_OPTION_FORCE_INT64" could possibly influence results as "ftconfig.h" seems to branch to the same code (on Windows) whether it is defined or not.

Any hints on which settings to use to get pixel identical output again are highly appreciated.

Or a comment if pixel identical cross platform rendering is even expected?


4 images of one mapnik test are attached:

  • With "FT_CONFIG_OPTION_FORCE_INT64", difference: 2 pixels
  • Without "FT_CONFIG_OPTION_FORCE_INT64", difference: 274 pixels
Wilhelm Berg <bergwerk>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #38517:  freetype-images.zip added by bergwerk (115KiB - application/x-zip-compressed)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by podtelez (Posted a comment)
  • -unavailable- added by bergwerk (Submitted the item)
  • -unavailable- added by bergwerk
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 16 Sep 2016 02:54:49 PM UTCpodtelezStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Thu 15 Sep 2016 02:02:00 PM UTCbergwerkAttached File-=>Added freetype-images.zip, #38517
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1