From patchwork Wed Sep 14 21:09:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vittorio Giovara X-Patchwork-Id: 575 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp2867451vsd; Wed, 14 Sep 2016 14:26:32 -0700 (PDT) X-Received: by 10.28.47.206 with SMTP id v197mr10199130wmv.50.1473888391936; Wed, 14 Sep 2016 14:26:31 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id p184si67329wmp.85.2016.09.14.14.26.30; Wed, 14 Sep 2016 14:26:31 -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; 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 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 C37B5689FFC; Thu, 15 Sep 2016 00:26:11 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ACD45689FD1 for ; Thu, 15 Sep 2016 00:26:05 +0300 (EEST) Received: by mail-qt0-f196.google.com with SMTP id p47so961209qtc.0 for ; Wed, 14 Sep 2016 14:26:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=hbcCRAR17NtDf+OS0pZWRNesugZFl1jV26epDCYlWYY=; b=iYicmCKtQMdgfPHisXxaY8Lx46Vkdj03D/xsEcOGQof9Uk1InD3WP6iKRHw4GeP15n 38E5mFcWdgc6kVU+eGFamE+PeXf+UR4Ax6z9gbK3asDqu9jsLdyodEWyKks73ImiWErk P67znddX+Qwlp2EEN+HTK6loc4u+i+vx5cFxmOOZU5RR4jcH9r9TmLqVqSN1mtipfBvP M1LpWZrKkfSYmNgHYTdOeYL7aQVxbD7tJTjwgeQxnhKs0uzmsZ+HgOcSGS6giZiSS/X1 S4b+kHwbBSktKs5n1+qhW7WUpKGzX0AkeqmSoBRo3I2alXL720cafUqrc/OI8RouF9rh ZKAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=hbcCRAR17NtDf+OS0pZWRNesugZFl1jV26epDCYlWYY=; b=ibzR7+P6rnvrqQdFSVLe2OkNq8wB3oGpIIH6m/wd3tS/I3ksIiaO3IwMn7tOKOck8Y tvUZKgKSWyvvQJRRbm+iHjDh85SKBlbCNcbVORROYzQ3vW/HWlPru4EJ8YTl36GLqUq9 pgPeMYC2CGAbpl4t26ywc6tqxAA/vIDLICy6x5CZTBE0OJz9TTw1qmQXM6GYuvhNRIIw guB1nrMAwzhpP4CsQtSIoStU5ZVCkyRCjVxUTB9zpMV6Gho4cZnohqJefogw3MHTZAfi DVSifHHjSBMvq9SWOVHNicO3DpcfcQH+McPAvFUlrjBYLJ/6klPAb2IQbvBE2bYmIlFW An/Q== X-Gm-Message-State: AE9vXwPRnEC7LpeuJwaFf7Gq7Pp/hdLGyRHzRoIWNBNosoehZSIxBrX7eA4oL1jddoDcVg== X-Received: by 10.237.44.66 with SMTP id f60mr5742801qtd.11.1473887347885; Wed, 14 Sep 2016 14:09:07 -0700 (PDT) Received: from vimacbookpro.iac.corp (host83-21-static.224-95-b.business.telecomitalia.it. [95.224.21.83]) by smtp.gmail.com with ESMTPSA id i65sm77918qtb.18.2016.09.14.14.09.06 for (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 14 Sep 2016 14:09:07 -0700 (PDT) From: Vittorio Giovara To: ffmpeg-devel@ffmpeg.org Date: Wed, 14 Sep 2016 23:09:02 +0200 Message-Id: <20160914210903.57936-1-vittorio.giovara@gmail.com> X-Mailer: git-send-email 2.9.3 Subject: [FFmpeg-devel] [PATCH 1/2] vf_colorspace: Interpret unspecified color range as limited range 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This is the assumption that is made in pixel format conversion do throughout the code (in particular swscale and vf_colormatrix). Signed-off-by: Vittorio Giovara --- libavfilter/vf_colorspace.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index b9ecb5f..7e87cd8 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -522,6 +522,7 @@ static int get_range_off(int *off, int *y_rng, int *uv_rng, enum AVColorRange rng, int depth) { switch (rng) { + case AVCOL_RANGE_UNSPECIFIED: case AVCOL_RANGE_MPEG: *off = 16 << (depth - 8); *y_rng = 219 << (depth - 8);