[FFmpeg-devel] [PATCH] use a 64-bit read in filter_mb_dir

Michael Niedermayer michaelni
Thu Jan 28 23:25:49 CET 2010


On Sun, Jan 24, 2010 at 06:00:24AM -0500, Alexander Strange wrote:
> 
> On Jan 24, 2010, at 5:22 AM, Michael Niedermayer wrote:
> 
> > On Sun, Jan 24, 2010 at 01:05:26AM -0500, Alexander Strange wrote:
> >> As in subject.
> >> 
> > 
> >> h264_loopfilter.c |    2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >> 966858b5c64362599cbd9396fcade8da7532d3e1  0001-Use-64-bit-read-for-a-check-in-filter_mb_dir.patch
> >> From 5a652e9d8c5b81eecbbb0a8d0492a9644801818c Mon Sep 17 00:00:00 2001
> >> From: Alexander Strange <astrange at ithinksw.com>
> >> Date: Sat, 23 Jan 2010 19:41:53 -0500
> >> Subject: [PATCH 1/2] Use 64-bit read for a check in filter_mb_dir().
> >> 
> >> ---
> >> libavcodec/h264_loopfilter.c |    2 +-
> >> 1 files changed, 1 insertions(+), 1 deletions(-)
> >> 
> >> diff --git a/libavcodec/h264_loopfilter.c b/libavcodec/h264_loopfilter.c
> >> index 84a3464..3b80d4a 100644
> >> --- a/libavcodec/h264_loopfilter.c
> >> +++ b/libavcodec/h264_loopfilter.c
> >> @@ -572,7 +572,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u
> >>                 }
> >>             }
> >> 
> >> -            if(bS[0]+bS[1]+bS[2]+bS[3] == 0)
> >> +            if(*(uint64_t*)bS == 0)
> > 
> > this can cause a partial memory stall, also ive already tried that without
> > seeing a speedgain. Is it faster for you?
> 
> Yes, but only by a little (not that I expected much).
> Around the "Calculate bS" loop on x86-64 core2:

iam not sure about this one but as its faster, if you want commit it

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Those who are too smart to engage in politics are punished by being
governed by those who are dumber. -- Plato 
-------------- 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/20100128/c1415c81/attachment.pgp>



More information about the ffmpeg-devel mailing list