diff mbox

[FFmpeg-devel] avcodec/tiff: correct the default value of YCbCrSubsampling

Message ID 4a6e0b07-62df-1ae1-d338-4f14a04c544a@gmail.com
State Superseded
Headers show

Commit Message

Skakov Pavel Sept. 24, 2019, 6:26 p.m. UTC
TIFF decoder uses wrong default YCbCrSubsampling value so it breaks on files that rely on standard default and omit the value.

Comments

Carl Eugen Hoyos Sept. 24, 2019, 10:31 p.m. UTC | #1
Am Di., 24. Sept. 2019 um 20:32 Uhr schrieb Skakov Pavel <pavelsx@gmail.com>:

> TIFF decoder uses wrong default YCbCrSubsampling value so it breaks on
> files that rely on standard default and omit the value.

The patch seems to agree with the specification, can you provide a sample?
https://www.awaresystems.be/imaging/tiff/tifftags/ycbcrsubsampling.html

Carl Eugen
Carl Eugen Hoyos Sept. 25, 2019, 8:48 a.m. UTC | #2
Am Di., 24. Sept. 2019 um 20:32 Uhr schrieb Skakov Pavel <pavelsx@gmail.com>:

> TIFF decoder uses wrong default YCbCrSubsampling value so it breaks
> on files that rely on standard default and omit the value.

Patch applied.

Thank you, Carl Eugen
James Almer Sept. 25, 2019, 9:40 p.m. UTC | #3
On 9/25/2019 5:48 AM, Carl Eugen Hoyos wrote:
> Am Di., 24. Sept. 2019 um 20:32 Uhr schrieb Skakov Pavel <pavelsx@gmail.com>:
> 
>> TIFF decoder uses wrong default YCbCrSubsampling value so it breaks
>> on files that rely on standard default and omit the value.
> 
> Patch applied.
> 
> Thank you, Carl Eugen

This patch broke fate-exif-image-tiff and fate-lavf-tiff.
diff mbox

Patch

From 1b638417034ec212de4675db8e1695d1e5469d1d Mon Sep 17 00:00:00 2001
From: Pavel Skakov <pavelsx@gmail.com>
Date: Tue, 24 Sep 2019 20:30:59 +0300
Subject: [PATCH] avcodec/tiff: correct the default value of YCbCrSubsampling
 to 2x2

Signed-off-by: Pavel Skakov <pavelsx@gmail.com>
---
 libavcodec/tiff.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 9f24796a88..c8b2a3680e 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -2065,7 +2065,7 @@  static av_cold int tiff_init(AVCodecContext *avctx)
     s->width  = 0;
     s->height = 0;
     s->subsampling[0] =
-    s->subsampling[1] = 1;
+    s->subsampling[1] = 2;
     s->avctx  = avctx;
     ff_lzw_decode_open(&s->lzw);
     if (!s->lzw)
-- 
2.13.2.windows.1