Re: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Multi-page support

2019-03-28 Thread Nick Renieris
3/22/19, Carl Eugen Hoyos wrote: > >>>> 2019-03-22 15:50 GMT+01:00, velocit...@gmail.com : > >>>>> From: Nick Renieris > >>>>> > >>>>> Option "-page N" (page index N starts from 1) can now > >>>>> be u

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Multi-page support

2019-03-28 Thread Nick Renieris
I haven't, is there a specific place that it's preferred I upload it to? Στις Πέμ, 28 Μαρ 2019 στις 1:12 μ.μ., ο/η Paul B Mahol έγραψε: > > On 3/28/19, Nick Renieris wrote: > > Any news on this? Is there something I should do? > > Have you uploaded small tiff

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Multi-page support

2019-03-28 Thread Nick Renieris
When I made the patch I did ask you on IRC whether I should upload something and got no answer. Στις Πέμ, 28 Μαρ 2019 στις 2:58 μ.μ., ο/η Nick Renieris έγραψε: > > I haven't, is there a specific place that it's preferred I upload it to? > > Στις Πέμ, 28 Μαρ 2019 στις 1:12

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Multi-page support

2019-03-28 Thread Nick Renieris
Ok, here's a multipage tif with 3 pages, the two first are blue and the last one red: https://0x0.st/zKdB.tif Στις Πέμ, 28 Μαρ 2019 στις 4:35 μ.μ., ο/η Paul B Mahol έγραψε: > > On 3/28/19, Nick Renieris wrote: > > When I made the patch I did ask you on IRC whether I should upl

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Multi-page support

2019-03-28 Thread Nick Renieris
Huh? No I fixed that, it's AV_OPT_TYPE_INT now. See the second email in this list (first was the initial patch, then the corrected patch). Στις Παρ, 29 Μαρ 2019 στις 12:51 π.μ., ο/η Paul B Mahol έγραψε: > > On 3/28/19, Nick Renieris wrote: > > Ok, here's a multipage tif

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Multi-page support

2019-03-29 Thread Nick Renieris
Στις Παρ, 29 Μαρ 2019 στις 11:05 π.μ., ο/η Paul B Mahol έγραψε: > You should also check max number of available pages. > And issue warning if user requested more than available and than provide some > page. Yeah, I _would_ have done that, but the images I've seen don't actually contain the max nu

Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Add support for recognizing DNG files

2019-04-02 Thread Nick Renieris
Any consensus on using libdng? Στις Τετ, 20 Μαρ 2019 στις 5:03 μ.μ., ο/η Nick Renieris έγραψε: > > Στις Τετ, 20 Μαρ 2019 στις 4:17 μ.μ., ο/η Paul B Mahol > έγραψε: > > DNG I posted should be decodeable by default, without need for extra > > option(s). > > The DNG

Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Add support for recognizing DNG files

2019-04-02 Thread Nick Renieris
I don't mind either way, but I'm writing my GSoC proposal at the moment and wanted an answer. If there's no clear answer, is it something TBD that I don't need to specify in the proposal? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmp

Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Add support for recognizing DNG/CinemaDNG files

2019-05-29 Thread Nick Renieris
This was meant to be a reply to http://ffmpeg.org/pipermail/ffmpeg-devel/2019-May/244744.html ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-r

Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Add support for recognizing DNG/CinemaDNG files

2019-05-29 Thread Nick Renieris
Do not review, I found some CinemaDNG images that do not work. I will figure out a better solution. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-d

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

2019-07-23 Thread Nick Renieris
Please don't review this yet. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-07-23 Thread Nick Renieris
Some sample working DNGs: https://0x0.st/z8pf.dng (non-jpeg) https://www.kenrockwell.com/leica/m9/sample-photos-3.htm (jpeg. these are decoded as dark because there's no color space conversion implemented) A few others work too but I can't find the links to them anymore, I can upload them if reques

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

2019-07-23 Thread Nick Renieris
Ready for review. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

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

2019-07-24 Thread Nick Renieris
I have a small patch for basic gamma correction, it makes the dark images look much better. Should I send it here (if so, just as a single email reply to this?) or wait until this patchset is merged? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org h

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

