From patchwork Tue Mar 27 07:10:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gagandeep Singh X-Patchwork-Id: 8187 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.1.70 with SMTP id c67csp4428206jad; Tue, 27 Mar 2018 00:17:36 -0700 (PDT) X-Google-Smtp-Source: AG47ELsjOJ6v7ncJBJIOWIETcV7haue/S36P4kx0ww7fE7LSDJ+TmseeGxw2ixlQ2U4XioM06yCM X-Received: by 10.28.43.66 with SMTP id r63mr9238041wmr.93.1522135056890; Tue, 27 Mar 2018 00:17:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522135056; cv=none; d=google.com; s=arc-20160816; b=NeC0bHTY8sQKVJlTEtJvuUw8txSQjuLa5dlL61rOw8ubzdbYZxZeSl2MIeHpwACJcB 1//Hfy3IZQ5x9QlsynMkEYKj6ItIV1LMy2oPcMUbeGk7gu5SsUkKsMosVkoWFMSpebcO YmTGSPnvt+uoj7ohFORUGRJTDFr6A8CS5y5I26gWj6kD1Yv9uzP+tunRMsc00AtW/fNg 5aEi2gimpLD5lRZaKT23lBc14KcxikxUvmE4mziS7iNQOW326Xxj4Fn7+ALxDnLH5vko PLTk7Ee4pKqxf6RO2gX+Pjz4X/Tve1UUpKsTv1S3+DuGM4AWg9ZSZ5x28AxzV5BMvo6F fsIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=OiAbkLNVTP8NMjqutDS5WOm07FmY96Ms0p62lXhKoBk=; b=Oqem5KBEhLmEndz8ZSd9eHELlZGhRA03+fMJYPWI9U3y73ONJB1XDqNL0vvODyxAiV 1nyp5CUMh/ji2XT3p1t/3d/zQ+0x0z1DuMoLkvnzvEDHuzmRTg5EWCHTFabSVc+4iHVx tiWtbgDk1BtAaZVhWwrDbzlnKyy0mFrqym89HrVtn79LHEl/cDUa59QQTRHLCg8RLwuE GTSQf++0Yl30bwsLv37kQkrVJSPsPE9o8OOInwgCd7lMsEy1WPgBsZD+PCOqsDv4kShq Wi4GJivP4+t9HCKxuSZ+vLZK+60iweMurheBK0Q1TCeK2fYUDj/fp5p97/IyNG77bJYA iJMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=AgJeK0Fw; 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 p16si560933wmc.199.2018.03.27.00.17.35; Tue, 27 Mar 2018 00:17:36 -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=AgJeK0Fw; 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 D1523689A34; Tue, 27 Mar 2018 10:17:16 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-io0-f195.google.com (mail-io0-f195.google.com [209.85.223.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED545680710 for ; Tue, 27 Mar 2018 10:17:10 +0300 (EEST) Received: by mail-io0-f195.google.com with SMTP id e7so26332798iof.2 for ; Tue, 27 Mar 2018 00:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qLARNMTY/FiwCctPAKkCF9vMWXTNd39Dh1ttTVohv+o=; b=AgJeK0Fw51v8oZjdNzcHZPToNI4eC6yN7zjJS8i/bo7QO2HRbRQbFCgt6tVNJrRR8O McI+DUETYBHPDujx1TysB6fm5qT8lJTbWJQbf+nNzALjeS923XsXfLE/2hX3VdQ0abZy kpUY1U4XsaejksCtwY4BG8pMcKf1F3yw0TbMXl9hDckxdBpillNsUxbFkTHVlqE0tGZi xk2i0BUHmZCZ60C12LCfpFgLY6FWYHCeZLyNwj4a4PlhNQMQtNeWWBP9qdW+5VNjRQUz pcGjJ7FMIDx8lKB/nWAl49KG9CHG0ZqEfqkN7vCZfNug0I+nGoRyJz8o7rqt8KZB67Bq 9jUA== 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=qLARNMTY/FiwCctPAKkCF9vMWXTNd39Dh1ttTVohv+o=; b=uGnwL87OUDyjB2l1FAPTEdfBNokXXsQfVZ3Qko0D6hyT2Y3zWZB2vFN7vqs/p3Xdxa LrfRWoE8s+2xNhyWJ/1laynYETC0sldtI6Rse3r3KzufcyQb9wHVGIrVwGTwYltdXLMO Y9Xs45+PF+wtPloyE9b5+89NzMGeNQFVoVpR3gVrzDUtE5cW9NcIfYz9ovFuV/oQjYDF b6IipRLu/LO+nvbbwIKamEfS1myMPLFWXqD2kse+YXHg4RpCxIRfIHwagIaElw0l+T3/ f3y0oCMujii4JwLzFUAvCSKWlTgn0WFHGpyN9lE7MxsTfoF4Y/0qFGTQoe4TlDRakFzb j88Q== X-Gm-Message-State: AElRT7GZPMEzTb/4TdL6qMp4T2ZNK6jA6Nn4FjSNGZIzn7P2TmyZeodh 9U2x/p/gFRMC3pbZP92XPJY0xw== X-Received: by 10.107.14.136 with SMTP id 130mr31368662ioo.170.1522134683511; Tue, 27 Mar 2018 00:11:23 -0700 (PDT) Received: from localhost.localdomain ([103.246.106.24]) by smtp.googlemail.com with ESMTPSA id z67sm431085ioz.37.2018.03.27.00.11.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 00:11:22 -0700 (PDT) From: Gagandeep Singh To: ffmpeg-devel@ffmpeg.org Date: Tue, 27 Mar 2018 12:40:17 +0530 Message-Id: <20180327071017.8606-1-deepgagan231197@gmail.com> X-Mailer: git-send-email 2.14.1 Subject: [FFmpeg-devel] [PATCH 1/2] lavc/cfhd: error due to improper allocation of height in buffers 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 Cc: Gagandeep Singh MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" ticket #6675 the distortion in the bottom 8 pixels fixed --- libavcodec/cfhd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index e35732df45..f10742f4fa 100644 --- a/libavcodec/cfhd.c +++ b/libavcodec/cfhd.c @@ -213,13 +213,14 @@ static int alloc_buffers(AVCodecContext *avctx) int width = i ? avctx->width >> chroma_x_shift : avctx->width; int height = i ? avctx->height >> chroma_y_shift : avctx->height; ptrdiff_t stride = FFALIGN(width / 8, 8) * 8; - height = FFALIGN(height / 8, 2) * 8; + if (chroma_y_shift) + height = FFALIGN(height / 8, 2) * 8; s->plane[i].width = width; s->plane[i].height = height; s->plane[i].stride = stride; w8 = FFALIGN(s->plane[i].width / 8, 8); - h8 = FFALIGN(s->plane[i].height / 8, 2); + h8 = height / 8; w4 = w8 * 2; h4 = h8 * 2; w2 = w4 * 2; -- 2.14.1 From b1912774babcf737bd20ce0264c9b10fd0ca0183 Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Tue, 27 Mar 2018 12:34:27 +0530 Subject: [FFmpeg-devel][PATCH 2/2] tests/ref/fate/cfhd-3: updated reference to work with the patch the output can be confirmed to be better than the one with the reference hash. --- tests/ref/fate/cfhd-3 | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/ref/fate/cfhd-3 b/tests/ref/fate/cfhd-3 index 60e13c64a7..59fdc92260 100644 --- a/tests/ref/fate/cfhd-3 +++ b/tests/ref/fate/cfhd-3 @@ -3,13 +3,13 @@ #codec_id 0: rawvideo #dimensions 0: 496x241 #sar 0: 0/1 -0, 0, 0, 1, 478144, 0x6ed01dcd -0, 1, 1, 1, 478144, 0x6ed01dcd -0, 2, 2, 1, 478144, 0x6ed01dcd -0, 3, 3, 1, 478144, 0xb1b4a74b -0, 4, 4, 1, 478144, 0x94c345c3 -0, 5, 5, 1, 478144, 0x05e0388d -0, 6, 6, 1, 478144, 0xe747476a -0, 7, 7, 1, 478144, 0x8c1561f1 -0, 8, 8, 1, 478144, 0x8c1561f1 -0, 9, 9, 1, 478144, 0x8c1561f1 +0, 0, 0, 1, 478144, 0x48a01dbb +0, 1, 1, 1, 478144, 0x48a01dbb +0, 2, 2, 1, 478144, 0x48a01dbb +0, 3, 3, 1, 478144, 0xb978a72f +0, 4, 4, 1, 478144, 0x7bbb4679 +0, 5, 5, 1, 478144, 0xc3fd3f59 +0, 6, 6, 1, 478144, 0xfd2a4816 +0, 7, 7, 1, 478144, 0x207f65d3 +0, 8, 8, 1, 478144, 0x207f65d3 +0, 9, 9, 1, 478144, 0x207f65d3