From patchwork Thu Aug 20 13:58:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Mallon X-Patchwork-Id: 21770 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 5440244B85F for ; Thu, 20 Aug 2020 16:59:34 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 40CC5687FCF; Thu, 20 Aug 2020 16:59:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 51EFE6808B2 for ; Thu, 20 Aug 2020 16:59:27 +0300 (EEST) Received: by mail-wr1-f66.google.com with SMTP id a15so2102266wrh.10 for ; Thu, 20 Aug 2020 06:59:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=codex.online; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=4Xa8d+2fh1bCOnmXJFsHyeyNQwGVj9FwAnkX/U3QGD8=; b=bG9FVWrZOGHCC67BcxU3RNDXTk5jDQHRF3OdGqNZP6eOj/i62lWyd5/Ki/ty+swrrr c8wfJfxw8wqKff0VG9Yk3SIhlnuTgzmjsE01chEA6TMVAOwTFIN85yBllfdCduLmtHIa wDxyQd1eRq6oQRxvE04IpZg5BVenpQQvGkt+8= 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=4Xa8d+2fh1bCOnmXJFsHyeyNQwGVj9FwAnkX/U3QGD8=; b=Xa4/5hBVbdRBElsX+7w4mhW7W2Et44b0ubXK1j+oiqXowkoy4N9iYSRrnXy3Vux9Wp WpXdvgJ60SY4TI0qsZN3BKC0OZcwEGVeqPkvQK1v45ZL2JtBi7G1N7h8FucFrvZuk3Va ZBjZopT77C9WutGv0CvIkyJxo6c2B++Hf5hlvNjL2DlpUXq+n58uOlZMnSpWlE1TUm66 ambV/+QuonbCj/olx/MEaACK1VGx0Rxab2tAFQbxqseWohmUatz2WEjAF2g9izmYTdQR syQUV6ksdr8ZuBPVhGS8+i0oq4YY6oaoN88bLX1UwB3UYaedGCOey8o/q+3b4WMnkLqo fbzw== X-Gm-Message-State: AOAM5326tjgkweYjUW78VrycrTL695tH09zLo6WHdBkTgUTCG8EJJjpl RZc0+OPkN/c8OayT5BpMYIN2CdbA7f7yHA== X-Google-Smtp-Source: ABdhPJzqzdy91rGpLelUO7e6NQR+9GX22S9n+1PY2W2t0dn/be75YNr91UqC6IlxNUotk2SmRpOgjQ== X-Received: by 2002:adf:dfc8:: with SMTP id q8mr3200357wrn.231.1597931966535; Thu, 20 Aug 2020 06:59:26 -0700 (PDT) Received: from localhost ([2a01:4b00:8571:3800:7c6a:d69c:56a4:3d6]) by smtp.gmail.com with ESMTPSA id u6sm3920146wrn.95.2020.08.20.06.59.25 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 20 Aug 2020 06:59:26 -0700 (PDT) From: Harry Mallon To: ffmpeg-devel@ffmpeg.org Date: Thu, 20 Aug 2020 14:58:53 +0100 Message-Id: <20200820135853.96869-2-harry.mallon@codex.online> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200820135853.96869-1-harry.mallon@codex.online> References: <0730D7D7-22C1-465B-8242-40C3E78659CB@codex.online> <20200820135853.96869-1-harry.mallon@codex.online> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v5 2/2] libavformat/mxfenc: color_range should be inclusive 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" MXF CDCI color range was being set to (1<component_depth) - 1 for full range but it should be (1<component_depth) is 0 is a valid value. Signed-off-by: Harry Mallon --- libavformat/mxfenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index a38fa6b983..e495b5ba0e 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1160,7 +1160,7 @@ static int64_t mxf_write_cdci_common(AVFormatContext *s, AVStream *st, const UID if (st->codecpar->color_range != AVCOL_RANGE_UNSPECIFIED) { int black = 0, white = (1<component_depth) - 1, - color = (1<component_depth) - 1; + color = (1<component_depth); if (st->codecpar->color_range == AVCOL_RANGE_MPEG) { black = 1 << (sc->component_depth - 4); white = 235 << (sc->component_depth - 8);