[FFmpeg-cvslog] libschroedinger: Switch to function names more in line with Libav style.

Diego Biurrun git at videolan.org
Mon May 7 23:06:28 CEST 2012


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Sat Apr 14 15:39:22 2012 +0200| [fdc918632f5c16cf377a2170cd2f101933fb15ff] | committer: Diego Biurrun

libschroedinger: Switch to function names more in line with Libav style.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fdc918632f5c16cf377a2170cd2f101933fb15ff
---

 libavcodec/libschroedinger.c    |    4 ++--
 libavcodec/libschroedingerdec.c |   10 +++++-----
 libavcodec/libschroedingerenc.c |   10 +++++-----
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/libavcodec/libschroedinger.c b/libavcodec/libschroedinger.c
index fb0bfaa..2046761 100644
--- a/libavcodec/libschroedinger.c
+++ b/libavcodec/libschroedinger.c
@@ -163,7 +163,7 @@ int ff_get_schro_frame_format (SchroChromaFormat schro_pix_fmt,
     return -1;
 }
 
-static void FreeSchroFrame(SchroFrame *frame, void *priv)
+static void free_schro_frame(SchroFrame *frame, void *priv)
 {
     AVPicture *p_pic = priv;
 
@@ -195,7 +195,7 @@ SchroFrame *ff_create_schro_frame(AVCodecContext *avccontext,
     p_frame->format = schro_frame_fmt;
     p_frame->width  = y_width;
     p_frame->height = y_height;
-    schro_frame_set_free_callback(p_frame, FreeSchroFrame, (void *)p_pic);
+    schro_frame_set_free_callback(p_frame, free_schro_frame, (void *)p_pic);
 
     for (i = 0; i < 3; ++i) {
         p_frame->components[i].width  = i ? uv_width : y_width;
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c
index 20f9447..6a3b9bd 100644
--- a/libavcodec/libschroedingerdec.c
+++ b/libavcodec/libschroedingerdec.c
@@ -75,14 +75,14 @@ static void libschroedinger_decode_buffer_free(SchroBuffer *schro_buf,
     av_freep(&priv);
 }
 
-static void SchroParseContextInit(SchroParseUnitContext *parse_ctx,
-                                  const uint8_t *buf, int buf_size)
+static void parse_context_init(SchroParseUnitContext *parse_ctx,
+                               const uint8_t *buf, int buf_size)
 {
     parse_ctx->buf           = buf;
     parse_ctx->buf_size      = buf_size;
 }
 
-static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx)
+static SchroBuffer *find_next_parse_unit(SchroParseUnitContext *parse_ctx)
 {
     SchroBuffer *enc_buf = NULL;
     int next_pu_offset = 0;
@@ -219,7 +219,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext,
 
     *data_size = 0;
 
-    SchroParseContextInit(&parse_ctx, buf, buf_size);
+    parse_context_init(&parse_ctx, buf, buf_size);
     if (!buf_size) {
         if (!p_schro_params->eos_signalled) {
             state = schro_decoder_push_end_of_stream(decoder);
@@ -229,7 +229,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext,
 
     /* Loop through all the individual parse units in the input buffer */
     do {
-        if ((enc_buf = FindNextSchroParseUnit(&parse_ctx))) {
+        if ((enc_buf = find_next_parse_unit(&parse_ctx))) {
             /* Push buffer into decoder. */
             if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) &&
                 SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0)
diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c
index d9b8b06..63d354e 100644
--- a/libavcodec/libschroedingerenc.c
+++ b/libavcodec/libschroedingerenc.c
@@ -79,7 +79,7 @@ typedef struct SchroEncoderParams {
 /**
 * Works out Schro-compatible chroma format.
 */
-static int SetSchroChromaFormat(AVCodecContext *avccontext)
+static int set_chroma_format(AVCodecContext *avccontext)
 {
     int num_formats = sizeof(schro_pixel_format_map) /
                       sizeof(schro_pixel_format_map[0]);
@@ -128,7 +128,7 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext)
     p_schro_params->format->width  = avccontext->width;
     p_schro_params->format->height = avccontext->height;
 
-    if (SetSchroChromaFormat(avccontext) == -1)
+    if (set_chroma_format(avccontext) == -1)
         return -1;
 
     if (avccontext->color_primaries == AVCOL_PRI_BT709) {
@@ -258,7 +258,7 @@ static SchroFrame *libschroedinger_frame_from_data(AVCodecContext *avccontext,
     return in_frame;
 }
 
-static void SchroedingerFreeFrame(void *data)
+static void libschroedinger_free_frame(void *data)
 {
     FFSchroEncodedFrame *enc_frame = data;
 
@@ -411,7 +411,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avccontext, AVPacket *pk
 
 error:
     /* free frame */
-    SchroedingerFreeFrame(p_frame_output);
+    libschroedinger_free_frame(p_frame_output);
     return ret;
 }
 
@@ -425,7 +425,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext)
 
     /* Free data in the output frame queue. */
     ff_schro_queue_free(&p_schro_params->enc_frame_queue,
-                        SchroedingerFreeFrame);
+                        libschroedinger_free_frame);
 
 
     /* Free the encoder buffer. */



More information about the ffmpeg-cvslog mailing list