[MPlayer-dev-eng] [PATCH] x264encopt accepts x264 preset/tune/profile , noturbo
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Tue Jun 8 21:17:56 CEST 2010
On Thu, May 27, 2010 at 10:36:17PM +0200, Micha wrote:
> It's not very much, but I think this complies to the libx264 interface.
> There are probably more points in this code to be reconsidered, but I
> just wanted to provide a working version to use presets. Please take
> into account, that this is my first contribution and that I, most
> likely, made some formal errors and/or wrote poor C code.
I think presets would be a very helpful thing to have, but I don't even
use that part on MPlayer and I certainly don't maintain it.
Any volunteers?
> + copy = malloc( strlen(arg)+1 );
> + if(copy != NULL)
> + arg_copy = strcpy( copy, arg);
strdup() is the all-in-one version of that...
> + arg_copy += strcspn(arg_copy, ":");
> + value = strchr( name, '=' );
I think you place the spaces a bit strangely and inconsistently...
> + // "medium" enables one to supply tune without explicit preset
> + if( x264_param_default_preset(¶m, preset ? preset : "medium" , tune) ) {
This seems strange to me, why does preset need a NULL check but not tune?
Is the x264 API that strange or some other reason?
I suspect it should be fine otherwise...
Reimar
More information about the MPlayer-dev-eng
mailing list