2019-07-24 Thread Nick Renieris
Some example DNGs before/after the gamma correction: https://i.imgur.com/m3Qgrwb.jpg https://i.imgur.com/XgggT2h.jpg These are not full size of course, just screenshots. Colors are wrong and I'm pretty sure I know why, that's TODO. Στις Τετ, 24 Ιουλ 2019 στις 12:04 μ.μ., ο/η Nic

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

2019-07-24 Thread Nick Renieris
, I will talk with my mentor on whether to prioritize it (a lot of images look fine without it). Στις Τετ, 24 Ιουλ 2019 στις 1:06 μ.μ., ο/η έγραψε: > > From: Nick Renieris > > Used a technique similar to lavc/tdsc.c for invoking the MJPEG decoder. > > This commit adds support

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

2019-07-25 Thread Nick Renieris
Thanks for the review Moritz, pushed fixes. "outputted" is a word actually :) https://forum.wordreference.com/threads/is-outputted-a-word.2707379 Στις Πέμ, 25 Ιουλ 2019 στις 4:57 μ.μ., ο/η Moritz Barsnick έγραψε: > > On Thu, Jul 25, 2019 at 15:12:53 +0300, velocit...@gmail.com wrote: > > Nit: >

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

2019-07-26 Thread Nick Renieris
Στις Παρ, 26 Ιουλ 2019 στις 2:21 π.μ., ο/η Reimar Döffinger έγραψε: > > On 25.07.2019, at 17:35, velocit...@gmail.com wrote: > > > +// Lookup table lookup > > +if (lut) > > +value = lut[value]; > > As this function is in the innermost loop, doing the if here instead of > having 2

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

2019-07-28 Thread Nick Renieris
Στις Κυρ, 28 Ιουλ 2019 στις 1:30 π.μ., ο/η Reimar Döffinger έγραψε: > > Huh? Are you thinking of templates? always_inline can usually be used the > same way. > I haven't looked into the how or anything, it was just a comment in principle. You're totally right (I checked on godbolt just to make s

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

2019-07-28 Thread Nick Renieris
's no guarantee this is happening with the actual version of course (it could be slower, or even faster if it also optimizes it through dng_blit). I could check the actual disasm in FFmpeg, but I don't think it's worth it at this point (my mentor agrees). Στις Κυρ, 28 Ιουλ 2019 στις

Re: [FFmpeg-devel] [PATCH v9 1/2] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

2019-08-07 Thread Nick Renieris
Going to post a new patchset with my latest work. It includes these 2 commits (one slightly modified) and 11 more. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or

Re: [FFmpeg-devel] [PATCH v10 04/13] lavc/tiff: Apply color scaling to uncompressed DNGs

2019-08-08 Thread Nick Renieris
Thanks for the review Michael, pushing fixes and a commit that makes some more images compatible. Στις Πέμ, 8 Αυγ 2019 στις 1:22 π.μ., ο/η Michael Niedermayer έγραψε: > > On Wed, Aug 07, 2019 at 06:27:14PM +0300, velocit...@gmail.com wrote: > > From: Nick Renieris > > >

[FFmpeg-devel] [PATCH v12 01/14] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

2019-08-09 Thread Nick Renieris
From: Nick Renieris Main image data in DNGs is usually comprised of tiles, each of which is a Huffman-encoded lossless JPEG. Tested for ljpeg regressions with: `ffmpeg -f lavfi -i testsrc=d=1 -vcodec ljpeg test.avi` `ffmpeg test.avi out.avi` The modified code in ljpeg_decode_rgb_scan runs

[FFmpeg-devel] [PATCH v12 10/14] lavc/tiff: Support decoding of DNGs with single-component JPEGs

2019-08-09 Thread Nick Renieris
From: Nick Renieris This enables decoding of DNG images generated by the 'DJI Zenmuse X7' digital camera Samples: https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 +++ 1 file c

[FFmpeg-devel] [PATCH v12 05/14] lavc/jpegtables: Handle multiple mappings to the same value

2019-08-09 Thread Nick Renieris
From: Nick Renieris Some JPEGs [1] have incorrect DHT entries that map 2 codes to the same value. The second (last) mapping does not ever actually appear in the code stream, therefore ignoring any mappings after the first one fixes this. Without this, an "mjpeg_decode_dc: bad vlc: 0:0&q

[FFmpeg-devel] [PATCH v12 06/14] lavc/tiff: Fix edge case with full-length/width tiles

2019-08-09 Thread Nick Renieris
From: Nick Renieris In an image [1], the height was equal to the tile length (full-height tile) and after `height % tile_length` was applied to them with the current code, it resulted in the operating tile_length to be 0. This commit makes this leftover logic only applies if it's nece

[FFmpeg-devel] [PATCH v12 08/14] lavc/tiff: Force DNG pixel data endianness on an edge case

2019-08-09 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 12 1 file changed, 12 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 174ca168c6..9d20763186 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1038,6 +1038,18 @@ static int

[FFmpeg-devel] [PATCH v12 07/14] lavc/tiff: Don't apply strips-related logic to tiled images

2019-08-09 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 37fda15162..174ca168c6 100644 --- a/libavcodec/tiff.c +++ b

[FFmpeg-devel] [PATCH v12 12/14] lavc/mjpegdec: Skip useless APPx marker on bayer images

2019-08-09 Thread Nick Renieris
From: Nick Renieris Samples: - Embedded JPEG images in the DNG images here: https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/mjpegdec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegdec.c

[FFmpeg-devel] [PATCH v12 14/14] lavc/tiff: Initialize WhiteLevel DNG tag value

2019-08-09 Thread Nick Renieris
From: Nick Renieris Inited to (2^BitsPerSample)-1 as per the DNG Specification This fixes decoding for "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 13 ++--- 1 file changed, 10 insert

[FFmpeg-devel] [PATCH v12 11/14] lavc/tiff: Decode 14-bit DNG images

2019-08-09 Thread Nick Renieris
From: Nick Renieris Sample file: https://drive.google.com/open?id=0B4JyRT3Lth5HVndyOTVOdWktM3J4TFEydTk1MnY3RWlpSzVB Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec

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

2019-08-09 Thread Nick Renieris
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 8-bpp ("packed" as dcraw calls it) decoding - DNG color scaling [1] - LinearizationTable tag - Blac

[FFmpeg-devel] [PATCH v12 03/14] lavc/tiff: Convert DNGs to sRGB color space

2019-08-09 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index d5673abb19..a118c37c41 100644 --- a/libavcodec/tiff.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v12 09/14] lavc/mjpegdec: Enable decoding of single-component bayer images

