[FFmpeg-devel] [RFC] Factorize some code from CAVS and H.264

Christophe GISQUET christophe.gisquet
Wed Jan 9 23:48:20 CET 2008


I noticed that CAVS (cavsdsp_mmx.c) uses the following macros from H.264:
- TRANSPOSE4 (dsputil_mmx.c, appeared in r1365; last changed in r8939)
- SUMSUB_BA (idct_mmx.c r4329, then h264dsp_mmx.c r4338; never changed)

In addition, such macros can be used in other dsp stuff (iDCT stuff 
mostly), so factorizing makes sense to me. TRANSPOSE8 is another candidate.

Now, there is a plurality of file origins, the macros had little change 
throughout their history, so I'm inclined to thing it's not worth 
copying dsputil_mmx.c (both file and history) to a new file and work 
from it.

Then, name to pick. Considering all those macros come from H.264 code, 
and are only macros, I would name it h264dsp_mmx.h.

Last, copyright. I consider Loren to be the real author of all this 
code, so I've attributed to him.

In case I make sense, please find a patch attached for all of this.

Best regards,
Christophe GISQUET
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: h264_utils.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080109/b18cde26/attachment.txt>

More information about the ffmpeg-devel mailing list