From patchwork Fri Jul 2 11:25:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Jan_Ekstr=C3=B6m?= X-Patchwork-Id: 28739 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a5d:965a:0:0:0:0:0 with SMTP id d26csp1532935ios; Fri, 2 Jul 2021 04:26:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQyRju/UtHWBKNl/uHllOz8JN0yOwjal1zb7RbAIo2x9fW2xXEee9pNkRdMRH2EMwu7pMt X-Received: by 2002:a17:906:7314:: with SMTP id di20mr225080ejc.283.1625225161775; Fri, 02 Jul 2021 04:26:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625225161; cv=none; d=google.com; s=arc-20160816; b=ax4LzA5WldGEmwnMfYU2r48zpcElr4isDFt8Nq1HAZjYH2BZXYrh1V33gQonhIuM47 QtUTzkSAOq5b9FjNYHAd/9mB+G91QajQzvGR7EKQ5NH9CabtGjSFVw7+al8izf2COTYA bv8pIHdXr/dxk4JRRMSG584te5hLQ3jfWZsM8CacDW5O6gXqt7Bv774DuMQ/zsHLDhL9 /lvG76oWcwWk4QBHbzSImXN29GGRVyywvsGb/MWIa8IxF/bK28c+TssEIJoG3icbgiK4 QMjlQpPkkN59Arlv/f/IwcndgSb/uOGMA6cBGlUcVK+55NagEiBXoPQvhsx8grJMYDJk bN2Q== 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:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=TNX+kVWH9dh8BLYTza/8ZY1SoCvbZtCAPJzbnYdf6Yg=; b=fCIIEjG6Vq/Ea8L3VqiVdrzqkKCh0ARWEkJXTyOEtIO+0W93cHpFgWg4UQI/UrxqCB igmv8CK/0tmIp8VjWtLZkorivpub7aQm4wYL0ksC0Q19hvAKJC/+5IDiE7W3/LatOi2k /0nbgJOct12oG2NJEnyJzHpvpaMcrU3xWc8bdajYDAnKZ5ke0JiDNbzTpaNB6TFwBcI7 OqXbwaE8c5MTq8QOazWqhqd7sBrp1tsKEEZJglGJTLW0qiX0ibU+ixyD202iTy2L/N6Q S7S/QeQ7Qx37JVd6J2/moSWapO+aW0a9Dn4mB7wb/+dYMnzr3bf9+2ozP0R5FkVY49e7 0yhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=lXi1NwfZ; 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 oz13si2700671ejc.440.2021.07.02.04.26.01; Fri, 02 Jul 2021 04:26:01 -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=lXi1NwfZ; 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 2052E688146; Fri, 2 Jul 2021 14:25:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6906F68A476 for ; Fri, 2 Jul 2021 14:25:23 +0300 (EEST) Received: by mail-lf1-f44.google.com with SMTP id t17so17576626lfq.0 for ; Fri, 02 Jul 2021 04:25:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=ZoEM3+lzGsVjv6xQT1rrTUsn/FrPc2wAHEh2dqUrISA=; b=lXi1NwfZUP7Q+1VW8eO1wt77bdnBAJ2yDM+pog776iIEY+Wa30ghsTKJ2GTR20aeh9 P1Iw+iVZ0PJKfwLXihYbMUc6QgmWdzpPicNS9WHswbUK85nDpjko+tNqj0nMRLAZAzg3 1bxlvQY9nohxTXUWuHoWNhpmsjNX+0HIdPLMSSWRe51y1HE/b+CTrBkPm+KOpYd3RG28 rwbcBweGFpY9NtmUB2nNpOkPjcvf/dQZgor+iwEZ9bfuY8k7YQFrMxpNODR04+3uOlp2 h9LpBgbKrO1cjLd9AP/JvuybWPr2VEOvCcYrgKSA6xo5q5Fxp49m/RQ2xMoo3+nj4xEZ CQlw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZoEM3+lzGsVjv6xQT1rrTUsn/FrPc2wAHEh2dqUrISA=; b=iFWHVTCeedG7IGcZRPRaskJk2fP1dHaW2+qmXcCzt6O8mRgYxiokYQLmEYrC94w705 ns+bjzWVaDMI7B9oQN31wM0fnOAR4l0KhDr9VTewfxdq6tPPUtlalrfr1FhzBdmNz8Bd lwX4yGHHWvZq43ZY5VPV2iqeVjP9tov25UsIUw6qmIiv1EHeM5SGseB7qc/RJ/ZH4W2s 6q9e8pNfXIEP6Y2d75hofwqZlEFy7Xd8I3boisIs/bLhnMFvW13kg7qzq/euU5ntqqtO PSPfowOG/6A64vS4rqfc4gHD35EekOG5fv2lxhQ5vUl50AoO2Xwl1aXmwRndw8UgMDCv Mb4A== X-Gm-Message-State: AOAM530y49PRvptNjYV7DElBUd6cNCCvWMBnUO7EhNk3LWiYO4KZZtMo 9fjpj/4qIOJAdFh7uSGddnHaBZddlBFlrg== X-Received: by 2002:a05:6512:744:: with SMTP id c4mr3506315lfs.657.1625225121059; Fri, 02 Jul 2021 04:25:21 -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.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 04:25:20 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Fri, 2 Jul 2021 14:25:12 +0300 Message-Id: <20210702112513.36348-3-jeebjp@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210702112513.36348-1-jeebjp@gmail.com> References: <20210702112513.36348-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 2/3] {configure, avcodec/libx264}: remove separate x264_csp_bgr check 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: T5piedk6bMkD We already require X264_BUILD >= 118, which includes an unconditional definition of X264_CSP_BGR in itself, thus making this check effectively always true. --- configure | 3 +-- libavcodec/libx264.c | 7 +------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/configure b/configure index ab27220688..b3b8065188 100755 --- a/configure +++ b/configure @@ -3316,7 +3316,7 @@ libwebp_anim_encoder_deps="libwebp" libx262_encoder_deps="libx262" libx264_encoder_deps="libx264" libx264_encoder_select="atsc_a53" -libx264rgb_encoder_deps="libx264 x264_csp_bgr" +libx264rgb_encoder_deps="libx264" libx264rgb_encoder_select="libx264_encoder" libx265_encoder_deps="libx265" libxavs_encoder_deps="libxavs" @@ -6529,7 +6529,6 @@ enabled libx264 && { check_pkg_config libx264 x264 "stdint.h x264.h" x { require libx264 "stdint.h x264.h" x264_encoder_encode "-lx264 $pthreads_extralibs $libm_extralibs" && warn "using libx264 without pkg-config"; } } && require_cpp_condition libx264 x264.h "X264_BUILD >= 118" && - check_cpp_condition x264_csp_bgr x264.h "X264_CSP_BGR" && check_cpp_condition libx262 x264.h "X264_MPEG2" enabled libx265 && require_pkg_config libx265 x265 x265.h x265_api_get && require_cpp_condition libx265 x265.h "X265_BUILD >= 70" diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 4b905bf9da..fdb9e285a6 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -553,7 +553,6 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt) case AV_PIX_FMT_YUVJ444P: case AV_PIX_FMT_YUV444P9: case AV_PIX_FMT_YUV444P10: return X264_CSP_I444; -#if CONFIG_LIBX264RGB_ENCODER case AV_PIX_FMT_BGR0: return X264_CSP_BGRA; case AV_PIX_FMT_BGR24: @@ -561,7 +560,6 @@ static int convert_pix_fmt(enum AVPixelFormat pix_fmt) case AV_PIX_FMT_RGB24: return X264_CSP_RGB; -#endif case AV_PIX_FMT_NV12: return X264_CSP_NV12; case AV_PIX_FMT_NV16: case AV_PIX_FMT_NV20: return X264_CSP_NV16; @@ -1018,14 +1016,13 @@ static const enum AVPixelFormat pix_fmts_all[] = { #endif AV_PIX_FMT_NONE }; -#if CONFIG_LIBX264RGB_ENCODER + static const enum AVPixelFormat pix_fmts_8bit_rgb[] = { AV_PIX_FMT_BGR0, AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE }; -#endif #if X264_BUILD < 153 static av_cold void X264_init_static(AVCodec *codec) @@ -1186,9 +1183,7 @@ AVCodec ff_libx264_encoder = { , .wrapper_name = "libx264", }; -#endif -#if CONFIG_LIBX264RGB_ENCODER static const AVClass rgbclass = { .class_name = "libx264rgb", .item_name = av_default_item_name,