From patchwork Sat Aug 1 11:07:25 2020 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: 21413 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 2003D44B8AF for ; Sat, 1 Aug 2020 14:13:11 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id DEF2968B875; Sat, 1 Aug 2020 14:13:10 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 142DB68B50F for ; Sat, 1 Aug 2020 14:13:04 +0300 (EEST) Received: by mail-lj1-f178.google.com with SMTP id v9so456678ljk.6 for ; Sat, 01 Aug 2020 04:13:04 -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=bK0KC/lSElVJxMZ89A+B4YA+g95Ahz72S5QKweRLp7M=; b=TDLZ58NP9NonoEruZROyKcfhsge8VjpVGmJt+Rr24y/4XJUeSXeHVe9IoWhelDe3HG H9w6rZOI6Hbzjb3RkRz54HVZ6Z7lSSwUBMX+4wIU+Z0n67hcOMODrFIVnrf/wxFIBmiw KhZj2JaqocRmsTAfbnSl68Az+4L6KOJBSxr7JRj3OAS1IWeUophPHpPHWFCahseCGoRk uZWGHtDhuTSXxqGXcfIgXAnkj15l4rBoieKimH7h6EJvPkaspUfH/TyW9Nxnb9WB7oSt D2eE2Kmswn9/k3f3iiZRMe9BjvDLB0E/dZqXdGot4amsJIkQRU9gLrv+BJVQ7CzBpvcs +COQ== 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=bK0KC/lSElVJxMZ89A+B4YA+g95Ahz72S5QKweRLp7M=; b=Qy0qB2r3FmBAQFywHtpgrLUCzASZ2VNQ86Hv0ZscE9THrNmYa4t0b6Zp+Z/RLUr4zC 17yqQ0R6xL/naqZSnLNL2yGgFhScasB0TgHXMQmE7jisXkEfbiVyTIJraSg0yoZDGxoX dggDxKDm14DmS6B+1trlk6SfgKsHcLWdN0eiQJVogHl9JT1KHsQfb3BZ7SVnaqzJ2R8Q 3Ro1tKqZ7Z4h63k0GMMpPZ+dENokl0aHjX688baDwUUsMC7VuNQiJ9gLt565wgdS9pDl mPGi6C8gL+nP398w6DDHTNtyzhHnv8tT4cqi01iwzf2jeN8AG9psL2sn8qmbiveo6IBq 46ZA== X-Gm-Message-State: AOAM532AJZhHIAZGYOoP+xrBqkUVkXumv4NHsAEdYLdxhzPqSKFpl3SF 2qKVWemR5Q/BnfZjJFyp+BvRx0bq X-Google-Smtp-Source: ABdhPJwqoscxCDhZKYRe1VkSz8w+zSsx9ws26GrZH8lRiTlFu+PpRnAJWxTMPE9GuToEtlclF+uw+Q== X-Received: by 2002:a2e:8804:: with SMTP id x4mr3743120ljh.328.1596280055225; Sat, 01 Aug 2020 04:07:35 -0700 (PDT) Received: from localhost.localdomain (91-159-194-103.elisa-laajakaista.fi. [91.159.194.103]) by smtp.gmail.com with ESMTPSA id f24sm2694045ljc.99.2020.08.01.04.07.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Aug 2020 04:07:34 -0700 (PDT) From: =?utf-8?q?Jan_Ekstr=C3=B6m?= To: ffmpeg-devel@ffmpeg.org Date: Sat, 1 Aug 2020 14:07:25 +0300 Message-Id: <20200801110730.30642-3-jeebjp@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200801110730.30642-1-jeebjp@gmail.com> References: <20200729113952.14574-1-jeebjp@gmail.com> <20200801110730.30642-1-jeebjp@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/7] swresample/matrix: switch internal clean_layout function to not drop high bits X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 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" These bits are utilized by channel layouts such as 22.2. If those are dropped, the returned channel layout is no longer a match against the AV_CH_LAYOUT define when returned from this function. --- libswresample/rematrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswresample/rematrix.c b/libswresample/rematrix.c index 6b5feaa07b..983355ba36 100644 --- a/libswresample/rematrix.c +++ b/libswresample/rematrix.c @@ -88,7 +88,7 @@ static int even(int64_t layout){ return 0; } -static int clean_layout(void *s, int64_t layout){ +static int64_t clean_layout(void *s, int64_t layout){ if(layout && layout != AV_CH_FRONT_CENTER && !(layout&(layout-1))) { char buf[128]; av_get_channel_layout_string(buf, sizeof(buf), -1, layout);