2019-08-09 Thread Nick Renieris
From: Nick Renieris Also, ensure no false positives when determining DNG bayer images, by setting them in tiff.c instead of relying on a heuristic. There's no way to determine this just from the JPEG data, so we have to pass this information from outside the MJPEG decoder. Signed-off-by:

[FFmpeg-devel] [PATCH v12 04/14] lavc/tiff: Apply color scaling to uncompressed DNGs

2019-08-09 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index a118c37c41..4620508d53 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c

[FFmpeg-devel] [PATCH v12 13/14] lavc/tiff: Support DNGs with striped (non-tiled) JPEGs images

2019-08-09 Thread Nick Renieris
From: Nick Renieris DNG samples here can now be decoded: - https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 73 +++ 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a

Re: [FFmpeg-devel] [PATCH v12 03/14] lavc/tiff: Convert DNGs to sRGB color space

2019-08-10 Thread Nick Renieris
> Why do you put all this color space convertion code into the decoders ? The color space conversion needs to happen, camera sensor data is linear. If it's not done images looks really dark as result. > Colorspace and pixel format convertion is generally done outside decoders. > The specification

Re: [FFmpeg-devel] [PATCH v12 05/14] lavc/jpegtables: Handle multiple mappings to the same value

2019-08-10 Thread Nick Renieris
7:29:50PM +0300, Nick Renieris wrote: > > From: Nick Renieris > > > > Some JPEGs [1] have incorrect DHT entries that map 2 codes to > > the same value. > > > > The second (last) mapping does not ever actually appear in the > > code stream, therefore ignoring any ma

Re: [FFmpeg-devel] [PATCH v12 12/14] lavc/mjpegdec: Skip useless APPx marker on bayer images

