Tim-Philipp Müller
6b2a0c7c46
jpegdec: don't crash if jpeg image contains more than three components
...
Our code currently only handles a maximum of 3 components, so error
out for now if the image has more components than that.
Fixes #604106 .
2010-04-25 23:15:42 +01:00
Stefan Kost
7e5d4b0fa9
jpegdec: move macro to c source
...
One less semi public symbol without namespace prefix in the headers.
2010-04-08 13:40:36 +03:00
Thiago Santos
b1984b72bb
jpegenc: Fix getcaps function
...
When creating the caps allowed to upstream using downstream
restrictions, use gst_pad_get_allowed_caps as that has the
usable formats and puts into it the width, height and framerate
fields. This avoids getting errors about getcaps returning
non subset caps of its pad template.
This error showed up on the metadata plugin unit test in -bad.
2010-04-05 16:09:58 -03:00
André Dieb Martins
74ac172bc2
jpegenc: should not return caps ANY based on downstream
...
When downstream has a sink pad with ANY caps, jpegenc should
treat it the same as NULL and return its template caps.
Fixes #614842
2010-04-04 21:30:06 -03:00
Raimo Järvi
10f092dc61
jpegenc: Set correct getcaps/setcaps functions on srcpads and simplify them
...
This fixes downstream negotiation, upstream negotiation isn't really
supported by jpegenc yet.
Fixes bug #613789 .
2010-03-26 13:34:17 +01:00
Benjamin Otte
cccfeaa59c
gst_element_class_set_details => gst_element_class_set_details_simple
2010-03-18 14:32:00 +01:00
Benjamin Otte
c76e72a7f5
Add -Wundef to configure flags
...
and fix the resulting warnings
2010-03-17 21:33:28 +01:00
Benjamin Otte
1055aaa9cb
Add -Wredundant-decls warning flag
...
Also fix compile issues
2010-03-17 19:35:10 +01:00
Benjamin Otte
3342b1679e
Add -Wmissing-declarations -Wmissing-prototypes warning flags
...
And fix all the warnings.
2010-03-17 18:23:28 +01:00
David Hoyt
ad05705afb
jpegdec: Fix invalid memory access by first checking and then reading
...
Fixes bug #610483 .
2010-02-22 20:55:29 +01:00
Stefan Kost
45522aab46
jpegenc: add a fixme for handling other YUV variants
2010-02-16 10:15:22 +02:00
Stefan Kost
a9f5bbe1ff
jpeg: don't directly access message, some message have args
...
This caused bogus messages, such as reported in bug #607471 .
2010-02-02 17:23:49 +02:00
Stefan Kost
8576a11dae
Revert "v4l2src: don't deref NULL"
...
This reverts commit 3d9d34bd60
.
2010-01-25 17:21:13 +02:00
Stefan Kost
3d9d34bd60
v4l2src: don't deref NULL
...
Error out when the pool gets shutdown.
2010-01-25 14:16:22 +02:00
Michael Smith
e5b6c1324b
jpegenc: when creating an overflow buffer, copy timestamps.
2010-01-23 15:32:48 -08:00
Peter van Hardenberg
701c7d4b2a
jpegenc: enlarge buffer if libjpeg tells us it's out of space. Fixes buffer
...
overflow on some high-quality, low-resolution jpeg encodes.
2010-01-21 17:26:23 -08:00
Wim Taymans
384c4a2495
jpegdec: reset segment info after flush
...
Reset the segment info after a flush. We use the segment for handling QoS and if
we don't reset the segment, QoS is basically disabled after a flushing seek.
2009-12-01 19:25:04 +01:00
Stefan Kost
b753e177fb
jpegenc: fix spelling in comment
2009-11-24 15:51:21 +02:00
Tim-Philipp Müller
7af7d93b27
jpegdec: free temporary buffer when changing state to NULL
...
Free temporary allocations in the state change function and not
only when the object is finalised.
2009-11-09 15:20:00 +00:00
Tim-Philipp Müller
26e7fe27d7
jpegdec: only allocate as much temporary memory as needed for indirect decoding
...
When we can't decode directly into the output buffer, make our temp buffers
only as big as needed instead of allocating for the worst case scenario (well,
we still alloc more than strictly needed for some cases, but significantly
less than before).
2009-11-09 15:18:58 +00:00
Stefan Kost
e3e910e971
jpegdec: don't allocate big arrays on the stack
...
Add the arrays to the instance data and allocate on first use.
2009-11-03 17:49:24 +02:00
Tim-Philipp Müller
c83ea23a03
jpegdec: fix branch hints
...
Remove inappropriate branching hints and add some new ones.
2009-10-16 13:41:45 +01:00
Tim-Philipp Müller
4fb3f2519c
jpegdec: fix regression in indirect decode path
...
Revert variable name back to what it was before the G_LIKELY was
added (in commit 69c24fb9
). The code works better that way.
2009-10-16 13:36:42 +01:00
Tim-Philipp Müller
0c92e70f6c
jpegdec: fix regression with certain formats
...
Fix regression introduced by previous commit (#598517 ).
2009-10-16 13:00:12 +01:00
Tim-Philipp Müller
30cb82da96
jpegdec: don't use decompress structure members we shouldn't be using
2009-10-16 13:00:12 +01:00
Tim-Philipp Müller
19b4f66014
jpegdec: remove some unused members from jpegdec instance structure
2009-10-16 13:00:12 +01:00
Tim-Philipp Müller
87bd79f4ba
jpegdec: fix bogus warning about discont flag on first buffer
...
The very first buffer should always have the DISCONT flag set, no
need to warn about that. Only warn if we get a DISCONT buffer in
non-packetised mode and we already have some data.
2009-10-13 01:10:59 +01:00
Tim-Philipp Müller
6ae6af9dab
jpegdec: fix crash for unusual vertical chroma subsampling factors
...
Fixes #597351 .
2009-10-13 01:10:59 +01:00
Josep Torra
c581e6f205
jpegdec: fixes warning building in snow leopard
2009-10-10 00:37:08 +02:00
Stefan Kost
e0cdd879b4
build: fprintf, sprintf, sscanf need stdio.h
2009-10-07 14:03:20 +03:00
Stefan Kost
86b8935b07
jpegdec: comment/logging cleanups and more branch guides
2009-10-06 17:46:49 +03:00
Stefan Kost
b1feeee166
jpegdec: don't leak output buffers on decoding errors
...
The setjmp handles libjpeg error. Free the outputbffer if we don't need it.
2009-09-30 09:19:48 +03:00
Tim-Philipp Müller
477cb58640
jpegdec: fix 'unused variable' compiler warning when compiling with GST_DISABLE_GST_DEBUG
2009-09-29 00:01:59 +01:00
Stefan Kost
69c24fb991
jpeg: handle more libjpeg return values, add some more branch hints
...
Also remove unused size variable in _chain().
2009-09-28 17:25:35 +03:00
Alessandro Decina
195883b30a
Fix compile warnings with gcc 4.0.1.
2009-09-22 15:04:36 +02:00
Stefan Kost
253f43203d
jpegdec: add a G_UNLIKELY and put perf-cat log to code path that copies
2009-09-21 16:07:50 +03:00
Edward Hervey
65d90baf84
jpegdec: Avoid unnecessary processing until we have a full picture.
...
This is for non-packetized mode, when we know the upstream size in bytes.
2009-09-03 17:40:20 +02:00
Tim-Philipp Müller
68c4019057
smokeenc: don't crash when compiled against libjpeg7
...
Set parameters so that we don't crash with libjpeg7. Based on
Stefan Kost's fix for jpegenc. Fixes #591951 .
2009-08-17 17:08:45 +01:00
Stefan Kost
a07a575209
jpeg: use longer macro names to not clash with some stupid windows defines
...
libjpeg headers pull some windows system inlcudes (on windows) that contain a
define for DEFAULT_QUALITY.
2009-07-30 17:57:53 +03:00
Mark Nauwelaerts
7a89fb0468
jpegdec: when scanning for 0xff marker ends, ensure desired result
...
Otherwise, any non 0xff byte at end of data would be mistaken for
a tag byte, and in case of a frame_len 0 tag subsequently lead to an
infinite loop.
2009-07-28 16:18:38 +02:00
Stefan Kost
23967b03a7
jpeg: make encoder work with libjpeg v7
...
We have to specify do_fancy_downsampling = FALSE in the encoder with did not exist before.
2009-07-24 10:50:13 +03:00
Stefan Kost
11c93fc1df
jpeg: code cleanups for encoder
...
Remove some disabled code in encoder. Try #if 0'ed code and add comments about
why it is disabled. Move idct-method enum to jpeg.c and use in both encoder and
decoder. Add idct-method property to encoder.
2009-07-21 10:04:36 +03:00
Philippe Normand
a0de8567ca
jpegdec: bump max size to 65535x65535
...
Remove artificial jpeg image limits.
Fixes #583048 .
2009-05-21 23:39:13 +02:00
Christian Schaller
bdf1698f35
Add RANKS for various encoders and muxers
2009-05-07 18:10:08 +01:00
Arnout Vandecappelle
99efbfcf4d
jpegdec: refactored gst_jpeg_dec_parse_image_data
...
Fixes #579808
2009-05-06 13:22:51 +02:00
Arnout Vandecappelle
788986e269
jpegdec: support additional 0xff before end marker.
...
JPEG markers may be preceded by additional 0xff. jpegdec should
skip over these, even before the end marker.
See #579808
2009-05-06 13:11:53 +02:00
Wim Taymans
4606188039
jpegenc: set colorspace before _set_defaults()
...
The libjpeg api says that we need to set the colorspace before we call
_set_defaults(). Indeed, if we don't do that we end up with some very freaky
non-standard quant table and huffman table indexes.
2009-05-05 16:24:16 +02:00
Tim-Philipp Müller
8d8e9af0a8
jpegdec: fix warning for still images by not trying to divide by 0
...
Don't pass a 0 divisor to gst_util_uint64_scale(), or it will complain
in the single image case where fps=0/1 (are we supposed to differentiate
between no fps=still image and fps=0/1=variable rate here btw?)
2009-04-20 19:42:13 +01:00
Tim-Philipp Müller
e14bae6637
jpegdec: use slightly more adaptive formula for QoS
...
Should work at least a tad better if the decoder can't keep up, and
should also spread dropped frames a bit more evenly over time.
2009-04-09 11:34:19 +01:00
Tim-Philipp Müller
f1fb1f80fa
jpegdec: demote some log message from DEBUG to LOG
...
And log decoder object.
2009-04-02 00:05:14 +01:00