[FFmpeg-devel] [PATCH] lavc/tiff: Decode embedded JPEGs in DNG images

velocityra at gmail.com velocityra at gmail.com
Wed Jul 24 13:05:44 EEST 2019


From: Nick Renieris <velocityra at gmail.com>

Used a technique similar to lavc/tdsc.c for invoking the MJPEG decoder.

This commit adds support for:
- DNG tiles
- DNG tile huffman lossless JPEG decoding
- DNG color scaling [1]
  - LinearizationTable tag
  - BlackLevel tag

[1]: As specified in the DNG Specification - Chapter 5

Signed-off-by: Nick Renieris <velocityra at gmail.com>
---
 libavcodec/tiff.c | 16 ----------------
 1 file changed, 16 deletions(-)

diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 423eaf0647..4f6ba256c6 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -280,19 +280,6 @@ static void av_always_inline horizontal_fill(TiffContext *s,
                                              int usePtr, const uint8_t *src,
                                              uint8_t c, int width, int offset)
 {
-    /* Handle DNG images with uncompressed strips (non-tiled) */
-    if (s->tiff_type == TIFF_TYPE_DNG || s->tiff_type == TIFF_TYPE_CINEMADNG) {
-        dng_blit(s,
-                 dst + offset,
-                 width,
-                 src,
-                 width,
-                 width,
-                 1,
-                 0);
-        return;
-    }
-
     switch (bpp) {
     case 1:
         while (--width >= 0) {
@@ -1799,9 +1786,6 @@ again:
         } else if (s->is_tiled) {
             av_log(avctx, AV_LOG_ERROR, "DNG uncompressed tiled images are not supported\n");
             return AVERROR_PATCHWELCOME;
-        } else if (s->bpp != 8) {
-            av_log(avctx, AV_LOG_ERROR, "DNG uncompressed non-tiled non-8bpp images are not supported\n");
-            return AVERROR_PATCHWELCOME;
         }
     }
 
-- 
2.21.0.windows.1



More information about the ffmpeg-devel mailing list