2019-08-10 Thread Nick Renieris
The data the marker contains is only 2 bytes and they're 0x in the samples above. I don't know what they're for. Στις Σάβ, 10 Αυγ 2019 στις 3:16 μ.μ., ο/η Michael Niedermayer έγραψε: > > On Fri, Aug 09, 2019 at 07:29:57PM +0300, Nick Renieris wrote: > > From: Nic

Re: [FFmpeg-devel] [PATCH v12 01/14] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

2019-08-10 Thread Nick Renieris
first line outside. 3) It depends on mjpeg_decode_dc being called for the first-line case, I'm not sure how I'd handle that either (even just to take it outside the "component" loop). Στις Σάβ, 10 Αυγ 2019 στις 3:30 μ.μ., ο/η Michael Niedermayer έγραψε: > > On Fri, Aug

Re: [FFmpeg-devel] [PATCH v12 10/14] lavc/tiff: Support decoding of DNGs with single-component JPEGs

2019-08-10 Thread Nick Renieris
> after this commit the code dies when used with ffplay with floating point > exceptions I tried this on Ubuntu and I can't repro, it works fine. Maybe something I changed locally fixed it, please re-test on the new revision I'll send in a bit. ___ ffmpe

[FFmpeg-devel] [PATCH v13 01/14] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

2019-08-10 Thread Nick Renieris
From: Nick Renieris Main image data in DNGs is usually comprised of tiles, each of which is a Huffman-encoded lossless JPEG. Tested for ljpeg regressions with: `ffmpeg -f lavfi -i testsrc=d=1 -vcodec ljpeg test.avi` `ffmpeg test.avi out.avi` The modified code in ljpeg_decode_rgb_scan runs

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

2019-08-10 Thread Nick Renieris
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 8-bpp ("packed" as dcraw calls it) decoding - DNG color scaling [1] - LinearizationTable tag - Blac

[FFmpeg-devel] [PATCH v13 03/14] lavc/tiff: Convert DNGs to sRGB color space

2019-08-10 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index d5673abb19..a118c37c41 100644 --- a/libavcodec/tiff.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v13 05/14] lavc/jpegtables: Handle multiple mappings to the same value

2019-08-10 Thread Nick Renieris
From: Nick Renieris Some JPEGs [1] have incorrect DHT entries that map 2 codes to the same value. The second (last) mapping does not ever actually appear in the code stream, therefore ignoring any mappings after the first one fixes this. Without this, an "mjpeg_decode_dc: bad vlc: 0:0&q

[FFmpeg-devel] [PATCH v13 04/14] lavc/tiff: Apply color scaling to uncompressed DNGs

2019-08-10 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index a118c37c41..4620508d53 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c

[FFmpeg-devel] [PATCH v13 06/14] lavc/tiff: Fix edge case with full-length/width tiles

2019-08-10 Thread Nick Renieris
From: Nick Renieris In an image [1], the height was equal to the tile length (full-height tile) and after `height % tile_length` was applied to them with the current code, it resulted in the operating tile_length to be 0. This commit makes this leftover logic only applies if it's nece

[FFmpeg-devel] [PATCH v13 10/14] lavc/tiff: Support decoding of DNGs with single-component JPEGs

2019-08-10 Thread Nick Renieris
From: Nick Renieris This enables decoding of DNG images generated by the 'DJI Zenmuse X7' digital camera Samples: https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 +++ 1 file c

[FFmpeg-devel] [PATCH v13 07/14] lavc/tiff: Don't apply strips-related logic to tiled images

2019-08-10 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 37fda15162..174ca168c6 100644 --- a/libavcodec/tiff.c +++ b

[FFmpeg-devel] [PATCH v13 09/14] lavc/mjpegdec: Enable decoding of single-component bayer images

2019-08-10 Thread Nick Renieris
From: Nick Renieris Also, ensure no false positives when determining DNG bayer images, by setting them in tiff.c instead of relying on a heuristic. There's no way to determine this just from the JPEG data, so we have to pass this information from outside the MJPEG decoder. Signed-off-by:

[FFmpeg-devel] [PATCH v13 08/14] lavc/tiff: Force DNG pixel data endianness on an edge case

