From patchwork Fri Jul 2 11:25:10 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: 28741 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp1532581ios; Fri, 2 Jul 2021 04:25:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzyzmUMIoSvBkC0AgBWBUs9x0QBGBevgpW7V3PdnKV23ZGqcoG1yIZ7c+1ubz2d1/8gZWF1 X-Received: by 2002:a05:6402:cb1:: with SMTP id cn17mr1930608edb.76.1625225132291; Fri, 02 Jul 2021 04:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625225132; cv=none; d=google.com; s=arc-20160816; b=L6pg1KOdCaeUxdEwZ3YJVO/5yCiowIjilYGSpdNwEbIXXxyCVjofDUuvTMu7/85Ne3 F4n9BlCPiDg3xBQDZdTNz/HskMPMt4PoO4IQfIPte1e+tBctyyRlV/kRK5atwfOw44xn 70ST/rs46Pw3dmwVUkIUSN3VHPLWHjFOoaYtibfVd/N+0DrR/E4rF7vCjK6sr1K3R1Pr mSnPU7OH4NSOJHnYlm0JoR1nZ7qi9/9CGS4LYTXgaVNfdzR+Ti8pgec77MaYnRAYVCUB miMgfpxz86OIWXSr245nIA36GRr8fOwn+Gua/Y+6+u4I95d3c/ZejHW8xYz72sXBseNO DI3g== 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=+wUm4wFGbdtDAW72JsxSpx2wvym3ckFxT3Rd3ud8CzQ=; b=tmb0O3UtMJ+eyWzLQfPeolaRpvPkWw/q+7p3py1flCvCO4aCpICizcv/1FXZ/+XovU /gKbHO46UH/hM0Y3XmCP0VChYyGbVS6JvAvZGIyH9/VshVtg+aJeEFanRZp5Hqt8ELcT oaZOO8n7e+NtabCF7InkBdmLG2cSej2k15wjysHY2gxYyHlZS5C8H3KcdAoWYQLa7CJc n+3Wq0ji0MBu+I/IXt8gw1oZrwDL2d7ZM9W3qEbvP6+EMAWGn436fdd4Fu/LSlBUtJ5O wknj+lOzXQAcs5QP9OtdMzPq/zzgrlRRvGlXUIx6kMKxRdjCQ4nWc7u7cTWZhHBX38iT Tchg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=A0vw1CH+; 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 df18si1633151edb.67.2021.07.02.04.25.31; Fri, 02 Jul 2021 04:25:32 -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=A0vw1CH+; 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 A529468A450; Fri, 2 Jul 2021 14:25:27 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 40460688146 for ; Fri, 2 Jul 2021 14:25:20 +0300 (EEST) Received: by mail-lf1-f45.google.com with SMTP id q16so17502438lfr.4 for ; Fri, 02 Jul 2021 04:25:20 -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=+bbVkhMA8S72XsqzLapCu2DcMXe3dr6Wfv0jU6DhHWs=; b=A0vw1CH+NyzLOEnVbxjCGQhJlDNE4qCnMGcdhpdL9OxG9COa4rGkaV7BobAIeC3L6d 8EyruKaTH/05FKpG06eYfL6GVs78mV/RSf3D9o5n2qzaDT56j4iQ0Adafl4/IDfSarTy XJOc7Xp/VCKvz2RAXx8asjc34NWR4DfHm6kUfERXvRn1C+/RLtHfJfJHX4jkMjNPXzpT xEMqjHNnV8ZwhOH8tpkpHahYpc/Ezg/FoQGYVIwKww9g+he+Bue0CeSv9ndDc+Us1Phv Ml0u70h4/t8OcCWXuUS2PEPhvnEGk8yei4E8LlyiWUtsi4mZZOzPevGlIlKdF+kpS7oo 3CiQ== 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=+bbVkhMA8S72XsqzLapCu2DcMXe3dr6Wfv0jU6DhHWs=; b=RvhX93M9rICrBw+Pw9wMwX9M+nTfgGo+qPP0+SV9FT0Dx+a/ZbP6yh8/jyHR0xxtom 0v7JaK30bjin9LTCcDx9K8PlQh0AyB/Z6gIpu+49x9amJLpJ9Qi1tBcXuxlGHe58LhS5 5bS5vBz9kstQWwYlEYcJNSFednKg1oNu5UCFjcpfFdaceqwY0AmqyMs3L49vAkMbT5OJ KIjGbcNPfD/Zs8XlngTvnLeFKcHPDBf2NHvWAKDD7NAqHX+UGuagSduFrK6VBaYHWuL9 iqnx+nGmeXJoi71wneGRGJaT6J8OmzvArROZZCiS4j8hM6e1kKhkzDrwVgj4KQTJJFAP pU9A== X-Gm-Message-State: AOAM533N5i0C785YWpH2a6gDGXTmtsuGcpUGO6bdXr2ZkLMeXBeemc3c fuDHmF8hj8m+HiJLzAzLc8REzkON9MueUg== X-Received: by 2002:ac2:5e86:: with SMTP id b6mr3551155lfq.241.1625225119389; Fri, 02 Jul 2021 04:25:19 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id d6sm242479lfc.183.2021.07.02.04.25.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 04:25:18 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 2 Jul 2021 14:25:10 +0300 Message-Id: <20210702112513.36348-1-jeebjp@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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: 4IaEfcutPqWv Changes compared to v1: - As the ff_libx264rgb_encoder extern usage depended on the configure define being set to a falsie, move the actual removal of the configure entry for it to the change which removes libx264rgb altogether. Overall resulting diff between v1 and v2 is zero. 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(-)