[x264-devel] [BUG] x264 shift exponent error when encoding a 1080p video with --no-cabac

Sasi Inguva isasi at google.com
Mon Jul 16 18:53:37 CEST 2018


Hi,

I found a bug in x264 code, when compiled with -fsantize=shift-exponent.
When I tried to encode the attached test file with --no-cabac, the encoding
fails with this error
common/vlc.c:84:27: runtime error: shift exponent 32 is too large for
32-bit type 'int'

Here is the full command line and logs:
make clean && ./configure  --enable-pic --enable-static
--extra-cflags="-fsanitize=shift-exponent"
--extra-ldflags="-fsanitize=shift-exponent" && make -j12 && \
./x264 --no-cabac --input-res 1920x1080  -o ~/temp.mkv  ~/test_short.yuv

yuv [info]: 1920x1080p 0:0 @ 25/1 fps (cfr)
common/vlc.c:84:27: runtime error: shift exponent 32 is too large for
32-bit type 'int'
x264 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
x264 [info]: profile High, level 4.0
x264 [info]: frame I:1     Avg QP:13.37  size: 53514

x264 [info]: frame P:27    Avg QP:20.41  size: 26810
x264 [info]: frame B:2     Avg QP:28.24  size: 22252
x264 [info]: consecutive B-frames: 90.0%  0.0% 10.0%  0.0%
x264 [info]: mb I  I16..4: 83.7%  9.5%  6.9%
x264 [info]: mb P  I16..4:  2.1%  1.0%  0.1%  P16..4:  6.7%  3.3%  1.2%
0.0%  0.0%    skip:85.6%
x264 [info]: mb B  I16..4:  0.2%  0.1%  0.2%  B16..8:  6.8%  2.6%  0.7%
direct: 1.6%  skip:87.8%  L0:41.9% L1:43.1% BI:15.0%
x264 [info]: 8x8 transform intra:19.7% inter:62.8%
x264 [info]: coded y,uvDC,uvAC intra: 9.3% 16.8% 14.3% inter: 3.8% 7.5% 6.5%
x264 [info]: i16 v,h,dc,p: 93%  6%  2%  0%
x264 [info]: i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 20% 11% 61%  3%  1%  1%  2%
2%  1%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 35% 28% 16%  6%  2%  2%  4%
3%  3%
x264 [info]: i8c dc,h,v,p: 79% 10%  9%  1%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: ref P L0: 65.6%  9.1% 16.7%  8.6%
x264 [info]: ref B L0: 72.0% 28.0%
x264 [info]: kb/s:5479.23

encoded 30 frames, 55.51 fps, 5484.05 kb/s

​​Please let me know if you need more information. Attaching the file as a
drive link, because sending as attachment did not work.

Thanks,
Sasi

​​​
 test_short.yuv
<https://drive.google.com/a/google.com/file/d/1WSHZPW0zkmylt3xeJiiMJR8rVytLYbX5/view?usp=drive_web>
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20180716/e4c543e9/attachment.html>


More information about the x264-devel mailing list