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
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
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
Benjamin Otte
cccfeaa59c
gst_element_class_set_details => gst_element_class_set_details_simple
2010-03-18 14:32:00 +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
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
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
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
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
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
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
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
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
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
Tim-Philipp Müller
00c4b0b17a
jpegdec: implement basic QoS
...
Don't decode frames that are going to be too late anyway.
2009-04-01 21:15:02 +01:00
Tim-Philipp Müller
ab1bbcd58d
jpegdec: put GstSegment inside the element struct instead of allocating it separately
2009-03-25 10:36:49 +00:00
Stefan Kost
eb89143219
Add examples for the jpeg elements.
2009-01-29 10:12:43 +02:00
Mark Nauwelaerts
173741c10c
ext/jpeg/gstjpegdec.c: Align documentation with reality.
...
Original commit message from CVS:
* ext/jpeg/gstjpegdec.c:
Align documentation with reality.
2008-07-14 16:28:25 +00:00
Edward Hervey
badcd298cc
ext/jpeg/gstjpegdec.c: Actually drop the buffers which are outside the currently configured segment instead of just e...
...
Original commit message from CVS:
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain):
Actually drop the buffers which are outside the currently configured
segment instead of just emitting a WARNING.
2007-12-16 23:43:46 +00:00
Stefan Kost
73ec6b7a1d
More docs. More logs in pngdec.
...
Original commit message from CVS:
* docs/plugins/Makefile.am:
* docs/plugins/gst-plugins-good-plugins-docs.sgml:
* docs/plugins/gst-plugins-good-plugins-sections.txt:
* docs/plugins/inspect/plugin-jpeg.xml:
* docs/plugins/inspect/plugin-png.xml:
* ext/jpeg/gstjpegdec.c:
* ext/libpng/gstpngdec.c: (gst_pngdec_task),
(gst_pngdec_sink_setcaps):
More docs. More logs in pngdec.
2007-07-18 09:21:23 +00:00
Vincent Torri
fd18506657
ext/jpeg/: These libjpeg callbacks should return a 'boolean' (unsigned char apparently) and not a 'gboolean' (which m...
...
Original commit message from CVS:
Patch by: Vincent Torri <vtorri at univ-evry fr>
* ext/jpeg/gstjpegdec.c:
* ext/jpeg/gstjpegenc.c:
* ext/jpeg/smokecodec.c:
These libjpeg callbacks should return a 'boolean' (unsigned char
apparently) and not a 'gboolean' (which maps to gint). Fixes
warnings when compiling with MingW (#393427 ).
* gst/rtsp/rtspconnection.c: (rtsp_connection_read):
Use ioctlsocket on win32.
* gst/udp/gstudpsrc.c: (gst_udpsrc_create):
Some printf format fixes for win32.
2007-01-08 12:45:10 +00:00
Tim-Philipp Müller
93c5c6fcba
gst/id3demux/id3v2frames.c: We require a -base more recent than 0.10.9, so it's safe to use
...
Original commit message from CVS:
* gst/id3demux/id3v2frames.c: (parse_picture_frame):
We require a -base more recent than 0.10.9, so it's safe to use
GST_TYPE_TAG_IMAGE_TYPE unconditionally now.
* ext/dv/gstdvdec.c: (gst_dvdec_sink_event):
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_sink_event):
Use _newsegment_full() now that we depend on a recent enough core.
* gst/wavparse/gstwavparse.c:
Remove cruft that we don't need any longer now that we depend on
a recent enough -base.
2006-11-01 13:59:49 +00:00
Tim-Philipp Müller
82f5a3508c
Printf format fixes.
...
Original commit message from CVS:
* ext/cairo/gsttimeoverlay.c:
(gst_cairo_time_overlay_update_font_height):
* ext/gdk_pixbuf/pixbufscale.c: (gst_pixbufscale_transform_caps):
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_parse_image_data):
* ext/jpeg/gstjpegenc.c: (gst_jpegenc_chain):
* ext/jpeg/gstsmokedec.c: (gst_smokedec_chain):
* ext/jpeg/gstsmokeenc.c: (gst_smokeenc_chain):
* ext/libpng/gstpngdec.c: (user_endrow_callback):
* gst/auparse/gstauparse.c: (gst_au_parse_parse_header):
* gst/avi/gstavidemux.c: (gst_avi_demux_parse_superindex),
(gst_avi_demux_parse_subindex), (gst_avi_demux_parse_stream),
(gst_avi_demux_stream_data):
* gst/cutter/gstcutter.c: (gst_cutter_chain):
* gst/debug/efence.c: (gst_efence_buffer_alloc),
(gst_fenced_buffer_copy):
* gst/id3demux/id3v2frames.c: (id3demux_id3v2_parse_frame):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_add_stream):
* gst/matroska/matroska-mux.c: (gst_matroska_mux_start):
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_send),
(gst_rtspsrc_handle_message):
* gst/wavparse/gstwavparse.c: (gst_wavparse_stream_headers):
* sys/ximage/ximageutil.c: (ximageutil_xcontext_get):
Printf format fixes.
2006-10-05 16:37:33 +00:00
Tim-Philipp Müller
ca1f196979
ext/jpeg/gstjpegdec.c: our code should handle that fine. Some of the buttons on the apple trailer site are apparently...
...
Original commit message from CVS:
* ext/jpeg/gstjpegdec.c:
Set minimum height to 8 (from 16), our code should handle
that fine. Some of the buttons on the apple trailer site
are apparently only 15 pixels high (see #357470 ).
2006-09-25 09:15:10 +00:00
Edward Hervey
3397426d9f
ext/jpeg/gstjpegdec.c: After a failed buffer alloc, we need to abort the jpeg decoding (it started when parsing heade...
...
Original commit message from CVS:
* ext/jpeg/gstjpegdec.c: (gst_jpeg_dec_chain):
After a failed buffer alloc, we need to abort the jpeg decoding (it
started when parsing headers to figure out how many bytes we need
to request downstream).
2006-06-18 14:00:19 +00:00