Justin Ruggles
9e500efdbe
Add av_image_check_sar() and use it to validate SAR
11 years ago
Michael Niedermayer
126927c58e
avcodec/exr: mark gama option as experimental / unsupported
...
Suggested-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Gonzalo Garramuno
cd3daad77e
avcodec/exr: Add a gamma flag to exr loader to avoid banding
...
This is needed to avoid banding artifacts when gammaing the picture.
Currently, if done with a video filter, the process is done on uints
instead of full float.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
879072018f
avcodec/exr: use av_freep() for saftey
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Jimmy Christensen
38389058c3
OpenEXR decoder
...
Additional fixes and enhancements by Vittorio Giovara, Gonzalo Garramuno,
Nicolas George, Paul B Mahol and Michael Niedermayer.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
11 years ago
Gonzalo Garramuno
3d20260157
avcodec/exr: read layers
...
EXR files have, like tiffs, multiple channels and layers. I have a
patch for exr.c that allows you to select the layer you want to process
thru a -layer flag. It is not bulletproof but works for all layers that
have 3 channels in them (normals, motion vectors, etc).
The calling convention for ffmpeg is:
ffmpeg -layer Diffuse -i myexr.%d.exr test.mov
Here's an exr image with multiple layers:
http://www.datafilehost.com/d/e45d9a1c
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
256b986c04
avcodec/exr: stop using deprecated avcodec_set_dimensions()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Michael Niedermayer
80b1e1c03d
avcodec/exr: fix null pointer dereference
...
Fixes CID1108582
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d0812f91c8
avcodec/exr: favor av_freep() over av_free() for saftey
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Paul B Mahol
4413dcc035
avcodec/exr: piz decompression
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
996c73490c
avcodec/exr: remove pointless initialization
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
8c7bc7d3e5
avcodec/exr: use avpriv_report_missing_feature()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Clément Bœsch
b46f19100b
cosmetics: group remaining .name and .long_name.
...
See b2bed9325
.
11 years ago
Paul B Mahol
88b071a473
exr: set pict_type
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
a9b424879f
lavc & lavf: replace deprecated av_log* functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Clément Bœsch
1ec94b0f06
lavc: factorize ff_{thread_,re,}get_buffer error messages.
...
Coccinelle profile used:
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_get_buffer(ctx, f, flags)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str;
@@
-if ((r = ff_reget_buffer(ctx, f)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_reget_buffer(ctx, f)) < 0)
+ return r;
@@
expression r, ctx, f, loglevel, str, flags;
@@
-if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0) {
- av_log(ctx, loglevel, str);
- return r;
-}
+if ((r = ff_thread_get_buffer(ctx, f, flags)) < 0)
+ return r;
...along with some manual patches for the remaining ones.
12 years ago
Michael Niedermayer
7ff3bfd584
exr: silence warning "libavcodec/exr.c:351:9: warning: variable ret set but not used"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
5a232e5078
exr: use bytestream functions in pxr24_uncompress()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
33240dfa9a
exr: pxr24 decompression
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
9f3c90a366
exr: fix error message when pixel type is not set
...
This only happens with missing chlist attribute from header.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4751c6c270
exr: s/bits_per_color_id/pixel_type
...
Previous naming was misleading.
Also fix wrong message about missing
support for 32-bit unsigned int pixel type.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
a71926a548
exr: track channels properties
...
Needed for proper decoding of channels with subsampling
and also for remaining compression methods.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Nicolas George
bf63a474ca
lavc/exr: use size_t instead of int for sizes.
...
Fix a segfault on 64-bits archs.
12 years ago
Paul B Mahol
9774145fe5
exr: simplify decompression path
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
7b12554c5a
exr: make sure that data_size is not bigger than expected
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
74a78bfe6c
exr: simplify filling channel_buffer[]
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
645f96f129
exr: check color channel subsampling too
...
If there is unsupported subsampling encountered abort
early instead of failing decoding later.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
1a08758e7c
exr: slice threading
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
89c77b6b15
exr: shorter channel buffer names
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
7a930f310a
exr: remove superfluous check
...
get_header_variable_length() already check for
out of array read and returns 0 in such case.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
fefd4b0924
exr: cosmetics: reindent
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
9c75c24de4
exr: check if line offset table is complete only once per frame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
cc0bd78413
exr: support more line orders
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
1178868683
exr: fix overflow check in lineoffset processing
...
Also read data size for raw compressions too and
make sure its value is sane.
Remove code that fills missing blocks with zeroes.
It is marginally useful and make implementation
of actually useful features harder.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
88d7259fd2
exr: merge multiple if () blocks
...
Remove useless comments.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
3456891291
exr: check version too
...
Separate version from flags.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
59015c1118
exr: constify s in rle_uncompress()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
a3d890527e
exr: reset compression in decode_frame()
...
This fixes decoding of images if compression changes.
Regression since b040ffc84c
.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
4012cd6c4f
lavc: fix decode_frame() third parameter semantics for rest of video decoders
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
0d002de4a4
exr: fix twin ;
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
a51540d811
lavc: do not use av_pix_fmt_descriptors directly
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
e4fff08f5b
exr: fix decoding ZIP16 and height not multiple of 16
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
b040ffc84c
exr: display warning if multiple compression attributes are found
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
01f76a779c
exr: merge common code
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
a2dab7512e
exr: compression attribute is mandatory
...
Do not continue decoding if one is missing.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
7543fd80e5
exr: check size of uncompressed buffer returned by uncompress()
...
The actual size of uncompressed buffer returned by uncompress() may be
smaller than expected, so abort decoding in such cases.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
2c31ed3330
exr: make channel_offsets int instead of int8_t
...
Prior to this change max number of channels for float data which was
going to be correctly decoded was 32, which is rather small
considering that exr allows multiple channel layers.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
bc0ef29cf0
exr: fix scan_line_size calculation
...
This one will also work in cases when file have channels
we are not going to use.
Only compressed files where affected by this bug.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
cd3136e84a
exr: print channel names not yet supported
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
fedefe4a87
exr: remove double ;;
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago