[x264-devel] Yet another updated threaded slicetype patch (v14)

Dragon dragon5152 at gmail.com
Mon May 11 05:14:41 CEST 2009


Yes, the v14 patch plus the following works fine for me on windows.
Only compiles correctly with gcc 4.x+ but then again, I don't think people
should be using the older 3.4 anyway.

following:
diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index f795d4c..a2d62cd 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -364,8 +364,8 @@ static int x264_slicetype_path_cost( x264_t *h,
x264_mb_analysis_t *a, x264_fram
        /* Find the location of the next P-frame. */
        while( path[next_p] && path[next_p] != 'P' )
            next_p++;
-        /* Return if the path doesn't end on a P-frame. */
-        if( path[next_p] != 'P' )
+        /* Return if the path doesn't end on a P-frame or reaches max
length */
+        if( path[next_p] != 'P' || next_p > MAX_LENGTH )
            return cost;

        /* Add the cost of the P-frame found above */
@@ -422,7 +422,7 @@ static void x264_slicetype_path( x264_t *h,
x264_mb_analysis_t *a, x264_frame_t

 static int x264_slicetype_path_search( x264_t *h, x264_mb_analysis_t
*a, x264_frame_t **frames, int length, int bframes, int buffer )
 {
-    char best_paths[MAX_LENGTH][MAX_LENGTH] = {"","P"};
+    char best_paths[MAX_LENGTH+1][MAX_LENGTH] = {"","P"};
    int n;
    for( n = 2; n < length-1; n++ )
        x264_slicetype_path( h, a, frames, n, bframes, buffer, best_paths );


On Sun, May 10, 2009 at 10:02 AM, Mike Kazmier <DaKaZ at zenbe.com> wrote:

> On Thu, Apr 16, 2009 at 11:35 AM "Steven Walters" <kemuri9 at gmail.com>
> wrote:
> >>
> > > No, the v14 patch runs perfectly on linux.
> > >
> > > --DaKaZ
> > >
> >
> > that made me suspicious so i compiled it in my gcc 4.3.3 (x64) and
> > without the fix it silently closes without tossing out a complaint
> > (but).
> > it took the previous mentioned fix to have
> >
> > ./x264.exe --lookahead 10 --b-adapt 2 -b16 --crf 18 -o NUL
> > ../foreman_cif_352x288.yuv --me tesa -m9 --pass 1 --threads 4 -v 2>
> > verbose.txt
> >
> > result in
> >
> > x264 [info]: slice I:2     Avg QP:18.33  size: 30960  PSNR Mean
> > Y:43.80 U:46.40 V:47.92 Avg:44.65 Global:44.28
> > x264 [info]: slice P:128   Avg QP:20.78  size:  6730  PSNR Mean
> > Y:40.60 U:43.92 V:46.01 Avg:41.61 Global:41.42
> > x264 [info]: slice B:170   Avg QP:23.92  size:  1915  PSNR Mean
> > Y:38.70 U:42.96 V:45.18 Avg:39.85 Global:39.69
> >
> > which seems to be the proper consensus among properly working versions.
> >
> > looks like i'll have to find/make an x86 version of mingw 4.3.3 and
> > confirm it works there and see if it's a failure of gcc 3.4.x...
>
> Steven, all windows users: I really want to get this patch into the main
> GIT repository so that other work can begin on items like lookahead VBV and
> b-adapt 2 threading.  Is the consensus that this patch (with Steven's) works
> properly?  if so, I will incorporate the two ASAP and get them submitted for
> inclusion.
>
> --DaKaZ
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20090510/b0ae1782/attachment.htm>


More information about the x264-devel mailing list