2019-08-10 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 12 1 file changed, 12 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 174ca168c6..9d20763186 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1038,6 +1038,18 @@ static int

[FFmpeg-devel] [PATCH v13 13/14] lavc/tiff: Support DNGs with striped (non-tiled) JPEGs images

2019-08-10 Thread Nick Renieris
From: Nick Renieris DNG samples here can now be decoded: - https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 73 +++ 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v13 12/14] lavc/mjpegdec: Skip unknown APPx marker on bayer images

2019-08-10 Thread Nick Renieris
From: Nick Renieris Samples: - Embedded JPEG images in the DNG images here: https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/mjpegdec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegdec.c

[FFmpeg-devel] [PATCH v13 11/14] lavc/tiff: Decode 14-bit DNG images

2019-08-10 Thread Nick Renieris
From: Nick Renieris Sample file: https://drive.google.com/open?id=0B4JyRT3Lth5HVndyOTVOdWktM3J4TFEydTk1MnY3RWlpSzVB Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec

[FFmpeg-devel] [PATCH v13 14/14] lavc/tiff: Default-initialize WhiteLevel DNG tag value

2019-08-10 Thread Nick Renieris
From: Nick Renieris Initialized to `(2 ^ BitsPerSample) - 1` as per the DNG Specification. Also make sure that `BlackLevel < WhiteLevel`. This fixes decoding for "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --

[FFmpeg-devel] [PATCH v14 01/14] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

2019-08-11 Thread Nick Renieris
From: Nick Renieris Main image data in DNGs is usually comprised of tiles, each of which is a Huffman-encoded lossless JPEG. Tested for ljpeg regressions with: `ffmpeg -f lavfi -i testsrc=d=1 -vcodec ljpeg test.avi` `ffmpeg test.avi out.avi` The modified code in ljpeg_decode_rgb_scan runs

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

2019-08-11 Thread Nick Renieris
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 8-bpp ("packed" as dcraw calls it) decoding - DNG color scaling [1] - LinearizationTable tag - Blac

[FFmpeg-devel] [PATCH v14 06/14] lavc/tiff: Fix edge case with full-length/width tiles

2019-08-11 Thread Nick Renieris
From: Nick Renieris In an image [1], the height was equal to the tile length (full-height tile) and after `height % tile_length` was applied to them with the current code, it resulted in the operating tile_length to be 0. This commit makes this leftover logic only applies if it's nece

[FFmpeg-devel] [PATCH v14 04/14] lavc/tiff: Apply color scaling to uncompressed DNGs

2019-08-11 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index a2102f32b5..040e83ba7c 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c

[FFmpeg-devel] [PATCH v14 07/14] lavc/tiff: Don't apply strips-related logic to tiled images

2019-08-11 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 14928ed3d5..ff9ac30b3f 100644 --- a/libavcodec/tiff.c +++ b

[FFmpeg-devel] [PATCH v14 03/14] lavc/tiff: Convert DNGs to sRGB color space

2019-08-11 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 4c6b835afe..a2102f32b5 100644 --- a/libavcodec/tiff.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v14 09/14] lavc/mjpegdec: Enable decoding of single-component bayer images

2019-08-11 Thread Nick Renieris
From: Nick Renieris Also, ensure no false positives when determining DNG bayer images, by setting them in tiff.c instead of relying on a heuristic. There's no way to determine this just from the JPEG data, so we have to pass this information from outside the MJPEG decoder. Signed-off-by:

[FFmpeg-devel] [PATCH v14 11/14] lavc/tiff: Decode 14-bit DNG images

2019-08-11 Thread Nick Renieris
From: Nick Renieris Sample file: https://drive.google.com/open?id=0B4JyRT3Lth5HVndyOTVOdWktM3J4TFEydTk1MnY3RWlpSzVB Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec

[FFmpeg-devel] [PATCH v14 10/14] lavc/tiff: Support decoding of DNGs with single-component JPEGs

2019-08-11 Thread Nick Renieris
From: Nick Renieris This enables decoding of DNG images generated by the 'DJI Zenmuse X7' digital camera Samples: https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 +++ 1 file c

