From patchwork Thu Oct 10 00:13:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Skakov Pavel X-Patchwork-Id: 15645 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 73A3344A204 for ; Thu, 10 Oct 2019 03:14:07 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4581168813A; Thu, 10 Oct 2019 03:14:07 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 04C11680BED for ; Thu, 10 Oct 2019 03:14:00 +0300 (EEST) Received: by mail-lj1-f169.google.com with SMTP id b20so4295760ljj.5 for ; Wed, 09 Oct 2019 17:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=H0bfONIYThYfD90o2h5eUAQotHGUyFD0Y+hv0GXVmxw=; b=pczWmrA5RSarJOWpDsVRIFcir86oW397Gxz+EYfQd/nrmB3MwY68b4ATFVC5j9WIMr SxRjIv9orbr3pTLobVA4IFH1VWTupv72RNOYWHOhk3iZWc3sNvcjCRIcs2deh9uF0jeh P/4OsXn/5PuIc1XAznCdN0zb0aa95GrYAUDpA3Y9fe0tbRXqo02laXFdBtgjQvHRXA+0 L1AUbIabl4sQJyOye/inxzWNbXz/eRyQyLd/o9BXhs/1oErVKdzXxXGCTH8W04m3l+7P WgzsFWdSVuF0Ba6YEvCvQ+NInyzL7HhGYOZu6WRttv4vfuInnCDnA7OMmliekatTDk8v wHug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=H0bfONIYThYfD90o2h5eUAQotHGUyFD0Y+hv0GXVmxw=; b=ktbZHJ3qAbktNQ6wJRyNnKvbpPjaK0FwmJXtX180Zc+EnFOBPq7fqkUNKR/NWp9lDw FpUnv/TPLeMuEZ3tV2qj3iPvW4c7RkZXqlOeUOG3og6XfKvbGxpLmk4MvnRRg7BxtFcn OEJOYFE5pCQEXtHeZpEVFb0AxCh5tF+hnDtn4s127kTjx3rWd3bL7O8DPRX2fDjGsxVZ ThANIissZC/Sg5m3vkISHmHr5bllQt8U8DSX+nCaKjVQ+igey1JdLmOg2V06KJ6iyvqp CqExEs3ldArag5wkPIdVbkX/x+vCkNN6PD9HvgR9mlmSokfPC8Q9pcFae1VwpTSJXnLd m/Hg== X-Gm-Message-State: APjAAAWKw9E4QiZ/38l6YU85UZQF5+ZEDHc2hHCiWFlM+KzTaBrRPaSD 4JEzh4tn97t4uioRCGLdXSeSafBn X-Google-Smtp-Source: APXvYqy+BE4ULdLASUZYVLZqdw41nAfrqCeyV9VUP9TdgAnJ1B+9jKFqdx9ZoiEqLDXuLnRyhPwzTQ== X-Received: by 2002:a2e:5812:: with SMTP id m18mr4106888ljb.182.1570666440043; Wed, 09 Oct 2019 17:14:00 -0700 (PDT) Received: from [10.1.0.176] ([5.18.248.33]) by smtp.gmail.com with ESMTPSA id v6sm776982ljh.66.2019.10.09.17.13.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Oct 2019 17:13:59 -0700 (PDT) From: Skakov Pavel To: FFmpeg development discussions and patches References: <5bb1e2e7-faf8-7244-b48b-9bc21842b010@gmail.com> Message-ID: Date: Thu, 10 Oct 2019 03:13:58 +0300 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <5bb1e2e7-faf8-7244-b48b-9bc21842b010@gmail.com> Content-Language: en-US Subject: [FFmpeg-devel] [PATCH v2 1/4] avcodec/tiff: indentation 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" Re-indentation after previous patches. From 1d3fbed08cf7c89cb81a3b98403605b7a7e20235 Mon Sep 17 00:00:00 2001 From: Pavel Skakov Date: Thu, 10 Oct 2019 02:37:50 +0300 Subject: [PATCH 3/4] avcodec/tiff: indentation Signed-off-by: Pavel Skakov --- libavcodec/tiff.c | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index eac5113ad7..be46db961c 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -367,17 +367,17 @@ static void unpack_yuv(TiffContext *s, AVFrame *p, uint8_t *pv = &p->data[2][lnum / s->subsampling[1] * p->linesize[2]]; if (s->width % s->subsampling[0] || s->height % s->subsampling[1]) { if (s->bpp == 24) { - for (i = 0; i < w; i++) { - for (j = 0; j < s->subsampling[1]; j++) - for (k = 0; k < s->subsampling[0]; k++) - if (j < s->height - lnum && i * s->subsampling[0] + k < s->width) { - p->data[0][(lnum + j) * p->linesize[0] + i * s->subsampling[0] + k] = *src++; - } else { - src++; - } - *pu++ = *src++; - *pv++ = *src++; - } + for (i = 0; i < w; i++) { + for (j = 0; j < s->subsampling[1]; j++) + for (k = 0; k < s->subsampling[0]; k++) + if (j < s->height - lnum && i * s->subsampling[0] + k < s->width) { + p->data[0][(lnum + j) * p->linesize[0] + i * s->subsampling[0] + k] = *src++; + } else { + src++; + } + *pu++ = *src++; + *pv++ = *src++; + } } else { for (i = 0; i < w; i++) { for (j = 0; j < s->subsampling[1]; j++) @@ -396,14 +396,13 @@ static void unpack_yuv(TiffContext *s, AVFrame *p, } }else{ if (s->bpp == 24) { - for (i = 0; i < w; i++) { - for (j = 0; j < s->subsampling[1]; j++) - for (k = 0; k < s->subsampling[0]; k++) - p->data[0][(lnum + j) * p->linesize[0] + - i * s->subsampling[0] + k] = *src++; - *pu++ = *src++; - *pv++ = *src++; - } + for (i = 0; i < w; i++) { + for (j = 0; j < s->subsampling[1]; j++) + for (k = 0; k < s->subsampling[0]; k++) + p->data[0][(lnum + j) * p->linesize[0] + i * s->subsampling[0] + k] = *src++; + *pu++ = *src++; + *pv++ = *src++; + } } else { for (i = 0; i < w; i++) { for (j = 0; j < s->subsampling[1]; j++) @@ -1195,7 +1194,7 @@ static int init_image(TiffContext *s, ThreadFrame *frame) return AVERROR_PATCHWELCOME; } } else { - s->avctx->pix_fmt = s->le ? AV_PIX_FMT_RGB48LE : AV_PIX_FMT_RGB48BE; + s->avctx->pix_fmt = s->le ? AV_PIX_FMT_RGB48LE : AV_PIX_FMT_RGB48BE; } break; case 644: -- 2.13.2.windows.1