[FFmpeg-devel] [PATCH] RV40 Decoder - 2/3 - MC functions

Michael Niedermayer michaelni
Sun Nov 30 18:01:50 CET 2008


On Sat, Nov 29, 2008 at 08:40:21AM +0200, Kostya wrote:
> On Fri, Nov 28, 2008 at 09:13:32PM +0100, Michael Niedermayer wrote:
> > On Fri, Nov 28, 2008 at 07:38:21PM +0200, Kostya wrote:
> > > On Fri, Nov 28, 2008 at 09:23:35AM +0100, Michael Niedermayer wrote:
> > > > On Fri, Nov 28, 2008 at 09:25:09AM +0200, Kostya wrote:
> > > [...]
> > > > > > 
> > > > > > 
> > > > > > > \
> > > > > > > static void OPNAME ## rv40_qpel8_hv_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
> > > > > > >     const int h=8;\
> > > > > > >     uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
> > > > > > >     int i;\
> > > > > > >     for(i=0; i<h; i++)\
> > > > > > >     {\
> > > > > > >         OP(dst[0], (src[0] + src[1] + src[0 + srcStride] + src[1 + srcStride] + 2) >> 2);\
> > > > > > >         OP(dst[1], (src[1] + src[2] + src[1 + srcStride] + src[2 + srcStride] + 2) >> 2);\
> > > > > > >         OP(dst[2], (src[2] + src[3] + src[2 + srcStride] + src[3 + srcStride] + 2) >> 2);\
> > > > > > >         OP(dst[3], (src[3] + src[4] + src[3 + srcStride] + src[4 + srcStride] + 2) >> 2);\
> > > > > > >         OP(dst[4], (src[4] + src[5] + src[4 + srcStride] + src[5 + srcStride] + 2) >> 2);\
> > > > > > >         OP(dst[5], (src[5] + src[6] + src[5 + srcStride] + src[6 + srcStride] + 2) >> 2);\
> > > > > > >         OP(dst[6], (src[6] + src[7] + src[6 + srcStride] + src[7 + srcStride] + 2) >> 2);\
> > > > > > >         OP(dst[7], (src[7] + src[8] + src[7 + srcStride] + src[8 + srcStride] + 2) >> 2);\
> > > > > > >         dst+=dstStride;\
> > > > > > >         src+=srcStride;\
> > > > > > >     }\
> > > > > > > }\
> > > > > > 
> > > > > > duplicate of the hv code from mpeg1/2 ...
> > > > >  
> > > > > Could be, but I was not able to find such function in dsputil
> > > > 
> > > > put/avg_pixels_tab[1][3]
> > > 
> > > Tried those - they have an additional argument for height so they do not
> > > work with other functions. Should I add an additional argument for other
> > > RV3/4 luma MC functions as well?
> > 
> > func(a,b,c){
> >     func2(a,b,c,123);
> > }
> 
> That will work in these cases:
> 1. I move RV40 luma MC to dsputil.c (not a good idea IMO)
> 2. Make {put,avg}_pixels_xy2_c() non-static (not a good idea either)
> 3. Initialize DSPContext inside function and call that function (ineffective)

what about
func(abc) being in dsputil.c (where {put,avg}_pixels_xy2_c() is) and setting
mc33 from there too, while leaving the others in rv40 specific files?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

It is not what we do, but why we do it that matters.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081130/e8fa2128/attachment.pgp>



More information about the ffmpeg-devel mailing list