From patchwork Wed Jul 24 10:05:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: velocityra@gmail.com X-Patchwork-Id: 14052 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 863A74495F1 for ; Wed, 24 Jul 2019 13:06:05 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5D422689E37; Wed, 24 Jul 2019 13:06:05 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 62D00689DC3 for ; Wed, 24 Jul 2019 13:05:59 +0300 (EEST) Received: by mail-wr1-f68.google.com with SMTP id y4so46310720wrm.2 for ; Wed, 24 Jul 2019 03:05:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2YTzsZJVwsjk0oBH9MHREJnV5eiu6O8EtUZ+L6mDq8s=; b=G4NF0Ipgvelvys6v2ojFQwf0WFBq7WXY2T1EntKlaI8m30Ub+JxJESD5Wd37HKArdm 0hPHhVUYa0U5Xfv88l5U/jZ8x/O7yeUQ275Ao1Grs0Nuw1IB6wgM1PpFSEs3fswOBz2S vh0WkE5dRovKNW31eJYHkZZaLKLsYWpRM6n1UEwNTNKgY4ftumsrMb/9r4BCU2cdkz8z rqvr1ws6k08aGWFUZfwyapi/tZp/GFru5GOIyyi/lauWcX8dF6+9m05V4vjsHzVz3wVp nIf0Picarey8L48yfh9rnX20fcCVkvr24qfiM/AKLgZyTLh+7u2kEm1K8+ZXGO94t49Z LZNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2YTzsZJVwsjk0oBH9MHREJnV5eiu6O8EtUZ+L6mDq8s=; b=Pw6M1pVoRmBgK6ZK86XijVNPcGSfhH3FADjleENU/SRFvwHZXm4y0Vk6qmUY+6wVyD YDbpDzdn3XywK9YwmeGPO4yL65CtW2oFJblip59VxRPVHb3fuju2hO7LMMWsHw/yW/G5 NYlzWpJX0Hx0XbgUl/Jq4BN0is8OvMv0PXxcG+O/FEYOguo+JzvpFMFkik+Es5/dwCNi nNOTpcKU167VhoXVVFwq4LLXa53wLqRu5yMdImZ568hvqjHou5Ms6CAZzuKOuNiQbq9L HW6tw20o/4jBKWWA7zvfxu64l2b0upGFFyj1G9g2ZQjPU+rqVsZH84ve1TQJ/B5BC7Tg yYOQ== X-Gm-Message-State: APjAAAXqScgzxcxSLC31KsXRF5NOcAkmLY35NMMx0aCqV+Oeew5M33L0 BYhCC75XvdqGtm1NGhclAoSE+Tx6 X-Google-Smtp-Source: APXvYqxBusZi3H8soK0wZLdE3w44DV1yuIRZl05NTfug1WIc1ss9M54ebnPJhgIu2GnWVNqV8Xi+CQ== X-Received: by 2002:a5d:6ccd:: with SMTP id c13mr84084489wrc.4.1563962758706; Wed, 24 Jul 2019 03:05:58 -0700 (PDT) Received: from localhost.localdomain ([2a02:587:2428:db00:d8aa:5903:c630:c940]) by smtp.gmail.com with ESMTPSA id x24sm44285132wmh.5.2019.07.24.03.05.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 Jul 2019 03:05:57 -0700 (PDT) From: velocityra@gmail.com X-Google-Original-From: velocityra@gmail To: ffmpeg-devel@ffmpeg.org Date: Wed, 24 Jul 2019 13:05:44 +0300 Message-Id: <20190724100544.29560-1-velocityra@gmail.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] lavc/tiff: Decode embedded JPEGs in DNG images 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 Cc: Nick Renieris Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" From: Nick Renieris 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 --- 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; } }