[x264-devel] "mv cost test failed; x264 has been miscompiled" problem
Kevin.Liu
kevin.liu at innosofts.com
Fri Jan 29 07:37:23 CET 2010
Hi Dark Shikari,
Sorry for the wrong date of the library. The correct is x264-snapshot-20100120 and ffmpeg-snapshot-20100128. :)
I built (cegcc) the libx264.a and compiled the ffmpeg dll library with libx264 . I used the dll in my procedure.
I found the params of X264Context is almost set by AvCodecContext in libx264.c of ffmpeg, so i just set the value which the struct AvCodecCotext have in the default preset file :
>coder=1
>flags=+loop
>cmp=+chroma
>partitions=+parti8x8+parti4x4+partp8x8+partb8x8
>me_method=hex
>subq=6
>me_range=16
>g=250
>keyint_min=25
>sc_threshold=40
>i_qfactor=0.71
>b_strategy=1
>qcomp=0.6
>qmin=10
>qmax=51
>qdiff=4
>directpred=1
>flags2=+fastpskip
you means everything in the default preset file should be set to the ffmpeg by myself including "coder","flags"and others which AvcodecContext not have ?
I have built the x264 library(snapshot-20090419) for ffmpeg(20090320) with the same method ,and in that library it has no "broken ffmpeg setting error" "mv cost test failed" and can open the x264 encoder but the x264 can not support the arm with datatype misalignment error. So I built the new version.
>Try disabling -ffast-math.
I can not do this when I ./configure the x264 ?
Best regards,
Kevin Liu
Best regards,
Kevin Liu
-----Original Message-----
From: x264-devel-bounces at videolan.org [mailto:x264-devel-bounces at videolan.org] On Behalf Of Jason Garrett-Glaser
Sent: 2010年1月29日 14:04
To: Mailing list for x264 developers
Subject: Re: [x264-devel] "mv cost test failed; x264 has been miscompiled" problem
On Thu, Jan 28, 2010 at 9:57 PM, Kevin.Liu <kevin.liu at innosofts.com> wrote:
> Hi all,
>
> I have embedded the x264 library (2008-01-26) to ffmpeg (2008-01-28) and
I doubt these are the actual dates of the packages--as the errors you
noted did not exist at the time.
> migrated to wince (armv4i),but I can not open the x264 coder with the error
> “broken ffmpeg default setting detected”. I found the error message in the
> file “encoder.c “ of x264.
>
>
>
> /* Detect default ffmpeg settings and terminate with an error. */
>
> {
>
> int score = 0;
>
> score += h->param.analyse.i_me_range == 0;
>
> score += h->param.rc.i_qp_step == 3;
>
> score += h->param.i_keyint_max == 12;
>
> score += h->param.rc.i_qp_min == 2;
>
> score += h->param.rc.i_qp_max == 31;
>
> score += h->param.rc.f_qcompress == 0.5;
>
> score += fabs(h->param.rc.f_ip_factor - 1.25) < 0.01;
>
> score += fabs(h->param.rc.f_pb_factor - 1.25) < 0.01;
>
> score += h->param.analyse.inter == 0 &&
> h->param.analyse.i_subpel_refine == 8;
>
> if( score >= 5 )
>
> {
>
> x264_log( h, X264_LOG_ERROR, "broken ffmpeg default settings
> detected\n" );
>
> x264_log( h, X264_LOG_ERROR, "use an encoding preset (vpre)\n"
> );
>
> return -1;
>
> }
>
> }
>
>
>
> it seems that some param were not set correctly with ffmpeg default setting
> . So I changed the params to this which is included in the ffmpeg-preset
> file:
>
>
>
> h->param.analyse.i_me_range == 16;
>
> h->param.rc.i_qp_step == 4;
>
> h->param.i_keyint_max == 10;
>
> h->param.rc.i_qp_min == 10;
>
> h->param.rc.i_qp_max == 51;
>
> h->param.rc.f_qcompress == 0.6;
>
> h->param.rc.f_ip_factor=1/0.71;
>
>
>
> and the error has gone
That's not what you're supposed to do. You're supposed to copy
_everything_ in the preset file of your choice (normal, default, or
hq, in order of faster to slower). The heuristic in x264 exists
solely to warn you when you forgot to do that.
,but another error came out “mv cost test
> failed; x264 has been miscompiled”. The error is also in function ‘
> x264_encoder_open ‘ the file “encoder.c”
>
>
>
> if( h->cost_mv[1][2013] != 24 )
>
> {
>
> x264_log( h, X264_LOG_ERROR, "MV cost test failed: x264 has been
> miscompiled!\n" );
>
> goto fail;
>
> }
>
> I am not familiar with the h264 encode , so I do not what should I do next.
> Is this show that my params are wrong again or something also ?
However you have built and linked x264, it has been miscompiled and,
if not for that check, would generate invalid output.
Try disabling -ffast-math.
Dark Shikari
_______________________________________________
x264-devel mailing list
x264-devel at videolan.org
http://mailman.videolan.org/listinfo/x264-devel
More information about the x264-devel
mailing list