Hi, BugMaster<br><br>Thank your reply.<br><br>I run the program on winxp. I compile the x264 by using vs2005. So I must make small changes to compile successfully in vs2005. I used this method to encode i420 csp all the while. Everything is well. <br>
<br>Today I do the test on the linux. I compile and run my changed program. The result is same as on windows. But everything is ok when I compile and run the unchanged program.<br><br>I realize the program return error message because I changed something for encoding i422 csp. I will analyse the reason next.<br>
<br>Thank you very much.<br><br>Tian<br><br><br><br><div class="gmail_quote">2011/12/2 BugMaster <span dir="ltr"><<a href="mailto:BugMaster@narod.ru">BugMaster@narod.ru</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Thu, 1 Dec 2011 18:04:18 +0800, alexander tian wrote:<br>
> Hi everyone<br>
<br>
> I want to encode profile high422 for I422 colorspace today. I use<br>
> the program which "X264_BUILD" is 118. I set the parameters<br>
> "input-csp" and "output-csp" all to "i422". But the program stopped<br>
> and return the message that "resize [error]: not compiled with swscale support".<br>
<br>
> My encoding parameters as belows:<br>
> --nal-hrd cbr --pic-struct --tff --profile high422 --level 4.0<br>
> --weightp 0 --muxer raw --demuxer raw --input-csp i422 --input-res<br>
> 720x576 --input-depth 8 --output-csp i422  --rc-lookahead 40<br>
> --slices 1 --aq-mode 1 --aq-strength 1.0 --b-pyramid none --8x8dct<br>
> --mvrange-thread 576 --qcomp 0.1 --ratetol 1.0 --ipratio 1.4<br>
> --pbratio 1.3 --bitrate 2000 --vbv-maxrate 2000 --vbv-bufsize 2000<br>
> --vbv-init 0.5 --keyint 25 --ref 1 --no-fast-pskip --no-dct-decimate<br>
> --bframe 2 --b-adapt 2 --psy-rd 1.0:0.0 --direct spatial --filter<br>
> 0,0 --subme 6 --trellis 1 --analyse p8x8,p4x4,b8x8,i8x8,i4x4 --me<br>
> hex --seek 0 --frames 250 --threads 0 --log-level error -o<br>
> G:\auto_422_field_20111128_cbr_framethread.264<br>
> H:\Samples\YUV\SD\auto_422.yuv 720x576<br>
<br>
> I trace the program. At last I find that althought I set<br>
> "input-csp" and "output-csp" to "i422" but "output csp" equal to 4<br>
> and "input csp" equal to 2 in the program. So the program believes<br>
> it need change colorspace. Finally it returns the error message.<br>
<br>
> I think the csp order should be same in the program. So the order<br>
> of the structure "x264_cli_csps[]" should be same as the structure "x264_csp_tab[]".<br>
<br>
> I change the structure<br>
> "const x264_cli_csp_t x264_cli_csps[] = {<br>
>     [X264_CSP_I420] = { "i420", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },<br>
>     [X264_CSP_I422] = { "i422", 3, { 1, .5, .5 }, { 1,  1,  1 }, 2, 1 },<br>
>     [X264_CSP_I444] = { "i444", 3, { 1,  1,  1 }, { 1,  1,  1 }, 1, 1 },<br>
>     [X264_CSP_YV12] = { "yv12", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },<br>
>     [X264_CSP_YV16] = { "yv16", 3, { 1, .5, .5 }, { 1,  1,  1 }, 2, 1 },<br>
>     [X264_CSP_YV24] = { "yv24", 3, { 1,  1,  1 }, { 1,  1,  1 }, 1, 1 },<br>
>     [X264_CSP_NV12] = { "nv12", 2, { 1,  1 },     { 1, .5 },     2, 2 },<br>
>     [X264_CSP_NV16] = { "nv16", 2, { 1,  1 },     { 1,  1 },     2, 1 },<br>
>     [X264_CSP_BGR]  = { "bgr",  1, { 3 },         { 1 },         1, 1 },<br>
>     [X264_CSP_BGRA] = { "bgra", 1, { 4 },         { 1 },         1, 1 },<br>
>     [X264_CSP_RGB]  = { "rgb",  1, { 3 },         { 1 },         1, 1 },<br>
> };"<br>
> to<br>
> "const x264_cli_csp_t x264_cli_csps[] = {<br>
>     [X264_CSP_I420] = { "i420", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },<br>
>     [X264_CSP_YV12] = { "yv12", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },<br>
>     [X264_CSP_NV12] = { "nv12", 2, { 1,  1 },     { 1, .5 },     2, 2 },<br>
>     [X264_CSP_I422] = { "i422", 3, { 1, .5, .5 }, { 1,  1,  1 }, 2, 1 },<br>
>     [X264_CSP_YV16] = { "yv16", 3, { 1, .5, .5 }, { 1,  1,  1 }, 2, 1 },<br>
>     [X264_CSP_NV16] = { "nv16", 2, { 1,  1 },     { 1,  1 },     2, 1 },<br>
>     [X264_CSP_I444] = { "i444", 3, { 1,  1,  1 }, { 1,  1,  1 }, 1, 1 },<br>
>     [X264_CSP_YV24] = { "yv24", 3, { 1,  1,  1 }, { 1,  1,  1 }, 1, 1 },<br>
>     [X264_CSP_BGR]  = { "bgr",  1, { 3 },         { 1 },         1, 1 },<br>
>     [X264_CSP_BGRA] = { "bgra", 1, { 4 },         { 1 },         1, 1 },<br>
>     [X264_CSP_RGB]  = { "rgb",  1, { 3 },         { 1 },         1, 1 },<br>
> };"<br>
> Then I run the program again. This time it encodes high422<br>
> successfully. I decode the es file by jm18.0. The decoded yuv file plays well.<br>
<br>
> Is my comprehension right?<br>
> Any suggestions are welcome! Thanks a lot!<br>
<br>
> alexander tian<br>
<br>
Hi. I doubt this have anything todo with order in x264_cli_csps<br>
because for every element there is explicit position constantant and<br>
so reodering shouldn't change real order. Also I tried your<br>
commandline with the current version (r2106) without swscale support<br>
and didn't get any errors so you probably messed up something in<br>
commandline first time (there are doubtful params there like<br>
resolution with and without --input-res) and then fixed it so all<br>
become correct.<br>
<br>
_______________________________________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x264-devel" target="_blank">http://mailman.videolan.org/listinfo/x264-devel</a><br>
</blockquote></div><br>