[FFmpeg-devel] [PATCH] IFF: Add the HAM stuff

Sebastian Vater cdgs.basty
Fri May 14 21:37:00 CEST 2010


Namaste to all!

I've almost completely rewritten the HAM support now, the new HAM
decoder is 70-80% faster than the old one by taking advantage pipelining
and precalculated data.

The benchmark results for the new decoder are:
basty at cdgs-basty:~/src/ffmpeg/build$ ./ffplay ../patches/A4000T_HAM8.IFF
FFplay version git-svn-r23129, Copyright (c) 2003-2010 the FFmpeg developers
  built on May 13 2010 21:48:23 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
  configuration: --disable-avfilter
  libavutil     50.15. 2 / 50.15. 2
  libavcodec    52.67. 0 / 52.67. 0
  libavformat   52.62. 0 / 52.62. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[IFF @ 0x8b8a820]Estimating duration from bitrate, this may be inaccurate
Input #0, IFF, from '../patches/A4000T_HAM8.IFF':
  Metadata:
    comment         : $VER: Written by ASDG's Art Department
Professional IFF3.0.1 (03.19.93)
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: iff_byterun1, rgba, 628x512, PAR 1:1 DAR
157:128, 90k tbr, 90k tbn, 90k tbc
98490 dezicycles in decodehamplane32, 1 runs, 0 skips
94360 dezicycles in decodehamplane32, 2 runs, 0 skips
93135 dezicycles in decodehamplane32, 4 runs, 0 skips
91607 dezicycles in decodehamplane32, 8 runs, 0 skips
90965 dezicycles in decodehamplane32, 16 runs, 0 skips
89268 dezicycles in decodehamplane32, 32 runs, 0 skips
87971 dezicycles in decodehamplane32, 64 runs, 0 skips
88847 dezicycles in decodehamplane32, 128 runs, 0 skips
90659 dezicycles in decodehamplane32, 256 runs, 0 skips
92984 dezicycles in decodehamplane32, 512 runs, 0 skips
   0.84 A-V:  0.000 s:0.0 aq=    0KB vq=    0KB sq=    0B f=0/0   0/0

As compared to the perfomance on the same file with the previous HAM support patch:
basty at cdgs-basty:~/src/ffmpeg/build$ ./ffplay ../patches/A4000T_HAM8.IFF
FFplay version git-svn-r23129, Copyright (c) 2003-2010 the FFmpeg developers
  built on May 13 2010 21:48:23 with gcc 4.2.4 (Ubuntu 4.2.4-1ubuntu4)
  configuration: --disable-avfilter
  libavutil     50.15. 2 / 50.15. 2
  libavcodec    52.67. 0 / 52.67. 0
  libavformat   52.62. 0 / 52.62. 0
  libavdevice   52. 2. 0 / 52. 2. 0
  libswscale     0.10. 0 /  0.10. 0
[IFF @ 0x8b8a820]Estimating duration from bitrate, this may be inaccurate
Input #0, IFF, from '../patches/A4000T_HAM8.IFF':
  Metadata:
    comment         : $VER: Written by ASDG's Art Department Professional IFF3.0.1 (03.19.93)
  Duration: N/A, bitrate: N/A
    Stream #0.0: Video: iff_byterun1, rgba, 628x512, PAR 1:1 DAR 157:128, 90k tbr, 90k tbn, 90k tbc
163110 dezicycles in decodehamplane32, 1 runs, 0 skips
157090 dezicycles in decodehamplane32, 2 runs, 0 skips
153950 dezicycles in decodehamplane32, 4 runs, 0 skips
151243 dezicycles in decodehamplane32, 8 runs, 0 skips
148858 dezicycles in decodehamplane32, 16 runs, 0 skips
147682 dezicycles in decodehamplane32, 32 runs, 0 skips
147657 dezicycles in decodehamplane32, 64 runs, 0 skips
150153 dezicycles in decodehamplane32, 128 runs, 0 skips
152621 dezicycles in decodehamplane32, 255 runs, 1 skips
151366 dezicycles in decodehamplane32, 510 runs, 2 skips=    0B f=0/0
   0.77 A-V:  0.000 s:0.0 aq=    0KB vq=    0KB sq=    0B f=0/0   0/0

I don't use avctx->extradata anymore for the new data structures, I did a small but neat expandable data structure with all data needed just 9 bytes in size.

So we can change all relevant data on per frame basis and I already tested masking with it, easy from now on to get it in. ;-)

But will supply a separate patch for this one.

Have fun reviewing!

-- 

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: iff-ham-support.patch
Type: text/x-patch
Size: 20837 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100514/ac189abd/attachment.bin>



More information about the ffmpeg-devel mailing list