1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-05 23:58:59 +02:00
Commit Graph

127 Commits

Author SHA1 Message Date
Paul B Mahol
8a1759ad46 avcodec/exr: export writer info into frame metadata
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-19 21:06:34 +01:00
Paul B Mahol
546e29d1f5 avcodec/exr: make it aware of 2 additional compressions
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2017-01-19 21:06:34 +01:00
Kevin Wheatley
09905c412d libavcodec/exr: Fix blank output when data window != display window
looks like there is a bug in commit
1a08758e7c relating to the handling of
ptr in decode_frame after decode_block is called, before this commit
ptr would have been incremented for each line in the data window, now
after the commit it is left at the start of the first included line
rather than the line after the data window then the code sets the
remaining lines to 0 and thus the whole image is over written.

Fix by adjusting ptr to the correct line after decode_block returns

Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
2017-01-06 18:01:12 +01:00
Martin Vignali
5099c541bb libavcodec/exr: add support for uint32 channel decoding with pxr24
Doesn't decode the uint32 layer, but decodes the half part of the file.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-25 00:57:38 +01:00
Martin Vignali
52da3f6f70 libavcodec/exr : fix channel size calculation for uint32 channel
uint32 need 4 bytes not 1.
Fix decoding when there is half/float and uint32 channel.

This fixes crashes due to pointer corruption caused by invalid writes.

The problem was introduced in commit
03152e74df.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-16 23:45:44 +01:00
Andreas Cadhalpun
ce3147eb19 exr: reindent after previous commit
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-16 22:37:24 +01:00
Andreas Cadhalpun
ffdc5d09e4 exr: fix out-of-bounds read
channel_index can be -1.

This problem was introduced in commit
2dd7b46132.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2016-11-16 22:37:17 +01:00
Michael Niedermayer
01aee8148d avcodec/exr: Check tile positions
This also disabled the case of mixed x/ymin with tiles, the code
handles these cases inconsistent for the 2 coordinate axis and is
unlikely working correctly.

Fixes crash
Fixes: poc1.exr, poc2.exr

