From patchwork Thu Feb 18 23:02:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul B Mahol X-Patchwork-Id: 25771 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 30C1E449552 for ; Fri, 19 Feb 2021 01:03:17 +0200 (EET) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 13DC968A0FC; Fri, 19 Feb 2021 01:03:17 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 19214680635 for ; Fri, 19 Feb 2021 01:03:10 +0200 (EET) Received: by mail-ej1-f41.google.com with SMTP id d8so8452052ejc.4 for ; Thu, 18 Feb 2021 15:03:10 -0800 (PST) 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; bh=4XH/hQhSFn4e090JCUiDR759KrgJrf4v+arLOIBu0ts=; b=JEtxxawmIDPNncE3JK/WhWOTAy6BDxBrTo2M9p5YH+swznF/LE0o1znBb9YJo8xY0A DPUgQFJc/nJeiUvn1oWgJlIuCUwiG/UyRFl+vpy2bCJ+GKbEAruuKbrWONTBQJLz3gc/ 8QtcjL82GHkDmh1DcYyGKRFz1/Q5ZzlN7/1hoJw16sqnUgUEp95TW4D/w+Lzg7VAZ906 zyxRNnyBXAUUUfw9Bm75ykvrdWGQbe89mQyasmdalthF0oa4oZkv0uUZctnE5lKsbs3Z iAy2t2zhDPjtZXF1PkLLs0S0fsr4jt2wzk38fO8kEuh8KmeRAUPh8Q6A4ph85b700HWT 6okg== 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; bh=4XH/hQhSFn4e090JCUiDR759KrgJrf4v+arLOIBu0ts=; b=BCSZ6czQitLKQC/Bs7ag2hPGLiDaNgxpx16UqDZSaV1LRZYTir7ggScD7mkyCms5n1 B1cTBsqikO3DigN3rYUR77NLgj89mInVXMH8WkKenUhppPoJ5xQaej1VlPCNUUXhSpRt +x7XsWqumFMBo/W5mBT7bu/f8bcPqzA8YWb+RAyJ7vEIaAeBDkxZgIYvA1N/eVn9CVSu Iz7MzKo/JwfFNmIQc3cTaPE5g4Av3nwbcIOxZXqltIe5UvJmLnhWPSTp1hIolDQNyXPx fAnygSessyz1vCIOSaft7c1qpgREcmsTnUPb1jcVohX5ehAOqwEyEwM+mcQ5OKqpMbZu rE7A== X-Gm-Message-State: AOAM5335LE5ao2u1RWWyc3S5Pbc2iOr4rruSw84V2LuWdQwLA+a3Wom6 Nr3gsTrfyQVvYJz3gdiO4iRRhFepi5e45g== X-Google-Smtp-Source: ABdhPJzbc1ia0by26iT4chrPmEGAN6iaymt3aBrLJomI1AN2hGjb+5ynyBRLE3KSZC2SS9xepBZ9Sg== X-Received: by 2002:a17:906:c7cd:: with SMTP id dc13mr5840613ejb.405.1613689389607; Thu, 18 Feb 2021 15:03:09 -0800 (PST) Received: from localhost.localdomain ([94.250.162.225]) by smtp.gmail.com with ESMTPSA id e22sm3851361edu.61.2021.02.18.15.03.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Feb 2021 15:03:08 -0800 (PST) From: Paul B Mahol To: ffmpeg-devel@ffmpeg.org Date: Fri, 19 Feb 2021 00:02:56 +0100 Message-Id: <20210218230258.1263-2-onemda@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210218230258.1263-1-onemda@gmail.com> References: <20210218230258.1263-1-onemda@gmail.com> Subject: [FFmpeg-devel] [PATCH 2/4] avcodec/cfhdenc: add padding to each decomposition 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" Signed-off-by: Paul B Mahol --- libavcodec/cfhdenc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c index 1e89ffc41c..9c8ba3700c 100644 --- a/libavcodec/cfhdenc.c +++ b/libavcodec/cfhdenc.c @@ -270,10 +270,10 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx) int width = i ? avctx->width >> s->chroma_h_shift : avctx->width; int height = i ? FFALIGN(avctx->height >> s->chroma_v_shift, 8) : FFALIGN(avctx->height >> s->chroma_v_shift, 8); - ptrdiff_t stride = FFALIGN(width / 8, 8) * 8; + ptrdiff_t stride = (FFALIGN(width / 8, 8) + 64) * 8; - w8 = FFALIGN(width / 8, 8); - h8 = height / 8; + w8 = FFALIGN(width / 8, 8) + 64; + h8 = FFALIGN(height, 8) / 8; w4 = w8 * 2; h4 = h8 * 2; w2 = w4 * 2;