[FFmpeg-trac] #3407(avcodec:new): tiff/geotiff support : number precision is not sufficient in double to string conversion

FFmpeg trac at avcodec.org
Sat Feb 22 09:12:52 CET 2014


#3407: tiff/geotiff support : number precision is not sufficient in double to
string conversion
-------------------------------------+-------------------------------------
             Reporter:  LeRatier     |                     Type:
               Status:  new          |  enhancement
            Component:  avcodec      |                 Priority:  normal
             Keywords:  tiff,        |                  Version:  git-
  geotiff                            |  master
             Blocking:               |               Blocked By:
Analyzed by developer:  0            |  Reproduced by developer:  0
-------------------------------------+-------------------------------------
 In libavcodec/tiff.c, the double values of the GEOTIFF format are
 converted to string thru the double2str() function.

 This function is truncating double to 6 digits (ie the printf("%f")
 default), leading to critical precision loss when using the result on the
 decoder side

 An easy patch would be to modify the  "%f%s" of the snprintf in a
 "%.15g%s" for example.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3407>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list