From patchwork Mon Sep 4 08:23:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dechesne X-Patchwork-Id: 111538 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp1220673qge; Mon, 4 Sep 2017 01:23:54 -0700 (PDT) X-Received: by 10.99.124.74 with SMTP id l10mr3889313pgn.351.1504513433930; Mon, 04 Sep 2017 01:23:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504513433; cv=none; d=google.com; s=arc-20160816; b=YZArAP8IatqmxK3P3HiNACMK2RwyohzLOspcMoluMGeuKHffTK6r9CU6WcpYIvumvM xSoirEMVEDwzaM9tDxCIqxySNvq8r1jRYH9EAHRZEe4fqHiZjz4VaOvZRtWRpADt6WUM 2bT5wj5pLX/oxb/aNI5qp+IiyTpH1Oi9mhyoo1FT9gUOQ4xeYRLWYlDNZMyh/MJkDzcO ZhY+l6dfhv4P+WpiYPLV5xm9u8Pm7w1Oa5Z4PwNJ8UnsWjWExuAFJ13p7odtxc/LVyz/ k9D3939cWpcLH30I9Bsdk/4He58RuWp1o4G8+2bvKEwbt1CU5jK9zPdAl/og1WoQd98n qIeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:sender:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:message-id:date:to:from :dkim-signature:delivered-to:arc-authentication-results; bh=oIK5LTS48QF1kxN17jbwhuMLd6UzXmgayHw96fvSPnw=; b=r1PtNh0gB+eNS9lFxSR3oBTsbkYRlr2JMH63Mu56nXbHYmgRW114CFBzXrl+AmqUIH jLyqruC0AMnzmSv42XxgRcS7mTLlUXYnEWqP6LoYKynXk9+WT5bG3rJsSTerlkm/eaiN EBiyekrMTHlUFwmyuQ2lXuRQBj0bPbXPXPlHZWp8xzFEInpIUeVZBo8CD0bMPmrsQMhR 8jfCkrEULmn6mJaXDi+hS3/yeYRcAGYmlYY/mVINz1q6LOm5Bq0CLMbo3enVGo6xZ3yl 28Nii7CTtrNs5TG6Aml9Jgk48COD7GOmW8HBmM9XILJvuzAjCYziqttWjOAj6ypgaomI biUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TZQmU5Ld; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id o3si4926038pld.459.2017.09.04.01.23.53; Mon, 04 Sep 2017 01:23:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TZQmU5Ld; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id B2B5977CF6; Mon, 4 Sep 2017 08:23:50 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-wr0-f180.google.com (mail-wr0-f180.google.com [209.85.128.180]) by mail.openembedded.org (Postfix) with ESMTP id 47ABF6022F for ; Mon, 4 Sep 2017 08:23:48 +0000 (UTC) Received: by mail-wr0-f180.google.com with SMTP id b9so4033518wra.0 for ; Mon, 04 Sep 2017 01:23:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=YKz5eAKDo1rMvqj6v/eaRTMNbKbx1a+s9marSAUSRrM=; b=TZQmU5LdzXbC5RsFv+82IZaqCgKkujAN096JqFOJGsImbgJ9DCjnJLYqbQAbrsozEh yxyiaVkymxWDYMUtHzz/YdZLN7UtGAatozn5+Xm398373a6mwYVcKAS/eIdYiuSdcA+d pmm/ZIXBaBuqfDCuiRpM9tD+4yde1a9U7M4MU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=YKz5eAKDo1rMvqj6v/eaRTMNbKbx1a+s9marSAUSRrM=; b=Fomv820XsHzj2puPrWig9T5aw9jjKS0faU1WYBrkqavKVIGqjr5azlMlVynZepuPrL 3wc4fpptKghjnXiVM2RLP31NqXSts6AUT0h+KhT2hj+9m29jeqdkdauIl2+N30CiMDgU gDKncWSvJC92SgIcNHPdhvHIadsgcBj151CqBcWgm/+YzYlooEqpmrfTp2R/ka0QDgSC O8ZhGFYpubDJJsJuRbBBmu9+bt6hwKFilzlbwlCka9OF2e+Tr47Y25GkvX/m/kwwhr1e JPqlflsQmwLLnof89xpW1+whuzNqPj903wQwQnwzgBWo95rrVloUWrguFoFHFru1LWMz /vPw== X-Gm-Message-State: AHPjjUia8qoMBEr7i7AuQ1DZBvbqZvYuMA16nhos/ZJABHdDKBWVLkx1 mLDsuS1C17jCeXchs7I+Rw== X-Google-Smtp-Source: ADKCNb6IT/6v3AfutHkISMV5a4RhwEDxq4TbX6M6OdNKOVqgx9B3Y4ezSF176gyKdPNmuFss7JDqpw== X-Received: by 10.223.142.101 with SMTP id n92mr241635wrb.174.1504513429522; Mon, 04 Sep 2017 01:23:49 -0700 (PDT) Received: from localhost.localdomain (static.8.26.4.46.clients.your-server.de. [46.4.26.8]) by smtp.gmail.com with ESMTPSA id g15sm5204177wrb.79.2017.09.04.01.23.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 04 Sep 2017 01:23:48 -0700 (PDT) From: Nicolas Dechesne To: openembedded-core@lists.openembedded.org Date: Mon, 4 Sep 2017 10:23:34 +0200 Message-Id: <20170904082334.28661-1-nicolas.dechesne@linaro.org> X-Mailer: git-send-email 2.11.0 Cc: Nicolas Dechesne Subject: [OE-core] [PATCH v2] gstreamer1.0-plugins-good: fix 4k playback for v4l2 decoder X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org Backport a fix already merged upstream in master and 1.12 branch, it fixes 4K video playback on any platform that uses v4l2 codecs, such as Dragonboard 820c. Signed-off-by: Nicolas Dechesne --- .../0001-v4l2-Fix-4K-colorimetry.patch | 48 ++++++++++++++++++++++ .../gstreamer/gstreamer1.0-plugins-good_1.12.2.bb | 1 + 2 files changed, 49 insertions(+) create mode 100644 meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch -- 2.11.0 -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch new file mode 100644 index 0000000000..f78818aa17 --- /dev/null +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-v4l2-Fix-4K-colorimetry.patch @@ -0,0 +1,48 @@ +From 545646cccba243236e10362fe7325f89be57da1f Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne +Date: Tue, 18 Jul 2017 11:28:37 -0400 +Subject: [PATCH] v4l2: Fix 4K colorimetry + +Since 1.6, the transfer function for BT2020 has been changed from BT709 +to BT2020_12. It's the same function, but with more precision. As a side +effect, the V4L2 colorpsace didn't match GStreamer colorspace. When +GStreamer ended up making a guess, it would not match anything supported +by V4L2 anymore. This this by using BT2020_12 for BT2020 colorspace and +BT2020 transfer function in replacement of BT709 whenever a 4K +resolution is detected. + +Upstream-Status: Backport +Signed-off-by: Nicolas Dechesne + +--- + sys/v4l2/gstv4l2object.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --git a/sys/v4l2/gstv4l2object.c b/sys/v4l2/gstv4l2object.c +index 61244455f..aae2c55e7 100644 +--- a/sys/v4l2/gstv4l2object.c ++++ b/sys/v4l2/gstv4l2object.c +@@ -1960,7 +1960,7 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt, + case V4L2_COLORSPACE_BT2020: + cinfo->range = GST_VIDEO_COLOR_RANGE_16_235; + cinfo->matrix = GST_VIDEO_COLOR_MATRIX_BT2020; +- cinfo->transfer = GST_VIDEO_TRANSFER_BT709; ++ cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12; + cinfo->primaries = GST_VIDEO_COLOR_PRIMARIES_BT2020; + break; + case V4L2_COLORSPACE_SMPTE240M: +@@ -2062,7 +2062,10 @@ gst_v4l2_object_get_colorspace (struct v4l2_format *fmt, + + switch (transfer) { + case V4L2_XFER_FUNC_709: +- cinfo->transfer = GST_VIDEO_TRANSFER_BT709; ++ if (fmt->fmt.pix.height > 2160) ++ cinfo->transfer = GST_VIDEO_TRANSFER_BT2020_12; ++ else ++ cinfo->transfer = GST_VIDEO_TRANSFER_BT709; + break; + case V4L2_XFER_FUNC_SRGB: + cinfo->transfer = GST_VIDEO_TRANSFER_SRGB; +-- +2.14.1 + diff --git a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb index 3d38f007dc..f9593c99aa 100644 --- a/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb +++ b/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good_1.12.2.bb @@ -10,6 +10,7 @@ SRC_URI = " \ file://avoid-including-sys-poll.h-directly.patch \ file://ensure-valid-sentinel-for-gst_structure_get.patch \ file://0001-introspection.m4-prefix-pkgconfig-paths-with-PKG_CON.patch \ + file://0001-v4l2-Fix-4K-colorimetry.patch \ " SRC_URI[md5sum] = "20254217d9805484532e08ff1c3aa296" SRC_URI[sha256sum] = "5591ee7208ab30289a30658a82b76bf87169c927572d9b794f3a41ed48e1ee96"