[FFmpeg-devel] [PATCH] h264 luma interpolation 8x8 for altivec
Mauricio Alvarez
lokifo
Mon Jun 18 18:14:08 CEST 2007
Hi All,
Here I'm sending a patch that adds support for luma interpolation of 8x8
blocks using Altivec. I have tested it on a G5 machine (Linux
2.6.15-1.2054_FC5, gcc 4.1.1) using some videos that I use for h264
research [1]). The resulting video files are md5 identical to the generated
by the original ffmpeg.
The execution time has been taken using the '-benchmark' option of ffmpeg
over 5 runs of each video input:
input orig. patched speed-up (%)
(time in seconds)
- 1088p25_blue_sky : 8,54 8,18 4,42
- 1088p25_pedestrian_area: 7,65 7,49 2,12
- 1088p25_riverbed : 10,66 10,39 2,59
- 1088p25_rush_hour : 8,23 8,05 2,21
Initially I assumed that the output array can have any misalignment (from 1
to 15), because of that is is necessary to include some code for generating
two masks for permutating the final result.
I made an analysis of this alignment and found that the destination result
is always aligned, based on that it is possible to remove the re-alignment
code at each store. I send a separate patch for this. Also It have been
tested and the md5 check passed OK.
Additionally I'm working on Altivec functions for doing the luma
interpolation for non-square blocks: 16x8, 8x16, 8x4 and 4x8. The
implementation of the functions is very easy. My question is how to
integrate them with DSPContext structure. An option could be to add a
position to the XXX_pixels_tab[][] structure, like this
index | size
0: 16x16
1: 8x8
2: 4x4
3: 16x8
4: 8x16
5: 8x4
6: 4x8
the main problem is calling these functions. What is the best place for
doing that?
hl_motion?
mc_dir_part?
Suggestions on this issue are welcome.
Regards,
Mauricio
-------------- next part --------------
A non-text attachment was scrubbed...
Name: h264_luma8x8_altivec.diff
Type: text/x-diff
Size: 31863 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070618/7c347bb1/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: altivec_align.diff
Type: text/x-diff
Size: 12282 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070618/7c347bb1/attachment-0001.diff>
More information about the ffmpeg-devel
mailing list