[FFmpeg-devel] [PATCH v14 08/14] lavc/tiff: Force DNG pixel data endianness on an edge case

2019-08-11 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 12 1 file changed, 12 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index ff9ac30b3f..709bbfb301 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1038,6 +1038,18 @@ static int

[FFmpeg-devel] [PATCH v14 12/14] lavc/mjpegdec: Skip unknown APPx marker on bayer images

2019-08-11 Thread Nick Renieris
From: Nick Renieris Samples: - Embedded JPEG images in the DNG images here: https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/mjpegdec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegdec.c

[FFmpeg-devel] [PATCH v14 05/14] lavc/jpegtables: Handle multiple mappings to the same value

2019-08-11 Thread Nick Renieris
From: Nick Renieris Some JPEGs [1] have incorrect DHT entries that map 2 codes to the same value. The second (last) mapping does not ever actually appear in the code stream, therefore ignoring any mappings after the first one fixes this. Without this, an "mjpeg_decode_dc: bad vlc: 0:0&q

[FFmpeg-devel] [PATCH v14 14/14] lavc/tiff: Default-initialize WhiteLevel DNG tag value

2019-08-11 Thread Nick Renieris
From: Nick Renieris Initialized to `(2 ^ BitsPerSample) - 1` as per the DNG Specification. Also make sure that `BlackLevel < WhiteLevel`. This fixes decoding for "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --

[FFmpeg-devel] [PATCH v14 13/14] lavc/tiff: Support DNGs with striped (non-tiled) JPEGs images

2019-08-11 Thread Nick Renieris
From: Nick Renieris DNG samples here can now be decoded: - https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 --- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v15 06/15] lavc/tiff: Fix edge case with full-length/width tiles

2019-08-20 Thread Nick Renieris
In an image [1], the height was equal to the tile length (full-height tile) and after `height % tile_length` was applied to them with the current code, it resulted in the operating tile_length to be 0. This commit makes this leftover logic only applies if it's necessary. Signed-off-by:

[FFmpeg-devel] [PATCH v15 10/15] lavc/tiff: Support decoding of DNGs with single-component JPEGs

2019-08-20 Thread Nick Renieris
This enables decoding of DNG images generated by the 'DJI Zenmuse X7' digital camera Samples: https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 +++ 1 file changed, 51 insertions(+), 10

[FFmpeg-devel] [PATCH v15 11/15] lavc/tiff: Decode 10-bit and 14-bit DNG images

2019-08-20 Thread Nick Renieris
10-bit sample: http://www.rawsamples.ch/raws/phones/RAW_ONEPLUS_ONE-A0001.DNG 14-bit sample: https://drive.google.com/open?id=0B4JyRT3Lth5HVndyOTVOdWktM3J4TFEydTk1MnY3RWlpSzVB Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 23 +++ 1 file changed, 15 insertions(+), 8

[FFmpeg-devel] [PATCH v15 12/15] lavc/mjpegdec: Skip unknown APPx marker on bayer images

2019-08-20 Thread Nick Renieris
Samples: - Embedded JPEG images in the DNG images here: https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/mjpegdec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec

[FFmpeg-devel] [PATCH v15 14/15] lavc/tiff: Default-initialize WhiteLevel DNG tag value

2019-08-20 Thread Nick Renieris
Initialized to `(2 ^ BitsPerSample) - 1` as per the DNG Specification. Also make sure that `BlackLevel < WhiteLevel`. This fixes decoding for "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcode

[FFmpeg-devel] [PATCH v15 08/15] lavc/tiff: Force DNG pixel data endianness on an edge case

