[FFmpeg-devel] [PATCH] fix 422 sse computation

Michael Niedermayer michaelni
Thu Aug 7 00:47:17 CEST 2008


On Tue, Aug 05, 2008 at 06:58:57PM -0700, Baptiste Coudurier wrote:
> Michael Niedermayer wrote:
> > On Mon, Aug 04, 2008 at 05:50:09PM -0700, Baptiste Coudurier wrote:
> >> Hi,
> >>
> >> $subject, I believe the patch is correct.
> >>
> >> -- 
> >> Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
> >> Smartjog USA Inc.                                http://www.smartjog.com
> >> Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
> > 
> >> Index: libavcodec/mpegvideo_enc.c
> >> ===================================================================
> >> --- libavcodec/mpegvideo_enc.c	(revision 14539)
> >> +++ libavcodec/mpegvideo_enc.c	(working copy)
> >> @@ -1901,6 +1901,7 @@
> >>  static int sse_mb(MpegEncContext *s){
> >>      int w= 16;
> >>      int h= 16;
> >> +    int mb_h= 16>>s->chroma_y_shift;
> > 
> > i think chr_h is a better name
> > 
> > 
> > [...]
> >> @@ -2012,6 +2013,7 @@
> >>  static int encode_thread(AVCodecContext *c, void *arg){
> >>      MpegEncContext *s= arg;
> >>      int mb_x, mb_y, pdif = 0;
> >> +    int mb_h= 16>>s->chroma_y_shift;
> > 
> > same
> > 
> > and iam  ok with the patch provided that it has been tested and works
> > 
> 
> Changed:
> 
> 422.m2v on mplayerhq.
> 
> Before (with psnr 422 patch):
> ffmpeg -i 422.m2v -pix_fmt yuv422p -mbd rd -psnr -b 6000k test.m2v
> 
> frame=  608 fps= 53 q=2.0 LPSNR=Y:49.09 U:48.74 V:50.21 *:49.20 size=
> 12587kB time=24.28 bitrate=4246.8kbits/s
> video:12587kB audio:0kB global headers:0kB muxing overhead 0.000000%
> 
> After:
> frame=  608 fps= 54 q=2.0 LPSNR=Y:49.12 U:49.02 V:50.53 *:49.31 size=
> 12351kB time=24.28 bitrate=4167.2kbits/s
> video:12351kB audio:0kB global headers:0kB muxing overhead 0.000000%
> 
> Code is not so obvious, and I understand this might need careful review.

looks ok

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20080807/60d2efc5/attachment.pgp>



More information about the ffmpeg-devel mailing list