[x264-devel] Re: x264: svn commit r146 (pengvado)

Tuukka Toivonen tuukkat at ee.oulu.fi
Mon Feb 28 21:31:21 CET 2005


On Mon, 28 Feb 2005, Subversion daemon wrote:

> r146 | pengvado | 2005-02-28 20:01:58 +0100 (Mon, 28 Feb 2005) | 2 lines
> Changed paths:
>   M /trunk/common/frame.c
>
> wrong stride in lowres image

Thanks for applying my fix, and sorry to nitpick but: r145 copied too 
little data (image width - 32) but now r146 copies too much data into the 
lowres image, 32 pixels extra, as you doubled the number of lowres pad 
space. This won't hurt as it comes from the pad space, but is a bit 
inefficient.

In r145, stride_lowres = (width+64)/2 = width/2+32
   => width_lowres = width/2 = stride_lowres-32

In r146, stride_lowres = (width+64)/2+32 = width/2+64
   => width_lowres = width/2 = stride_lowres-64

where width=original image width

I recommend removing my patch if you want to have 64 pixels pad space also 
in the low resolution image:

--- common/mc.c.orig	2005-02-28 22:29:25.000000000 +0200
+++ common/mc.c	2005-02-28 22:30:15.000000000 +0200
@@ -449,7 +449,7 @@
      // FIXME: tapfilter?
      const int i_stride = frame->i_stride[0];
      const int i_stride2 = frame->i_stride_lowres;
-    const int i_width2 = i_stride2 - 64/2;
+    const int i_width2 = i_stride2 - 64;
      int x, y, i;
      for( y = 0; y < frame->i_lines_lowres - 1; y++ )
      {

-- 
This is the x264-devel mailing-list
To unsubscribe, go to: http://developers.videolan.org/lists.html



More information about the x264-devel mailing list