mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05:37 +00:00
Attempting to optimize the code for embedded systems.
Original commit message from CVS: Attempting to optimize the code for embedded systems.
This commit is contained in:
parent
a9c9d62886
commit
8a534978d4
2 changed files with 13 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-11-09 Zeeshan Ali <zeenix@gmail.com>
|
||||
|
||||
* gst/flx/gstflxdec.c: (flx_decode_delta_fli),
|
||||
(flx_decode_delta_flc), (gst_flxdec_chain):
|
||||
Attempting to optimize the code for embedded systems.
|
||||
|
||||
2005-11-08 Alessandro Decina <alessandro at nnva dot org>
|
||||
|
||||
Reviewed by: Tim-Philipp Müller <tim at centricular dot net>
|
||||
|
|
|
@ -339,7 +339,6 @@ flx_decode_delta_fli (GstFlxDec * flxdec, guchar * data, guchar * dest)
|
|||
g_return_if_fail (flxdec != NULL);
|
||||
g_return_if_fail (flxdec->delta != NULL);
|
||||
|
||||
|
||||
/* use last frame for delta */
|
||||
memcpy (dest, GST_BUFFER_DATA (flxdec->delta),
|
||||
GST_BUFFER_SIZE (flxdec->delta));
|
||||
|
@ -392,7 +391,6 @@ flx_decode_delta_flc (GstFlxDec * flxdec, guchar * data, guchar * dest)
|
|||
g_return_if_fail (flxdec != NULL);
|
||||
g_return_if_fail (flxdec->delta != NULL);
|
||||
|
||||
|
||||
/* use last frame for delta */
|
||||
memcpy (dest, GST_BUFFER_DATA (flxdec->delta),
|
||||
GST_BUFFER_SIZE (flxdec->delta));
|
||||
|
@ -458,7 +456,6 @@ gst_flxdec_chain (GstPad * pad, GstBuffer * buf)
|
|||
|
||||
GstFlxDec *flxdec;
|
||||
FlxHeader *flxh;
|
||||
FlxFrameChunk *flxfh;
|
||||
|
||||
g_return_val_if_fail (buf != NULL, GST_FLOW_ERROR);
|
||||
flxdec = (GstFlxDec *) gst_pad_get_parent (pad);
|
||||
|
@ -537,23 +534,24 @@ gst_flxdec_chain (GstPad * pad, GstBuffer * buf)
|
|||
GstBuffer *out;
|
||||
|
||||
if (avail >= FlxFrameChunkSize) {
|
||||
FlxFrameChunk flxfh;
|
||||
guchar *chunk = NULL;
|
||||
guint to_flush = 0;
|
||||
const guint8 *data =
|
||||
gst_adapter_peek (flxdec->adapter, FlxFrameChunkSize);
|
||||
flxfh = (FlxFrameChunk *) g_memdup (data, FlxFrameChunkSize);
|
||||
memcpy (&flxfh, data, FlxFrameChunkSize);
|
||||
|
||||
switch (flxfh->id) {
|
||||
switch (flxfh.id) {
|
||||
case FLX_FRAME_TYPE:
|
||||
if (avail < flxfh->size) {
|
||||
if (avail < flxfh.size) {
|
||||
break;
|
||||
}
|
||||
|
||||
gst_adapter_flush (flxdec->adapter, FlxFrameChunkSize);
|
||||
data = gst_adapter_peek (flxdec->adapter,
|
||||
flxfh->size - FlxFrameChunkSize);
|
||||
chunk = g_memdup (data, flxfh->size - FlxFrameChunkSize);
|
||||
to_flush = flxfh->size - FlxFrameChunkSize;
|
||||
flxfh.size - FlxFrameChunkSize);
|
||||
chunk = g_memdup (data, flxfh.size - FlxFrameChunkSize);
|
||||
to_flush = flxfh.size - FlxFrameChunkSize;
|
||||
|
||||
if (((FlxFrameType *) chunk)->chunks == 0)
|
||||
break;
|
||||
|
@ -590,7 +588,6 @@ gst_flxdec_chain (GstPad * pad, GstBuffer * buf)
|
|||
|
||||
if (chunk)
|
||||
g_free (chunk);
|
||||
g_free (flxfh);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue