[Cin] Parch preventing compilation failure in thirdparty/x264

Andrew Randrianasulu randrianasulu at gmail.com
Thu Nov 12 12:20:53 CET 2020


I was recompiling CinGG fot testing "--with-single-user" and found it will fail in x264 directory without some of my old reverts, performed by slackbuild.

I have old (2.8) ffmpeg installed system-wide, and x264's configure script was not disabling this integration correctly (even if code was unconditionally adapted to new ffmpeg), so compilation fail.

I just added one more parameter in x264 line of thirdparty/Makefile

diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile
index 27f13c65..880d3128 100644
--- a/cinelerra-5.1/thirdparty/Makefile
+++ b/cinelerra-5.1/thirdparty/Makefile
@@ -249,7 +249,7 @@ tiff.cfg_params+= --enable-shared=no --disable-zstd $(call if_pkg,libwebp,\
  --with-webp-lib-dir=$(call pkg_libs,libwebp))\
  $(call if_npkg,libwebp,--disable-webp)
 twolame.cfg_params?=--enable-shared=no
-x264.cfg_params?= --enable-static --enable-pic
+x264.cfg_params?= --disable-swscale --enable-static --enable-pic
 x265.cfg_vars?=$(call cmake_config,source)
 x265.cfg_params?= -DENABLE_SHARED=no
 libvpx.cfg_params?= --enable-pic --disable-avx512

shold be applicable cleanly to latest  git (commit 3325029f915f54fe7e14d7b2cb1d4b8f4dd8a640 )

I don't think many use such outdated ffmpeg, but this line should not hurt (because x264 in our case just feed via libavcodec API, and scaling can be done early)

I rendered small fragment with non-default pixel format, and it appear to work:

mediainfo /dev/shm/test.mp4
General
Complete name                            : /dev/shm/test.mp4
Format                                   : MPEG-4
Format profile                           : Base Media
Codec ID                                 : isom (isom/iso2/avc1/mp41)
File size                                : 1.16 MiB
Duration                                 : 15 s 382 ms
Overall bit rate                         : 633 kb/s
Writing application                      : Lavf58.45.100

Video
ID                                       : 1
Format                                   : AVC
Format/Info                              : Advanced Video Codec
Format profile                           : High 4:4:4 Predictive at L3
Format settings                          : CABAC / 4 Ref Frames
Format settings, CABAC                   : Yes
Format settings, Reference frames        : 4 frames
Codec ID                                 : avc1
Codec ID/Info                            : Advanced Video Coding
Duration                                 : 15 s 360 ms
Bit rate                                 : 499 kb/s
Width                                    : 720 pixels
Height                                   : 576 pixels
Display aspect ratio                     : 4:3
Frame rate mode                          : Constant
Frame rate                               : 25.000 FPS
Standard                                 : PAL
Color space                              : YUV
Chroma subsampling                       : 4:4:4
Bit depth                                : 8 bits
Scan type                                : Progressive
Bits/(Pixel*Frame)                       : 0.048
Stream size                              : 936 KiB (79%)
Writing library                          : x264 core 157
Encoding settings                        : cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x1:0x111 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=0 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=4 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=25 / keyint_min=13 / scenecut=40 / intra_refresh=0 / rc_lookahead=25 / rc=crf / mbtree=1 / crf=23.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Color range                              : Limited
Matrix coefficients                      : BT.601
Codec configuration box                  : avcC

Audio
ID                                       : 2
Format                                   : AAC LC
Format/Info                              : Advanced Audio Codec Low Complexity
Codec ID                                 : mp4a-40-2
Duration                                 : 15 s 382 ms
Bit rate mode                            : Constant
Bit rate                                 : 128 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 48.0 kHz
Frame rate                               : 46.875 FPS (1024 SPF)
Compression mode                         : Lossy
Stream size                              : 240 KiB (20%)
Language                                 : Russian
Default                                  : Yes
Alternate group                          : 1

mplayer also showing video and saying among other things:

[swscaler @ 0x57740034]bicubic scaler, from yuv444p to yuv420p using MMXEXT

But I can keep this patch local if you think it  risky to apply.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: x264_swscale_disable.diff
Type: text/x-diff
Size: 668 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20201112/296e8aa9/attachment.bin>


More information about the Cin mailing list