From patchwork Thu Jul 1 21:54:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 28736 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp1040488ios; Thu, 1 Jul 2021 15:00:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVznp8pFHq8F7w+7/Rz3HcOfSLbi9BPnfYcwTlvaC8TsabFu6w56amBrd99i2Zs/4k9GZr X-Received: by 2002:a17:906:1344:: with SMTP id x4mr2140016ejb.44.1625176855168; Thu, 01 Jul 2021 15:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625176855; cv=none; d=google.com; s=arc-20160816; b=XvJZwuCXNVq2A6JaFTOksV9O5CWJ7KeOvOpCSPoHAyOTuwRYQLHvbKCVz8al8KAumq AL9hotgO/l0KpG6W+Yr6wn5Be9GCLYI/cyGN6yPAaJSqKJZKSpHf6IUkpvCfK4y42zWw 18WuuVKmdKIUA1nL00RwZqxQ5wgcHdPnqPyv9cfHy/1tA6f69qEnTHN8lZMKOOm981pX KOTGCarWJEFPahxuBOxtyRZPNysRkYG2H7V4gOtgN8Bqn/GHsPIj2BD3kbURo/xgWmIC Yul3mEFQEWAI0nKFZGTccDhEzEPkTE34ICin4vA9k6x5y2PSxpUIEO/brOushMkgpl54 69jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:from :dkim-signature:delivered-to; bh=Mhrq6kOpOigdohXgeVOLcgf5oCe1er39IXS9p1EJqKM=; b=XHXaMr5IpDmOV/NHbMwgaF3VG3b6xVIqbDjVFDYVgxFOGe9lIJIw0zRfWoBdCU3gBE NmxVrBSs780Jgvm4e+tDCZWiAgqltlEzqYNYuC4cT1gZ5mEauQKCvqCk29dAGZtjK+v9 X/xWWSvi4SvTfDPWNXhoi/Rip0yiK8sFElOcShctSV3jOGa0u4CYLtRxcvXB40nClYdg Gv67l58Ua6+6RhNk7IZgr9HHPP7fKSt44vRto8V1QZUo6DnRFG0OxmnkHTNAbDBQznjk rAFZ+ObcIXhA5SU25FUGBHyyGbXxsfMLXQHnvJXXc64RWNfVnotM5avk8ajMe8RvESv8 fo+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=O+jEw0YU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id o8si1086505ejy.106.2021.07.01.15.00.53; Thu, 01 Jul 2021 15:00:55 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=O+jEw0YU; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BC47B68A4FA; Fri, 2 Jul 2021 01:00:49 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8D0A068A28C for ; Fri, 2 Jul 2021 01:00:43 +0300 (EEST) Received: by mail-ed1-f50.google.com with SMTP id i24so10511999edx.4 for ; Thu, 01 Jul 2021 15:00:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=q4QIl515qu26lTKBKQORVBwpMrQPe1m6/ZMlsEbDyB8=; b=O+jEw0YUeO5hBIjw7HUwDu2aWjAOM6A/oxakoXQRd1wiBahyy+ExMH4kYjdCt6Ak8V HAuCAX9vzUainuqx7NXpvqtV5yMPmfwhbR+eFhggWLbXZKUMQ3dm47hJJiqbXwn3w2dw 3RExiVpzJOPPU9+0DpXJVjI6z0FulVpz+urKWSJWRLBH4oyggSM+Mr8O56PgWxTcfnof Q+m59/hCoEAjo20Llnex6ucL2lx225q0PDIdViuKFutwOB6BBgbKqiAf7kl3MwGaJFXi AJZVDWctURFrwzVVu9ayPplW25d8WALwIlvuQnEIrYKs9DEL/XTxwKXU20RYBZWFXgiI KSAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=q4QIl515qu26lTKBKQORVBwpMrQPe1m6/ZMlsEbDyB8=; b=V3ZrQPa7NwzLB/V5Iglk9RXmDObgQMT/dS/rqXKpzCCJqXbB+JR1zm66l1WfnOjwBC OyfN7Z2G2oi5y3chNhAhB5JDbcMYZmaJy8Rf+SgZTvkvOJWWX3j9+CWEyT4aBmImElWd ar79BT38z7755GmfCr60MijON5vzmyxhXt2N1hpiPvaOHgEV5RepXi2pVs4QGhC0Rc7s tAZ4tOzbm1alGL9CIIAGPIZwBpc7oSmFGdvEEcv4QLN7/3SnH2DlCHyUfb5Lj/ZpesDR TjhQhNtkFo7ctV0S/243ZALl1BXcQCc67aIpoHdZCLDsDmbzKkCT76GogDawCmat3mAb t9Yg== X-Gm-Message-State: AOAM530+k02T6OIIqMPx4cCEzkFrZ77DHwaRWIa7L1jwxdwSxGxqjxLH ngx4Ju8hAciV2ZSezlPM9lNvbatnuNxWdg== X-Received: by 2002:a05:6512:536:: with SMTP id o22mr1239914lfc.370.1625176494189; Thu, 01 Jul 2021 14:54:54 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id f15sm84225lfa.56.2021.07.01.14.54.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jul 2021 14:54:53 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 2 Jul 2021 00:54:44 +0300 Message-Id: <20210701215447.34169-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 0/3] libx264 configure check clean-up, removal of libx264rgb X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: rWfWyKqt2KHv Done in three separate change sets, as this way if the last change is deemed too controversial, the earlier changes should be applicable by themselves. - The first change fixes libx264rgb enablement without having x264.h in the system default include path, such as with custom prefixes. - The second change removes the separate X264_CSP_BGR check as x264.h has this define unconditionally defined with the required X264_BUILD 118 or newer (it was added a few X264_BUILD versions before). This change was checked by bumping the require_cpp_condition check to X264_BUILD >= 255 and checking with both pkg-config as well as by not having PKG_CONFIG_PATH defined as well as making the non-pkg-config check pass with `--extra-cflags="-I/prefix/include" --extra-ldflags="-L/prefix/lib -ldl"` So the X264_BUILD check should properly fail the enablement in case X264_BUILD is older than the one requested in the relevant require_cpp_condition. - The third and last change is probably the most controversial, as in the removal of the separate libx264rgb wrapper. This is due to no other encoder wrapper in libavcodec (such as libx265 for example) being given such treatment, as well as due to the default behavior with ffmpeg.c, RGB input and the libx264 wrapper now being not something commonly supported - such as 4:2:0 YCbCr - but rather 4:4:4 YCbCr. Thus, it is clear that users should rather just define what they require (which with RGB input they already seem to be required to do), rather than trying to make the separation "do the right thing", which it does not currently seem to be leading to. Of course, I might be completely incorrect with regards to why the split was originally done, but I would expect that if it was for more supported color spaces, that would be 4:2:0 and not just "normal" 4:4:4 (which in H.264 coding-wise only differs by its metadata to BGR). Best regards, Jan Jan Ekström (3): configure: move x264_csp_bgr check under general libx264 checks {configure,avcodec/libx264}: remove separate x264_csp_bgr check avcodec/libx264: remove separate libx264rgb RGB wrapper configure | 3 --- doc/encoders.texi | 7 +++--- libavcodec/allcodecs.c | 1 - libavcodec/libx264.c | 48 ++++++------------------------------------ libavcodec/version.h | 2 +- 5 files changed, 11 insertions(+), 50 deletions(-)