2019-08-20 Thread Nick Renieris
Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 12 1 file changed, 12 insertions(+) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 1ca9a59dbf..d9750891d4 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1038,6 +1038,18 @@ static int init_image(TiffContext

[FFmpeg-devel] [PATCH v15 15/15] lavc/tiff: Enable decoding of LinearRaw images

2019-08-20 Thread Nick Renieris
amples.ch/raws/nikon/SCANNER_NIKON_LS5000.DNG Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 377662c897..3166a3e5c8 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1495,6 +

[FFmpeg-devel] [PATCH v15 04/15] lavc/tiff: Apply color scaling to uncompressed DNGs

2019-08-20 Thread Nick Renieris
Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index a2102f32b5..dd1295fad6 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -556,6 +556,7 @@ static

[FFmpeg-devel] [PATCH v15 09/15] lavc/mjpegdec: Enable decoding of single-component bayer images

2019-08-20 Thread Nick Renieris
Also, ensure no false positives when determining DNG bayer images, by setting them in tiff.c instead of relying on a heuristic. There's no way to determine this just from the JPEG data, so we have to pass this information from outside the MJPEG decoder. Signed-off-by: Nick Ren

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

2019-08-20 Thread Nick Renieris
ecified in the DNG Specification - Chapter 5 Signed-off-by: Nick Renieris --- configure | 1 + libavcodec/Makefile | 2 +- libavcodec/tiff.c | 313 +++- libavcodec/tiff.h | 2 + 4 files changed, 310 insertions(+), 8 deletions(-) di

[FFmpeg-devel] [PATCH v15 07/15] lavc/tiff: Don't apply strips-related logic to tiled images

2019-08-20 Thread Nick Renieris
Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 257230c386..1ca9a59dbf 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -1780,7

[FFmpeg-devel] [PATCH v15 13/15] lavc/tiff: Support DNGs with striped (non-tiled) JPEGs images

2019-08-20 Thread Nick Renieris
DNG samples here can now be decoded: - https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 --- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a/libavcodec/tiff.c b

[FFmpeg-devel] [PATCH v15 03/15] lavc/tiff: Convert DNGs to sRGB color space

2019-08-20 Thread Nick Renieris
Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 4c6b835afe..a2102f32b5 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -731,14 +731,23

[FFmpeg-devel] [PATCH v15 01/15] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

2019-08-20 Thread Nick Renieris
-off-by: Nick Renieris --- libavcodec/mjpegdec.c | 52 +-- libavcodec/mjpegdec.h | 1 + 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index a65bc8df15..6391107f78 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH v15 05/15] lavc/jpegtables: Handle multiple mappings to the same value

2019-08-20 Thread Nick Renieris
n. In all known files, the 2 codes are mapped to symbol 0 so only that case is checked. --- [1]: Embedded JPEGs in "X7 RAW" and "X7 CinemaDNG" samples here: https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/jpegtables.c | 17 +++

[FFmpeg-devel] [PATCH v16 15/15] lavc/tiff: Enable decoding of LinearRaw images

2019-08-28 Thread Nick Renieris
From: Nick Renieris "LinearRaw" is a value that the PhotometricInterpretation tag can be set to on DNG images that contain color information for all channels instead of being bayer-encoded ("CFA" value). The DNG decoder is complete enough that we can enable this

[FFmpeg-devel] [PATCH v16 14/15] lavc/tiff: Default-initialize WhiteLevel DNG tag value

2019-08-28 Thread Nick Renieris
From: Nick Renieris Initialized to `(2 ^ BitsPerSample) - 1` as per the DNG Specification. Also make sure that `BlackLevel < WhiteLevel`. This fixes decoding for "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --

[FFmpeg-devel] [PATCH v16 13/15] lavc/tiff: Support DNGs with striped (non-tiled) JPEGs images

2019-08-28 Thread Nick Renieris
From: Nick Renieris DNG samples here can now be decoded: - https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 --- 1 file changed, 37 insertions(+), 24 deletions(-) diff --git a

[FFmpeg-devel] [PATCH v16 06/15] lavc/tiff: Fix edge case with full-length/width tiles

2019-08-28 Thread Nick Renieris
From: Nick Renieris When the height is equal to the tile length (full-height tile) after `height % tile_length` is applied with the current code, it results in the operating tile_length to be 0. This commit makes this leftover logic only applies if it's necessary. Signed-off-by: Nick Ren

[FFmpeg-devel] [PATCH v16 11/15] lavc/tiff: Decode 10-bit and 14-bit DNG images

2019-08-28 Thread Nick Renieris
From: Nick Renieris 10-bit sample: http://www.rawsamples.ch/raws/phones/RAW_ONEPLUS_ONE-A0001.DNG 14-bit sample: https://drive.google.com/open?id=0B4JyRT3Lth5HVndyOTVOdWktM3J4TFEydTk1MnY3RWlpSzVB Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 23 +++ 1 file changed

