Tim-Philipp Müller
100673bf14
jpegenc: free/malloc instead of realloc, avoids memcpy
2010-12-11 17:03:45 +00:00
Mark Nauwelaerts
9ee2e9ede5
jpegdec: add debug to notify when skipping to jpeg header
2010-12-06 19:14:52 +01:00
Mark Nauwelaerts
04fae48d1d
jpegdec: discard incomplete image
...
... as determined when finding SOI next image before an EOI.
Based on patch by David Hoyt <david.hoyt@llnl.gov>
Fixes #635734 .
2010-12-06 19:14:52 +01:00
Mark Nauwelaerts
c50695c14b
jpegdec: avoid infinite loop when resyncing
...
Fixes #635734 (partly).
2010-12-06 19:14:41 +01:00
Stefan Kost
45f6707784
various (ext): add a missing G_PARAM_STATIC_STRINGS flags
2010-10-13 17:39:36 +03:00
Tim-Philipp Müller
66a783fd01
jpegdec: don't post an error message if buffer alloc fails with NOT_LINKED flow
...
This is not fatal, let upstream handle it.
2010-09-12 14:54:20 +01:00
Wim Taymans
2b81f913a4
jpegdec: avoid invalid adapter flush on QoS
...
First store the available data in the adapter in the rem_img_len instance field
before trying to flush the adapter with that value on QoS.
2010-09-07 16:49:16 +02:00
Sebastian Dröge
b606ab06e5
jpegdec: Don't use GST_FLOW_IS_FATAL()
...
And don't post an error message if buffer allocation failed because
of UNEXPECTED, which only means that downstream wants us to EOS now.
2010-09-04 14:52:10 +02:00
Thiago Santos
95d1b932ab
jpegdec: Prevent crash when reading image with problems
...
Check if we have data on the adapter and fail if not.
Fixes #627413
2010-08-19 18:30:05 -03:00
Thiago Santos
da1c816358
jpegdec: Fix regression on markers parsing
...
Fixes a regression introduced when fixing bug #583047 in
commit a391bf52cc
Skip the data when libjpeg asks it to be skipped on
one of its callbacks.
2010-07-19 15:21:04 -03:00
Mark Nauwelaerts
6f84bbe34e
jpegdec: fix skipping extra 0xff markers
...
Fixes #623585 .
2010-07-05 13:20:08 +02:00
Tim-Philipp Müller
7cbfe3eae1
jpegdec: fix memory leak
...
Don't leak result of gst_adapter_take(). There are most likely
smarter things we can do, but let's keep things simple for the
release.
Fixes #623172 .
2010-07-02 15:10:24 +01:00
Sebastian Dröge
0df55f42e6
jpeg: Explicitely link with libgstbase
2010-06-27 06:39:14 +02:00
Mark Nauwelaerts
a391bf52cc
jpegdec: use libjpeg scatter-gather operation to avoid data copying
...
Fixes #583047 (more).
2010-06-14 15:17:16 +02:00
Mark Nauwelaerts
58fbcf01e5
jpegdec: optimize buffer handling when parsing
...
Use an adapter to collect incoming data, and use adapter API to scan and peek.
Fixes #583047 .
2010-06-14 15:17:16 +02:00
Mark Nauwelaerts
fb3a8cd47f
jpegdec: fix variable init
2010-06-01 15:56:41 +02:00
Thiago Santos
bca4ca631f
jpegdec: Adds 8bit grayscale support
...
Adds decoding support for jpeg images in 8 bit grayscale format.
2010-06-01 09:06:04 -03:00
Thiago Santos
d7a25fd109
jpegenc: Accept grayscale as input
...
Adds video/x-raw-grayscale (8 bit) support to jpegenc
2010-06-01 09:05:29 -03:00
Thiago Santos
e0c49a7590
jpegenc: Keep variables in sane state after _reset
...
When reseting, keep 'row' variables at a sane state after
freeing to avoid it being freed again on _resync realloc
when the element is reused.
Fixes #619943
2010-05-28 10:43:36 -03:00
Tim-Philipp Müller
035aead2d7
jpegenc: fix two leaks
...
Don't leak othercaps or jpegenc ref.
2010-05-14 17:30:40 +01:00
Wim Taymans
3cfd7968b4
jpegdec: increase acceptable output sizes
...
We can perfectly decode 1x1 images so lower the min width and height to 1.
Fixes #618392
2010-05-13 12:16:59 +02:00
Stefan Kost
566bd22435
jpegenc: also lift the arbitrary restrictions for width and height
...
This was already done for jpegdec.
2010-05-06 15:43:53 +03:00
Mark Nauwelaerts
52c71352e0
jpegdec: optimise buffer scanning
...
Specifically, when needing more data, do not rescan from start next time
around, but resume from last position.
See also #583047 .
2010-04-30 17:49:24 +02:00
Mark Nauwelaerts
761b883f2c
jpegdec: disregard superfluous lines when indirect decoding
2010-04-30 17:49:15 +02:00
Mark Nauwelaerts
78a2b22ed5
jpegdec: add support for RGB and grayscale color space
...
Also refactor src caps negotiation and setting.
2010-04-30 17:49:11 +02:00
Mark Nauwelaerts
b0ac4a4560
jpegenc: support more colour spaces and some cleanups
2010-04-30 17:49:09 +02:00
Mark Nauwelaerts
c5614dbb40
jpegenc: more generic sink getcaps
2010-04-30 17:49:05 +02:00
Mark Nauwelaerts
cec48383b1
jpegdec: more sanity checks on input
...
Specifically, verify input components / colour space is as code
subsequently expects, thereby avoiding crashes or otherwise bogus output.
Presently, that means 3 components YCbCr colour space, and somewhat
limited sampling factors.
Fixes #600553 .
2010-04-30 17:49:03 +02:00
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