From d0332c2a1612d02fd3b68e49ef79171690de3f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 30 Dec 2015 11:40:59 +0200 Subject: [PATCH] codecparsers: Spread some G_GNUC_INTERNAL in various places --- gst-libs/gst/codecparsers/dboolhuff.h | 3 +++ gst-libs/gst/codecparsers/nalutils.h | 21 +++++++++++++++++++++ gst-libs/gst/codecparsers/parserutils.h | 2 +- gst-libs/gst/codecparsers/vp8utils.h | 10 +++++----- gst-libs/gst/codecparsers/vp9utils.h | 3 +++ 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/codecparsers/dboolhuff.h b/gst-libs/gst/codecparsers/dboolhuff.h index 5d27eafe02..297606467d 100644 --- a/gst-libs/gst/codecparsers/dboolhuff.h +++ b/gst-libs/gst/codecparsers/dboolhuff.h @@ -15,6 +15,7 @@ #include #include #include +#include typedef size_t VP8_BD_VALUE; @@ -44,12 +45,14 @@ typedef struct extern const unsigned char vp8_norm[256]; +G_GNUC_INTERNAL int vp8dx_start_decode(BOOL_DECODER *br, const unsigned char *source, unsigned int source_sz, vp8_decrypt_cb *decrypt_cb, void *decrypt_state); +G_GNUC_INTERNAL void vp8dx_bool_decoder_fill(BOOL_DECODER *br); diff --git a/gst-libs/gst/codecparsers/nalutils.h b/gst-libs/gst/codecparsers/nalutils.h index 11cbe7ae5c..7e23ab125e 100644 --- a/gst-libs/gst/codecparsers/nalutils.h +++ b/gst-libs/gst/codecparsers/nalutils.h @@ -53,19 +53,35 @@ typedef struct guint64 cache; /* cached bytes */ } NalReader; +G_GNUC_INTERNAL void nal_reader_init (NalReader * nr, const guint8 * data, guint size); +G_GNUC_INTERNAL gboolean nal_reader_read (NalReader * nr, guint nbits); + +G_GNUC_INTERNAL gboolean nal_reader_skip (NalReader * nr, guint nbits); + +G_GNUC_INTERNAL gboolean nal_reader_skip_long (NalReader * nr, guint nbits); + +G_GNUC_INTERNAL guint nal_reader_get_pos (const NalReader * nr); + +G_GNUC_INTERNAL guint nal_reader_get_remaining (const NalReader * nr); + +G_GNUC_INTERNAL guint nal_reader_get_epb_count (const NalReader * nr); +G_GNUC_INTERNAL gboolean nal_reader_is_byte_aligned (NalReader * nr); + +G_GNUC_INTERNAL gboolean nal_reader_has_more_data (NalReader * nr); #define NAL_READER_READ_BITS_H(bits) \ +G_GNUC_INTERNAL \ gboolean nal_reader_get_bits_uint##bits (NalReader *nr, guint##bits *val, guint nbits) NAL_READER_READ_BITS_H (8); @@ -73,11 +89,15 @@ NAL_READER_READ_BITS_H (16); NAL_READER_READ_BITS_H (32); #define NAL_READER_PEEK_BITS_H(bits) \ +G_GNUC_INTERNAL \ gboolean nal_reader_peek_bits_uint##bits (const NalReader *nr, guint##bits *val, guint nbits) NAL_READER_PEEK_BITS_H (8); +G_GNUC_INTERNAL gboolean nal_reader_get_ue (NalReader * nr, guint32 * val); + +G_GNUC_INTERNAL gboolean nal_reader_get_se (NalReader * nr, gint32 * val); #define CHECK_ALLOWED_MAX(val, max) { \ @@ -159,4 +179,5 @@ gboolean nal_reader_get_se (NalReader * nr, gint32 * val); val = tmp; \ } +G_GNUC_INTERNAL gint scan_for_start_codes (const guint8 * data, guint size); diff --git a/gst-libs/gst/codecparsers/parserutils.h b/gst-libs/gst/codecparsers/parserutils.h index 6b54ded744..e1bf18fd70 100644 --- a/gst-libs/gst/codecparsers/parserutils.h +++ b/gst-libs/gst/codecparsers/parserutils.h @@ -101,7 +101,7 @@ struct _VLCTable guint cbits; }; -gboolean +G_GNUC_INTERNAL gboolean decode_vlc (GstBitReader * br, guint * res, const VLCTable * table, guint length); diff --git a/gst-libs/gst/codecparsers/vp8utils.h b/gst-libs/gst/codecparsers/vp8utils.h index c8fc96b071..5715a5b1e6 100644 --- a/gst-libs/gst/codecparsers/vp8utils.h +++ b/gst-libs/gst/codecparsers/vp8utils.h @@ -25,19 +25,19 @@ #include -void +G_GNUC_INTERNAL void gst_vp8_token_update_probs_init (GstVp8TokenProbs * probs); -void +G_GNUC_INTERNAL void gst_vp8_token_probs_init_defaults (GstVp8TokenProbs * probs); -void +G_GNUC_INTERNAL void gst_vp8_mv_update_probs_init (GstVp8MvProbs * probs); -void +G_GNUC_INTERNAL void gst_vp8_mv_probs_init_defaults (GstVp8MvProbs * probs); -void +G_GNUC_INTERNAL void gst_vp8_mode_probs_init_defaults (GstVp8ModeProbs * probs, gboolean key_frame); #endif /* GST_VP8_UTILS_H */ diff --git a/gst-libs/gst/codecparsers/vp9utils.h b/gst-libs/gst/codecparsers/vp9utils.h index 20ef6bb32e..0423d30d8e 100644 --- a/gst-libs/gst/codecparsers/vp9utils.h +++ b/gst-libs/gst/codecparsers/vp9utils.h @@ -11,13 +11,16 @@ #define __VP9_QUANT_H__ #include +#include #define MAXQ 255 #define QINDEX_RANGE 256 #define QINDEX_BITS 8 +G_GNUC_INTERNAL int16_t gst_vp9_dc_quant(int qindex, int delta, int bit_depth); +G_GNUC_INTERNAL int16_t gst_vp9_ac_quant(int qindex, int delta, int bit_depth);