[x264-devel] The csp order should be same in the project x264.
alexander tian
tian.alexandertian at gmail.com
Thu Dec 1 11:04:18 CET 2011
Hi everyone
I want to encode profile high422 for I422 colorspace today. I use the
program which "X264_BUILD" is 118. I set the parameters "input-csp" and
"output-csp" all to "i422". But the program stopped and return the message
that "resize [error]: not compiled with swscale support".
My encoding parameters as belows:
--nal-hrd cbr --pic-struct --tff --profile high422 --level 4.0 --weightp 0
--muxer raw --demuxer raw --input-csp i422 --input-res 720x576
--input-depth 8 --output-csp i422 --rc-lookahead 40 --slices 1 --aq-mode 1
--aq-strength 1.0 --b-pyramid none --8x8dct --mvrange-thread 576 --qcomp
0.1 --ratetol 1.0 --ipratio 1.4 --pbratio 1.3 --bitrate 2000 --vbv-maxrate
2000 --vbv-bufsize 2000 --vbv-init 0.5 --keyint 25 --ref 1 --no-fast-pskip
--no-dct-decimate --bframe 2 --b-adapt 2 --psy-rd 1.0:0.0 --direct spatial
--filter 0,0 --subme 6 --trellis 1 --analyse p8x8,p4x4,b8x8,i8x8,i4x4 --me
hex --seek 0 --frames 250 --threads 0 --log-level error -o
G:\auto_422_field_20111128_cbr_framethread.264
H:\Samples\YUV\SD\auto_422.yuv 720x576
I trace the program. At last I find that althought I set "input-csp" and
"output-csp" to "i422" but "output csp" equal to 4 and "input csp" equal to
2 in the program. So the program believes it need change colorspace.
Finally it returns the error message.
I think the csp order should be same in the program. So the order of the
structure "x264_cli_csps[]" should be same as the structure
"x264_csp_tab[]".
I change the structure
"const x264_cli_csp_t x264_cli_csps[] = {
[X264_CSP_I420] = { "i420", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },
[X264_CSP_I422] = { "i422", 3, { 1, .5, .5 }, { 1, 1, 1 }, 2, 1 },
[X264_CSP_I444] = { "i444", 3, { 1, 1, 1 }, { 1, 1, 1 }, 1, 1 },
[X264_CSP_YV12] = { "yv12", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },
[X264_CSP_YV16] = { "yv16", 3, { 1, .5, .5 }, { 1, 1, 1 }, 2, 1 },
[X264_CSP_YV24] = { "yv24", 3, { 1, 1, 1 }, { 1, 1, 1 }, 1, 1 },
[X264_CSP_NV12] = { "nv12", 2, { 1, 1 }, { 1, .5 }, 2, 2 },
[X264_CSP_NV16] = { "nv16", 2, { 1, 1 }, { 1, 1 }, 2, 1 },
[X264_CSP_BGR] = { "bgr", 1, { 3 }, { 1 }, 1, 1 },
[X264_CSP_BGRA] = { "bgra", 1, { 4 }, { 1 }, 1, 1 },
[X264_CSP_RGB] = { "rgb", 1, { 3 }, { 1 }, 1, 1 },
};"
to
"const x264_cli_csp_t x264_cli_csps[] = {
[X264_CSP_I420] = { "i420", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },
[X264_CSP_YV12] = { "yv12", 3, { 1, .5, .5 }, { 1, .5, .5 }, 2, 2 },
[X264_CSP_NV12] = { "nv12", 2, { 1, 1 }, { 1, .5 }, 2, 2 },
[X264_CSP_I422] = { "i422", 3, { 1, .5, .5 }, { 1, 1, 1 }, 2, 1 },
[X264_CSP_YV16] = { "yv16", 3, { 1, .5, .5 }, { 1, 1, 1 }, 2, 1 },
[X264_CSP_NV16] = { "nv16", 2, { 1, 1 }, { 1, 1 }, 2, 1 },
[X264_CSP_I444] = { "i444", 3, { 1, 1, 1 }, { 1, 1, 1 }, 1, 1 },
[X264_CSP_YV24] = { "yv24", 3, { 1, 1, 1 }, { 1, 1, 1 }, 1, 1 },
[X264_CSP_BGR] = { "bgr", 1, { 3 }, { 1 }, 1, 1 },
[X264_CSP_BGRA] = { "bgra", 1, { 4 }, { 1 }, 1, 1 },
[X264_CSP_RGB] = { "rgb", 1, { 3 }, { 1 }, 1, 1 },
};"
Then I run the program again. This time it encodes high422 successfully. I
decode the es file by jm18.0. The decoded yuv file plays well.
Is my comprehension right?
Any suggestions are welcome! Thanks a lot!
alexander tian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20111201/a08ee106/attachment.html>
More information about the x264-devel
mailing list