summaryrefslogtreecommitdiff
path: root/gst-libs/gst/vaapi
diff options
context:
space:
mode:
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-01-03 16:57:09 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2014-01-13 17:31:54 +0100
commit01af353116bc3273222de5243d2ab2af8776f5be (patch)
tree77a01762b47671657e1613ab82f931ad20f873fe /gst-libs/gst/vaapi
parent9548e32cf4cce81e129d208eeff2b31eb023b6cd (diff)
downloadgst-vaapi-01af353116bc3273222de5243d2ab2af8776f5be.tar.gz
encoder: fix indentation.
Diffstat (limited to 'gst-libs/gst/vaapi')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.c4
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder.h6
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264.c8
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264.h1
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264_priv.h1
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c20
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_objects.c2
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_priv.h3
8 files changed, 26 insertions, 19 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.c b/gst-libs/gst/vaapi/gstvaapiencoder.c
index e0be3141..a9cd85d8 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.c
@@ -86,7 +86,7 @@ static GstVaapiCodedBufferProxy *
gst_vaapi_encoder_create_coded_buffer (GstVaapiEncoder * encoder)
{
GstVaapiCodedBufferPool *const pool =
- GST_VAAPI_CODED_BUFFER_POOL (encoder->codedbuf_pool);
+ GST_VAAPI_CODED_BUFFER_POOL (encoder->codedbuf_pool);
GstVaapiCodedBufferProxy *codedbuf_proxy;
g_mutex_lock (&encoder->mutex);
@@ -104,7 +104,7 @@ gst_vaapi_encoder_create_coded_buffer (GstVaapiEncoder * encoder)
return NULL;
gst_vaapi_coded_buffer_proxy_set_destroy_notify (codedbuf_proxy,
- (GDestroyNotify)_coded_buffer_proxy_released_notify, encoder);
+ (GDestroyNotify) _coded_buffer_proxy_released_notify, encoder);
return codedbuf_proxy;
}
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder.h b/gst-libs/gst/vaapi/gstvaapiencoder.h
index 6b0a7ed2..d548b5b1 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder.h
@@ -36,7 +36,8 @@ typedef struct _GstVaapiEncoder GstVaapiEncoder;
* GstVaapiEncoderStatus:
* @GST_VAAPI_ENCODER_STATUS_SUCCESS: Success.
* @GST_VAAPI_ENCODER_STATUS_ERROR_NO_SURFACE: No surface left to encode.
- * @GST_VAAPI_ENCODER_STATUS_ERROR_NO_BUFFER: No coded buffer left to hold the encoded picture.
+ * @GST_VAAPI_ENCODER_STATUS_ERROR_NO_BUFFER: No coded buffer left to
+ * hold the encoded picture.
* @GST_VAAPI_ENCODER_STATUS_ERROR_UNKNOWN: Unknown error.
* @GST_VAAPI_ENCODER_STATUS_ERROR_ALLOCATION_FAILED: No memory left.
* @GST_VAAPI_ENCODER_STATUS_ERROR_INVALID_PARAMETER: Invalid parameter.
@@ -74,7 +75,8 @@ GstVaapiEncoderStatus
gst_vaapi_encoder_get_codec_data (GstVaapiEncoder * encoder,
GstBuffer ** out_codec_data_ptr);
-GstCaps *gst_vaapi_encoder_set_format (GstVaapiEncoder * encoder,
+GstCaps *
+gst_vaapi_encoder_set_format (GstVaapiEncoder * encoder,
GstVideoCodecState * state, GstCaps * ref_caps);
GstVaapiEncoderStatus
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
index cc5dbcc7..d5bef53c 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c
@@ -331,7 +331,6 @@ _set_key_frame (GstVaapiEncPicture * picture,
_set_idr_frame (picture, encoder);
} else
_set_i_frame (picture, encoder);
-
}
gboolean
@@ -1153,7 +1152,7 @@ ensure_picture (GstVaapiEncoderH264 * encoder, GstVaapiEncPicture * picture,
GstVaapiCodedBufferProxy * codedbuf_proxy, GstVaapiSurfaceProxy * surface)
{
GstVaapiCodedBuffer *const codedbuf =
- GST_VAAPI_CODED_BUFFER_PROXY_BUFFER (codedbuf_proxy);
+ GST_VAAPI_CODED_BUFFER_PROXY_BUFFER (codedbuf_proxy);
if (!fill_va_picture_param (encoder, picture, codedbuf, surface))
return FALSE;
@@ -1593,7 +1592,8 @@ gst_vaapi_encoder_h264_set_context_info (GstVaapiEncoder * base_encoder)
const guint DEFAULT_SURFACES_COUNT = 3;
/* Maximum sizes for common headers (in bits) */
- enum {
+ enum
+ {
MAX_SPS_HDR_SIZE = 16473,
MAX_VUI_PARAMS_SIZE = 210,
MAX_HRD_PARAMS_SIZE = 4103,
@@ -1757,7 +1757,7 @@ gst_vaapi_encoder_h264_finalize (GstVaapiEncoder * base)
}
static inline const GstVaapiEncoderClass *
-gst_vaapi_encoder_h264_class ()
+gst_vaapi_encoder_h264_class (void)
{
static const GstVaapiEncoderClass GstVaapiEncoderH264Class = {
GST_VAAPI_ENCODER_CLASS_INIT (H264, h264),
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.h b/gst-libs/gst/vaapi/gstvaapiencoder_h264.h
index 2063f4ae..3eee7c8f 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.h
@@ -38,4 +38,5 @@ gboolean
gst_vaapi_encoder_h264_is_avc (GstVaapiEncoderH264 * encoder);
G_END_DECLS
+
#endif /*GST_VAAPI_ENCODER_H264_H */
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264_priv.h b/gst-libs/gst/vaapi/gstvaapiencoder_h264_priv.h
index 3a60a6fc..177a5284 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264_priv.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264_priv.h
@@ -104,7 +104,6 @@ struct _GstVaapiEncoderH264
GstBuffer *sps_data;
GstBuffer *pps_data;
-
};
G_END_DECLS
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c b/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c
index 62d98eff..c4b6b201 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_mpeg2.c
@@ -50,7 +50,7 @@ gst_bit_writer_write_pps (GstBitWriter * bitwriter,
static void clear_references (GstVaapiEncoderMpeg2 * encoder);
static void push_reference (GstVaapiEncoderMpeg2 * encoder,
- GstVaapiSurfaceProxy * ref;);
+ GstVaapiSurfaceProxy * ref);
static struct
{
@@ -58,6 +58,7 @@ static struct
int line_per_frame;
int frame_per_sec;
} mpeg2_upper_samplings[2][3] = {
+ /* *INDENT-OFF* */
{ { 0, 0, 0},
{ 720, 576, 30 },
{ 0, 0, 0 },
@@ -66,6 +67,7 @@ static struct
{ 720, 576, 30 },
{ 1920, 1152, 60 },
}
+ /* *INDENT-ON* */
};
static gboolean
@@ -73,6 +75,7 @@ ensure_sampling_desity (GstVaapiEncoderMpeg2 * encoder)
{
guint p, l;
float fps;
+
p = encoder->profile;
l = encoder->level;
fps = GST_VAAPI_ENCODER_FPS_N (encoder) / GST_VAAPI_ENCODER_FPS_D (encoder);
@@ -132,6 +135,7 @@ static unsigned char
make_profile_and_level_indication (guint32 profile, guint32 level)
{
guint32 p = 4, l = 8;
+
switch (profile) {
case GST_ENCODER_MPEG2_PROFILE_SIMPLE:
p = 5;
@@ -256,7 +260,6 @@ fill_picture (GstVaapiEncoderMpeg2 * encoder,
pic->f_code[1][1] = 0xf;
pic->forward_reference_picture = VA_INVALID_SURFACE;
pic->backward_reference_picture = VA_INVALID_SURFACE;
-
} else if (pic->picture_type == VAEncPictureTypePredictive) {
pic->f_code[0][0] = f_code_x;
pic->f_code[0][1] = f_code_y;
@@ -390,7 +393,7 @@ ensure_picture (GstVaapiEncoderMpeg2 * encoder, GstVaapiEncPicture * picture,
GstVaapiCodedBufferProxy * codedbuf_proxy, GstVaapiSurfaceProxy * surface)
{
GstVaapiCodedBuffer *const codedbuf =
- GST_VAAPI_CODED_BUFFER_PROXY_BUFFER (codedbuf_proxy);
+ GST_VAAPI_CODED_BUFFER_PROXY_BUFFER (codedbuf_proxy);
if (!fill_picture (encoder, picture, codedbuf, surface))
return FALSE;
@@ -596,7 +599,6 @@ gst_vaapi_encoder_mpeg2_reordering (GstVaapiEncoder * base,
picture->type = GST_VAAPI_PICTURE_TYPE_B;
status = GST_VAAPI_ENCODER_STATUS_NO_SURFACE;
}
-
}
picture->frame_num = encoder->frame_num++;
@@ -614,6 +616,7 @@ static GstVaapiProfile
to_vaapi_profile (guint32 profile)
{
GstVaapiProfile p;
+
switch (profile) {
case GST_ENCODER_MPEG2_PROFILE_SIMPLE:
p = GST_VAAPI_PROFILE_MPEG2_SIMPLE;
@@ -634,7 +637,8 @@ gst_vaapi_encoder_mpeg2_set_context_info (GstVaapiEncoder * base_encoder)
GstVaapiContextInfo *const cip = &base_encoder->context_info;
/* Maximum sizes for common headers (in bytes) */
- enum {
+ enum
+ {
MAX_SEQ_HDR_SIZE = 140,
MAX_SEQ_EXT_SIZE = 10,
MAX_GOP_SIZE = 8,
@@ -709,7 +713,6 @@ gst_vaapi_encoder_mpeg2_set_format (GstVaapiEncoder * base,
error:
gst_caps_unref (result);
return NULL;
-
}
static gboolean
@@ -776,7 +779,7 @@ gst_vaapi_encoder_mpeg2_finalize (GstVaapiEncoder * base)
}
static inline const GstVaapiEncoderClass *
-gst_vaapi_encoder_mpeg2_class ()
+gst_vaapi_encoder_mpeg2_class (void)
{
static const GstVaapiEncoderClass GstVaapiEncoderMpeg2Class = {
GST_VAAPI_ENCODER_CLASS_INIT (Mpeg2, mpeg2),
@@ -795,6 +798,7 @@ static struct
int code;
float value;
} frame_rate_tab[] = {
+ /* *INDENT-OFF* */
{ 1, 23.976 },
{ 2, 24.0 },
{ 3, 25.0 },
@@ -803,6 +807,7 @@ static struct
{ 6, 50 },
{ 7, 59.94 },
{ 8, 60 }
+ /* *INDENT-ON* */
};
static int
@@ -886,7 +891,6 @@ static gboolean
gst_bit_writer_write_pps (GstBitWriter * bitwriter,
VAEncPictureParameterBufferMPEG2 * pic)
{
-
gst_bit_writer_put_bits_uint32 (bitwriter, START_CODE_PICUTRE, 32);
gst_bit_writer_put_bits_uint32 (bitwriter, pic->temporal_reference, 10);
gst_bit_writer_put_bits_uint32 (bitwriter,
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_objects.c b/gst-libs/gst/vaapi/gstvaapiencoder_objects.c
index 5f730e36..b75bb95d 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_objects.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_objects.c
@@ -304,7 +304,7 @@ gboolean
gst_vaapi_enc_picture_create (GstVaapiEncPicture * picture,
const GstVaapiCodecObjectConstructorArgs * args)
{
- GstVideoCodecFrame *const frame = (GstVideoCodecFrame *)args->data;
+ GstVideoCodecFrame *const frame = (GstVideoCodecFrame *) args->data;
gboolean success;
g_return_val_if_fail (frame != NULL, FALSE);
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_priv.h b/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
index e5706025..bd17c8f4 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_priv.h
@@ -75,7 +75,7 @@ typedef struct _GstVaapiEncoderClass GstVaapiEncoderClass;
struct _GstVaapiEncoder
{
- /*< private > */
+ /*< private >*/
GstVaapiMiniObject parent_instance;
GstVaapiDisplay *display;
@@ -98,6 +98,7 @@ struct _GstVaapiEncoder
struct _GstVaapiEncoderClass
{
+ /*< private >*/
GstVaapiMiniObjectClass parent_class;
gboolean (*init) (GstVaapiEncoder * encoder);