[FFmpeg-devel] [PATCH v16 08/15] lavc/tiff: Force DNG pixel data endianness on an edge case

2019-08-28 Thread Nick Renieris
From: Nick Renieris This fixes "X7 RAW" and "X7 CinemaDNG" samples here: - https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 12 1 file changed, 12 insertions(+) diff --git a/libavcodec/tiff.c b/lib

[FFmpeg-devel] [PATCH v16 01/15] lavc/mjpegdec: Decode Huffman-coded lossless JPEGs embedded in DNGs

2019-08-28 Thread Nick Renieris
From: Nick Renieris Main image data in DNGs is usually comprised of tiles, each of which is a Huffman-encoded lossless JPEG. Tested for ljpeg regressions with: `ffmpeg -f lavfi -i testsrc=d=1 -vcodec ljpeg test.avi` `ffmpeg test.avi out.avi` The modified code in ljpeg_decode_rgb_scan runs

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

2019-08-28 Thread Nick Renieris
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 8-bpp ("packed" as dcraw calls it) decoding - DNG color scaling [1] - LinearizationTable tag - Blac

[FFmpeg-devel] [PATCH v16 04/15] lavc/tiff: Apply color scaling to uncompressed DNGs

2019-08-28 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index a2102f32b5..dd1295fad6 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c

[FFmpeg-devel] [PATCH v16 07/15] lavc/tiff: Don't apply strips-related logic to tiled images

2019-08-28 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 42 ++ 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 3bf2b3e557..28b8f42edd 100644 --- a/libavcodec/tiff.c +++ b

[FFmpeg-devel] [PATCH v16 03/15] lavc/tiff: Convert DNGs to sRGB color space

2019-08-28 Thread Nick Renieris
From: Nick Renieris Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 34 +++--- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index 4c6b835afe..a2102f32b5 100644 --- a/libavcodec/tiff.c +++ b/libavcodec

[FFmpeg-devel] [PATCH v16 05/15] lavc/jpegtables: Handle multiple mappings to the same value

2019-08-28 Thread Nick Renieris
From: Nick Renieris Some JPEGs [1] have incorrect DHT entries that map 2 codes to the same value. The second (last) mapping does not ever actually appear in the code stream, therefore ignoring any mappings after the first one fixes this. Without this, an "mjpeg_decode_dc: bad vlc: 0:0&q

[FFmpeg-devel] [PATCH v16 10/15] lavc/tiff: Support decoding of DNGs with single-component JPEGs

2019-08-28 Thread Nick Renieris
From: Nick Renieris This enables decoding of DNG images generated by the 'DJI Zenmuse X7' digital camera Samples: https://www.dji.com/gr/zenmuse-x7/info#downloads Signed-off-by: Nick Renieris --- libavcodec/tiff.c | 61 +++ 1 file c

[FFmpeg-devel] [PATCH v16 09/15] lavc/mjpegdec: Enable decoding of single-component bayer images

2019-08-28 Thread Nick Renieris
From: Nick Renieris Also, ensure no false positives when determining DNG bayer images, by setting them in tiff.c instead of relying on a heuristic. There's no way to determine this just from the JPEG data, so we have to pass this information from outside the MJPEG decoder. Signed-off-by:

[FFmpeg-devel] [PATCH v16 12/15] lavc/mjpegdec: Skip unknown APPx marker on bayer images

2019-08-28 Thread Nick Renieris
From: Nick Renieris Samples: - Embedded JPEG images in the DNG images here: https://www.photographyblog.com/previews/pentax_k1_photos Signed-off-by: Nick Renieris --- libavcodec/mjpegdec.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavcodec/mjpegdec.c

Re: [FFmpeg-devel] [PATCH v16 05/15] lavc/jpegtables: Handle multiple mappings to the same value

2019-08-29 Thread Nick Renieris
Στις Πέμ, 29 Αυγ 2019 στις 4:00 μ.μ., ο/η Michael Niedermayer έγραψε: > This looks unrelated Messed up when rebasing, will fix in a bit. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscri

  1   2   >