summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <bilboed@bilboed.com>2009-09-21 12:06:55 +0200
committerEdward Hervey <bilboed@bilboed.com>2009-09-21 12:13:03 +0200
commit4ceb3c567874f0f179366388c8da94715ec39f3b (patch)
tree4e7f53b46a969a663c47ade79d300c1b10c6562e
parentbf34bdd3ab4573a2fd7955e1463f79af18b8d5e8 (diff)
mpegtsparse: Specify that psi table is static const.
This avoids re-allocating it every single time we go into it. Roughly 10% performance boost in overall tsparse processing time.
-rw-r--r--gst/mpegdemux/mpegtsparse.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gst/mpegdemux/mpegtsparse.c b/gst/mpegdemux/mpegtsparse.c
index 386623843..beacc451f 100644
--- a/gst/mpegdemux/mpegtsparse.c
+++ b/gst/mpegdemux/mpegtsparse.c
@@ -861,11 +861,12 @@ mpegts_parse_is_psi (MpegTSParse * parse, MpegTSPacketizerPacket * packet)
gboolean retval = FALSE;
guint8 table_id;
int i;
- guint8 si_tables[] = { 0x00, 0x01, 0x02, 0x03, 0x40, 0x41, 0x42, 0x46, 0x4A,
- 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
- 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65,
- 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71,
- 0x72, 0x73, 0x7E, 0x7F, TABLE_ID_UNSET
+ static const guint8 si_tables[] =
+ { 0x00, 0x01, 0x02, 0x03, 0x40, 0x41, 0x42, 0x46, 0x4A, 0x4E, 0x4F, 0x50,
+ 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x5B, 0x5C,
+ 0x5D, 0x5E, 0x5F, 0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68,
+ 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x7E,
+ 0x7F, TABLE_ID_UNSET
};
if (g_hash_table_lookup (parse->psi_pids,
GINT_TO_POINTER ((gint) packet->pid)) != NULL)