Found-by: Yaoguang Chen of Aliapy unLimit Security Team
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-08-25 02:40:59 +02:00
Martin Vignali
f2b08a0702 libavcodec/exr : cosmetics, rename variable in b44_uncompress func
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-13 14:56:27 +02:00
Michael Niedermayer
b450b82514 avcodec/exr: Fix mixed declarations and statements
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-07 14:53:01 +02:00
Martin Vignali
50747d6b1f libavcodec/exr : indent gray support patch
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 23:53:28 +02:00
Martin Vignali
7ebd13fc8b libavodec/exr : add support for Y and YA file (ticket #5621)
a gray channel in exr, is named Y
we admit that the file need to be interpreted as gray
only if no other channel match (except alpha)

to manage RGB and Y in the color conversion part of decode_block,
the color processing is now made with a for loop.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-07-06 23:52:49 +02:00
Martin Vignali
d9e1e08133 libavcodec/exr : fix decoding piz float file.
fix ticket #5674

the size of data to process in piz_uncompress, is now calc
using the pixel type of each channel.

the data reorganization, alos take care about the size of
each channel

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-30 12:16:52 +02:00
Martin Vignali
d96b8144c0 avcodec/exr: add missed hunks from previous exr commit 2016-06-25 18:28:06 +02:00
Martin Vignali
1e38791b7f avcodec/exr: fix reading float channel when there is half and float channels in a file 2016-06-25 18:10:10 +02:00
Clément Bœsch
8ef57a0d61 Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
  cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>
2016-06-21 21:55:34 +02:00
Martin Vignali
9511a0895d avcodec/exr: indent b44 uncompress function 2016-06-06 15:59:18 +02:00
Martin Vignali
bc1f3dfaa3 avcodec/exr: fix decoding of B44 exr when all channel doesnt have the same pixel type 2016-06-06 15:42:34 +02:00
Martin Vignali
df7cd4176a avcodec/exr: move channel_line_size to thread data
In order to be used by b44 uncompress.
2016-06-06 15:42:30 +02:00
Martin Vignali
03152e74df avcodec/exr: improve pxr24 uncompress
Fix pxr24 uncompress when all channels doesnt have the same pixel type.
The expected length after zip decoding, is now calculated channel by channel.
2016-06-06 15:39:46 +02:00
Martin Vignali
16107aeaf3 avcodec/exr: remove unneed scanline_size var 2016-06-06 15:39:39 +02:00
Martin Vignali
42297d8419 avcodec/exr: fix tile decoding when all channels doesnt have the same pixel type
Also simplify the tile code, sharing more code with the scanline mode.
2016-06-06 15:39:22 +02:00
Martin Vignali
d24eb9a3c6 avcodec/exr: indent the if (layer_match) part 2016-06-06 15:39:06 +02:00
Martin Vignali
753088a2a4 avcodec/exr: fix layer detection
Only test a channel if the layer name match.
Avoid to try to mix channel between the main layer (rgba layer),
and the layer request by the user.
2016-06-06 15:38:35 +02:00
Michael Niedermayer
df01a29c1b avcodec/exr: Fix potential integer overflow
Fixes CID1361949

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-05-19 03:28:25 +02:00
Vittorio Giovara
41ed7ab45f cosmetics: Fix spelling mistakes
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-05-04 18:16:21 +02:00
Martin Vignali
3ce19882c5 libavcodec/exr: move xsize and ysize to thread data
Fixes slice threading.

Signed-off-by: James Almer <jamrial@gmail.com>
2016-04-25 14:19:05 -03:00
Michael Niedermayer
487c346d98 avcodec/exr: Fix "libavcodec/exr.c:1494:13: warning: ISO C90 forbids mixed declarations and code"
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-04-17 01:52:26 +02:00
Martin Vignali
ac07e57c39 avcodec/exr: fix huf_decode 2016-04-12 22:54:56 +02:00
Paul B Mahol
392b0a25c2 avcodec/exr: fix clearing end of bitmap
Inspired by patch from Martin Vignali.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-12 22:54:56 +02:00
Martin Vignali
2dd7b46132 avcodec/exr: fix channel detection 2016-04-10 19:24:15 +02:00
Martin Vignali
6d7f5667a0 avcodec/exr: enable mipmap, ripmap decoding 2016-04-06 13:12:22 +02:00
Martin Vignali
832861535a libavcodec/exr : add support for compression in tile 2016-04-04 22:30:50 +02:00
Martin Vignali
062ad63064 libavcodec/exr : cosmetic change 2016-04-04 22:30:33 +02:00
Martin Vignali
25a01c52b8 libavcodec/exr: add tile support
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-03 17:09:34 +02:00
Martin Vignali
d2ed3391fb libavcodec/exr: fix PRX24 Float decompression
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2016-04-03 17:09:29 +02:00
Martin Vignali
495f08edb4 avcodec/exr: add support for B44 and B44A compression 2016-03-26 09:27:26 +01:00
Carl Eugen Hoyos
31f5fa21b0 lavc/exr: Move setting SAR down.
Fixes a theoretical issue if the resolution attribute is written
behind the aspect attribute.
2016-01-30 13:38:16 +01:00
Hendrik Leppkes
95a2b883e3 Merge commit '69a68593ce5684409c3c4dd9a901bfd8b16925b1'
* commit '69a68593ce5684409c3c4dd9a901bfd8b16925b1':
  Remove stray line breaks from avpriv_{report_missing_feature|request_samples}

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-02 13:20:13 +01:00
Diego Biurrun
69a68593ce Remove stray line breaks from avpriv_{report_missing_feature|request_samples} 2015-12-26 10:28:03 +01:00
Andreas Cadhalpun
90b99a8107 exr: fix out of bounds read in get_code
This macro unconditionally used out[-1], which causes an out of bounds
read, if out is the very beginning of the buffer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-12-18 15:30:04 +01:00
Andreas Cadhalpun
5ea59b1f42 exr: fix out of bounds read in get_code
This macro unconditionally used out[-1], which causes an out of bounds
read, if out is the very beginning of the buffer.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-12-16 22:22:06 +01:00
Ganesh Ajjanagadde
2cbaa078d1 avcodec: use HAVE_THREADS header guards to silence -Wunused-function
When compiled with --disable-pthreads, e.g
http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7,
a bunch of -Wunused-functions are reported due to missing header guards
around threading related functions.
This patch should silence such warnings.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
2015-10-04 12:47:34 -04:00
Kevin Wheatley
a1fa5392e6 avcodec/exr: Mark up the decoded buffer as the appropriate transfer characteristic when applying one 2015-09-10 23:53:05 +02:00
Kevin Wheatley
7eb3233352 avcodec/exr: Add support for applying a transfer characteristic curve to OpenEXR inputs.
Signed-off-by: Kevin Wheatley <kevin.j.wheatley@gmail.com>
2015-09-10 23:53:05 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* commit 'def97856de6021965db86c25a732d78689bd6bb0':
  lavc: AV-prefix all codec capabilities

Conflicts:
	cmdutils.c
	ffmpeg.c
	ffplay.c
	libavcodec/8svx.c
	libavcodec/aacenc.c
	libavcodec/ac3dec.c
	libavcodec/adpcm.c
	libavcodec/alac.c
	libavcodec/atrac3plusdec.c
	libavcodec/bink.c
	libavcodec/dnxhddec.c
	libavcodec/dvdec.c
	libavcodec/dvenc.c
	libavcodec/ffv1dec.c
	libavcodec/ffv1enc.c
	libavcodec/fic.c
	libavcodec/flacdec.c
	libavcodec/flacenc.c
	libavcodec/flvdec.c
	libavcodec/fraps.c
	libavcodec/frwu.c
	libavcodec/gifdec.c
	libavcodec/h261dec.c
	libavcodec/hevc.c
	libavcodec/iff.c
	libavcodec/imc.c
	libavcodec/libopenjpegdec.c
	libavcodec/libvo-aacenc.c
	libavcodec/libvorbisenc.c
	libavcodec/libvpxdec.c
	libavcodec/libvpxenc.c
	libavcodec/libx264.c
	libavcodec/mjpegbdec.c
	libavcodec/mjpegdec.c
	libavcodec/mpegaudiodec_float.c
	libavcodec/msmpeg4dec.c
	libavcodec/mxpegdec.c
	libavcodec/nvenc_h264.c
	libavcodec/nvenc_hevc.c
	libavcodec/pngdec.c
	libavcodec/qpeg.c
	libavcodec/ra288.c
	libavcodec/rv10.c
	libavcodec/s302m.c
	libavcodec/sp5xdec.c
	libavcodec/takdec.c
	libavcodec/tiff.c
	libavcodec/tta.c
	libavcodec/utils.c
	libavcodec/v210dec.c
	libavcodec/vp6.c
	libavcodec/vp9.c
	libavcodec/wavpack.c
	libavcodec/yop.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-27 22:50:18 +02:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Paul B Mahol
a03b69478b avcodec/exr: fix crash caused by merge
Various header informations need to be reset when decoding next frame.
Regression since: 95582b5c

Fixes ticket #4597.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-06-06 16:02:19 +00:00
Michael Niedermayer
5dd5b7d531 Revert "avcodec/exr: fix memset first arg in reverse_lut()"
This reverts commit 586ba24ff2.

Fixes Ticket 4386

Found-by: Martin Vignali <martin.vignali@gmail.com>
2015-04-01 19:53:23 +02:00
Paul B Mahol
586ba24ff2 avcodec/exr: fix memset first arg in reverse_lut()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2015-02-22 17:30:50 +00:00