[FFmpeg-devel] [PATCH] Fix non-rounding up to next 16-bit aligned bug in IFF decoder

Sebastian Vater cdgs.basty
Wed Apr 28 16:32:44 CEST 2010


Sebastian Vater a ?crit :
> I have fixed the wrong IFF decoding issue in the IFF decoder.
>
> The reason is that the IFF docs say that each line in the BODY chunk has
> it's width rounded up to next 16-bit boundary, such that each new line
> begins on a word boundary (address divisible by 2).
>
> Please review and apply.
>
> I will do the heavy optimization stuff now based on this.
>
>   

Heavy optimization for decodeplane32 done. Patch attached.

Please note I got stuck onto this, this is twice as slow than my original non-static lut32 table patch.

So you have to get at least twice the decicycles.

Benchmark results for Ooze.iff using the basic up-rounding width fix patch:

basty at cdgs-basty:~/src/ffmpeg/build$ ./ffplay ../patches/Ooze.iff
FFplay version git-7f11c08, Copyright (c) 2003-2010 the FFmpeg developers
  built on Apr 28 2010 14:55:54 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
  configuration:
  libavutil     50.14. 0 / 50.14. 0
  libavcodec    52.66. 0 / 52.66. 0
  libavformat   52.61. 0 / 52.61. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[IFF @ 0x8b32790]Estimating duration from bitrate, this may be inaccurate
Input #0, IFF, from '../patches/Ooze.iff':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: iff_byterun1, rgba, 666x536, PAR 1:1 DAR
333:268, 90k tbr, 90k tbn, 90k tbc
48650 dezicycles in decodeplane32, 1 runs, 0 skips
48220 dezicycles in decodeplane32, 2 runs, 0 skips
46782 dezicycles in decodeplane32, 4 runs, 0 skips
46012 dezicycles in decodeplane32, 8 runs, 0 skips
45626 dezicycles in decodeplane32, 16 runs, 0 skips
45395 dezicycles in decodeplane32, 32 runs, 0 skips
45262 dezicycles in decodeplane32, 64 runs, 0 skips
45978 dezicycles in decodeplane32, 128 runs, 0 skips
45987 dezicycles in decodeplane32, 255 runs, 1 skips
45784 dezicycles in decodeplane32, 511 runs, 1 skips
45731 dezicycles in decodeplane32, 1023 runs, 1 skips
45791 dezicycles in decodeplane32, 2046 runs, 2 skips
45807 dezicycles in decodeplane32, 4091 runs, 5 skips sq=    0B f=0/0
45903 dezicycles in decodeplane32, 8178 runs, 14 skips
   0.33 A-V:  0.000 s:0.0 aq=    0KB vq=    0KB sq=    0B f=0/0   0/0

Benchmark results with the patch attached to this mail:
basty at cdgs-basty:~/src/ffmpeg/build$ ./ffplay ../patches/Ooze.iff
FFplay version git-7f11c08, Copyright (c) 2003-2010 the FFmpeg developers
  built on Apr 28 2010 14:55:54 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
  configuration:
  libavutil     50.14. 0 / 50.14. 0
  libavcodec    52.66. 0 / 52.66. 0
  libavformat   52.61. 0 / 52.61. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[IFF @ 0x8b33790]Estimating duration from bitrate, this may be inaccurate
Input #0, IFF, from '../patches/Ooze.iff':
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: iff_byterun1, rgba, 666x536, PAR 1:1 DAR
333:268, 90k tbr, 90k tbn, 90k tbc
109700 dezicycles in decodeplane32, 1 runs, 0 skips
72115 dezicycles in decodeplane32, 2 runs, 0 skips
52905 dezicycles in decodeplane32, 4 runs, 0 skips
42973 dezicycles in decodeplane32, 8 runs, 0 skips
41521 dezicycles in decodeplane32, 16 runs, 0 skips
36659 dezicycles in decodeplane32, 32 runs, 0 skips
33220 dezicycles in decodeplane32, 64 runs, 0 skips
31551 dezicycles in decodeplane32, 128 runs, 0 skips
30911 dezicycles in decodeplane32, 256 runs, 0 skips
30385 dezicycles in decodeplane32, 511 runs, 1 skips
30117 dezicycles in decodeplane32, 1023 runs, 1 skips
30015 dezicycles in decodeplane32, 2046 runs, 2 skips
29993 dezicycles in decodeplane32, 4088 runs, 8 skips sq=    0B f=0/0
30000 dezicycles in decodeplane32, 8174 runs, 18 skips
   1.62 A-V:  0.000 s:0.0 aq=    0KB vq=    0KB sq=    0B f=0/0   0/0

-- 

Best regards,
                   :-) Basty/CDGS (-:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-decoder-fix-heavy-dp32.patch
Type: text/x-patch
Size: 4013 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100428/fc92bb42/attachment.bin>



More information about the ffmpeg-devel mailing list