From 1d3fbed08cf7c89cb81a3b98403605b7a7e20235 Mon Sep 17 00:00:00 2001
From: Pavel Skakov <pavelsx@gmail.com>
Date: Thu, 10 Oct 2019 02:37:50 +0300
Subject: [PATCH 3/4] avcodec/tiff: indentation
Signed-off-by: Pavel Skakov <pavelsx@gmail.com>
---
libavcodec/tiff.c | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
@@ -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