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

2019-07-28 Thread Reimar Döffinger
On 28.07.2019, at 16:45, Paul B Mahol wrote: > On Sun, Jul 28, 2019 at 4:39 PM Reimar Döffinger > wrote: > >> On 28.07.2019, at 08:55, Paul B Mahol wrote: >> Just provide as metadata and leave to e.g. libavfilter. >>> >>> That does not follow DNG specification. >>> I really

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

2019-07-28 Thread Paul B Mahol
On Sun, Jul 28, 2019 at 4:39 PM Reimar Döffinger wrote: > On 28.07.2019, at 08:55, Paul B Mahol wrote: > > >> > >> Just provide as metadata and leave to e.g. libavfilter. > >> > > > > That does not follow DNG specification. > > I really do not have time to comment on other irrelevant stuff you >

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

2019-07-28 Thread Reimar Döffinger
On 28.07.2019, at 08:55, Paul B Mahol wrote: >> >> Just provide as metadata and leave to e.g. libavfilter. >> > > That does not follow DNG specification. > I really do not have time to comment on other irrelevant stuff you pointed > in your review. If you had just told me that I should back o

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

2019-07-28 Thread Reimar Döffinger
On 28.07.2019, at 10:40, Nick Renieris wrote: > Actually, I checked a more accurate version of my loop, and GCC > optimizes away the LUT check anyway: > https://godbolt.org/z/G1e1R4 > As you can see it's smart enough to create 2 versions of my functions > (started at L3 with a lookup and L7 witho

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

2019-07-28 Thread Nick Renieris
Actually, I checked a more accurate version of my loop, and GCC optimizes away the LUT check anyway: https://godbolt.org/z/G1e1R4 As you can see it's smart enough to create 2 versions of my functions (started at L3 with a lookup and L7 without it) and it does the check outside. There's no guarante

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 Paul B Mahol
On Sun, Jul 28, 2019 at 12:30 AM Reimar Döffinger wrote: > On 26.07.2019, at 09:34, Nick Renieris wrote: > > > Στις Παρ, 26 Ιουλ 2019 στις 2:21 π.μ., ο/η Reimar Döffinger > > έγραψε: > >> > >> On 25.07.2019, at 17:35, velocit...@gmail.com wrote: > >> > >>> +// Lookup table lookup > >>> +

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

2019-07-27 Thread Reimar Döffinger
On 26.07.2019, at 09:34, Nick Renieris wrote: > Στις Παρ, 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 t

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-25 Thread 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 different implementations is likely not ideal speed-wise. > +// Color scaling >

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

2019-07-25 Thread velocityra
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 - BlackLevel tag