History

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

Diego Biurrun committed 14 years ago

Commit fdc91861 parent 9cef0663 files · +12 −12Browse files

Unified · Split

3 files
  1. libavcodec/libschroedinger.c +2 −2
  2. libavcodec/libschroedingerdec.c +5 −5
  3. libavcodec/libschroedingerenc.c +5 −5
libavcodec/libschroedinger.c+2−2
@@ -163,7 +163,7 @@ int ff_get_schro_frame_format (SchroChromaFormat schro_pix_fmt, · 162 unmodified lines
163 return -1;163 return -1;
164}164}
165 165
166static void FreeSchroFrame(SchroFrame *frame, void *priv)166static void free_schro_frame(SchroFrame *frame, void *priv)
167{167{
168 AVPicture *p_pic = priv;168 AVPicture *p_pic = priv;
169 169
@@ -195,7 +195,7 @@ SchroFrame *ff_create_schro_frame(AVCodecContext *avccontext, · 25 unmodified lines
195 p_frame->format = schro_frame_fmt;195 p_frame->format = schro_frame_fmt;
196 p_frame->width = y_width;196 p_frame->width = y_width;
197 p_frame->height = y_height;197 p_frame->height = y_height;
198 schro_frame_set_free_callback(p_frame, FreeSchroFrame, (void *)p_pic);198 schro_frame_set_free_callback(p_frame, free_schro_frame, (void *)p_pic);
199 199
200 for (i = 0; i < 3; ++i) {200 for (i = 0; i < 3; ++i) {
201 p_frame->components[i].width = i ? uv_width : y_width;201 p_frame->components[i].width = i ? uv_width : y_width;
libavcodec/libschroedingerdec.c+5−5
@@ -75,14 +75,14 @@ static void libschroedinger_decode_buffer_free(SchroBuffer *schro_buf, · 74 unmodified lines
75 av_freep(&priv);75 av_freep(&priv);
76}76}
77 77
78static void SchroParseContextInit(SchroParseUnitContext *parse_ctx,78static void parse_context_init(SchroParseUnitContext *parse_ctx,
79 const uint8_t *buf, int buf_size)79 const uint8_t *buf, int buf_size)
80{80{
81 parse_ctx->buf = buf;81 parse_ctx->buf = buf;
82 parse_ctx->buf_size = buf_size;82 parse_ctx->buf_size = buf_size;
83}83}
84 84
85static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx)85static SchroBuffer *find_next_parse_unit(SchroParseUnitContext *parse_ctx)
86{86{
87 SchroBuffer *enc_buf = NULL;87 SchroBuffer *enc_buf = NULL;
88 int next_pu_offset = 0;88 int next_pu_offset = 0;
@@ -219,7 +219,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, · 130 unmodified lines
219 219
220 *data_size = 0;220 *data_size = 0;
221 221
222 SchroParseContextInit(&parse_ctx, buf, buf_size);222 parse_context_init(&parse_ctx, buf, buf_size);
223 if (!buf_size) {223 if (!buf_size) {
224 if (!p_schro_params->eos_signalled) {224 if (!p_schro_params->eos_signalled) {
225 state = schro_decoder_push_end_of_stream(decoder);225 state = schro_decoder_push_end_of_stream(decoder);
@@ -229,7 +229,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, · 3 unmodified lines
229 229
230 /* Loop through all the individual parse units in the input buffer */230 /* Loop through all the individual parse units in the input buffer */
231 do {231 do {
232 if ((enc_buf = FindNextSchroParseUnit(&parse_ctx))) {232 if ((enc_buf = find_next_parse_unit(&parse_ctx))) {
233 /* Push buffer into decoder. */233 /* Push buffer into decoder. */
234 if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) &&234 if (SCHRO_PARSE_CODE_IS_PICTURE(enc_buf->data[4]) &&
235 SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0)235 SCHRO_PARSE_CODE_NUM_REFS(enc_buf->data[4]) > 0)
libavcodec/libschroedingerenc.c+5−5
@@ -79,7 +79,7 @@ typedef struct SchroEncoderParams { · 78 unmodified lines
79/**79/**
80* Works out Schro-compatible chroma format.80* Works out Schro-compatible chroma format.
81*/81*/
82static int SetSchroChromaFormat(AVCodecContext *avccontext)82static int set_chroma_format(AVCodecContext *avccontext)
83{83{
84 int num_formats = sizeof(schro_pixel_format_map) /84 int num_formats = sizeof(schro_pixel_format_map) /
85 sizeof(schro_pixel_format_map[0]);85 sizeof(schro_pixel_format_map[0]);
@@ -128,7 +128,7 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext) · 42 unmodified lines
128 p_schro_params->format->width = avccontext->width;128 p_schro_params->format->width = avccontext->width;
129 p_schro_params->format->height = avccontext->height;129 p_schro_params->format->height = avccontext->height;
130 130
131 if (SetSchroChromaFormat(avccontext) == -1)131 if (set_chroma_format(avccontext) == -1)
132 return -1;132 return -1;
133 133
134 if (avccontext->color_primaries == AVCOL_PRI_BT709) {134 if (avccontext->color_primaries == AVCOL_PRI_BT709) {
@@ -258,7 +258,7 @@ static SchroFrame *libschroedinger_frame_from_data(AVCodecContext *avccontext, · 123 unmodified lines
258 return in_frame;258 return in_frame;
259}259}
260 260
261static void SchroedingerFreeFrame(void *data)261static void libschroedinger_free_frame(void *data)
262{262{
263 FFSchroEncodedFrame *enc_frame = data;263 FFSchroEncodedFrame *enc_frame = data;
264 264
@@ -411,7 +411,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avccontext, AVPacket *pk · 146 unmodified lines
411 411
412error:412error:
413 /* free frame */413 /* free frame */
414 SchroedingerFreeFrame(p_frame_output);414 libschroedinger_free_frame(p_frame_output);
415 return ret;415 return ret;
416}416}
417 417
@@ -425,7 +425,7 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext) · 7 unmodified lines
425 425
426 /* Free data in the output frame queue. */426 /* Free data in the output frame queue. */
427 ff_schro_queue_free(&p_schro_params->enc_frame_queue,427 ff_schro_queue_free(&p_schro_params->enc_frame_queue,
428 SchroedingerFreeFrame);428 libschroedinger_free_frame);
429 429
430 430
431 /* Free the encoder buffer. */431 /* Free the encoder buffer. */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t