[x264-devel] Yet another updated threaded slicetype patch (v14)
Dragon
dragon5152 at gmail.com
Thu Apr 16 06:25:03 CEST 2009
Something leads me to believe there is something horribly broken with said
fix.
http://img12.imageshack.us/img12/7503/brokenp.png
I've done non-threaded-slicetype encodes on the same video and the bframes
should be > pframes.
So something went borked.
On Wed, Apr 15, 2009 at 4:34 PM, Steven Walters <kemuri9 at gmail.com> wrote:
> I've had some more time to try and nail this down and applying the
> following diff on top of the v14 patch i no longer get any seg faults:
>
> 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
> );
>
> this should probably be confirmed as being correct.
> _______________________________________________
> 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/20090416/7e55b266/attachment.htm>
More information about the x264-devel
mailing list