diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-10-30 16:19:50 +0400 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-10-31 00:40:52 +0400 |
commit | 45235d69c271966409cdd3eaa022258c22e04fdb (patch) | |
tree | 34928e6d94ea7a2ff4c382c616297976cf336397 /libavcodec/libschroedingerdec.c | |
parent | d94c577d3c61e428cfcbcd3dc3a80bd848077eae (diff) |
libdirac/libschroedinger: Drop unnecessary symbol prefixes.
The names used in the libdirac/libschroedinger wrappers are long enough as-is.
Bloating them with unnecessary prefixes makes them even more unwieldy.
Diffstat (limited to 'libavcodec/libschroedingerdec.c')
-rw-r--r-- | libavcodec/libschroedingerdec.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libavcodec/libschroedingerdec.c b/libavcodec/libschroedingerdec.c index a9c1ca40f5..184e8cb42b 100644 --- a/libavcodec/libschroedingerdec.c +++ b/libavcodec/libschroedingerdec.c @@ -41,7 +41,7 @@ #include <schroedinger/schrovideoformat.h> /** libschroedinger decoder private data */ -typedef struct FfmpegSchroDecoderParams { +typedef struct SchroDecoderParams { /** Schroedinger video format */ SchroVideoFormat *format; @@ -52,7 +52,7 @@ typedef struct FfmpegSchroDecoderParams { SchroDecoder* decoder; /** queue storing decoded frames */ - FfmpegDiracSchroQueue dec_frame_queue; + DiracSchroQueue dec_frame_queue; /** end of sequence signalled */ int eos_signalled; @@ -62,25 +62,25 @@ typedef struct FfmpegSchroDecoderParams { /** decoded picture */ AVPicture dec_pic; -} FfmpegSchroDecoderParams; +} SchroDecoderParams; -typedef struct FfmpegSchroParseUnitContext { +typedef struct SchroParseUnitContext { const uint8_t *buf; int buf_size; -} FfmpegSchroParseUnitContext; +} SchroParseUnitContext; static void libschroedinger_decode_buffer_free(SchroBuffer *schro_buf, void *priv); -static void FfmpegSchroParseContextInit(FfmpegSchroParseUnitContext *parse_ctx, - const uint8_t *buf, int buf_size) +static void SchroParseContextInit(SchroParseUnitContext *parse_ctx, + const uint8_t *buf, int buf_size) { parse_ctx->buf = buf; parse_ctx->buf_size = buf_size; } -static SchroBuffer* FfmpegFindNextSchroParseUnit(FfmpegSchroParseUnitContext *parse_ctx) +static SchroBuffer *FindNextSchroParseUnit(SchroParseUnitContext *parse_ctx) { SchroBuffer *enc_buf = NULL; int next_pu_offset = 0; @@ -120,22 +120,22 @@ static SchroBuffer* FfmpegFindNextSchroParseUnit(FfmpegSchroParseUnitContext *pa /** * Returns Libav chroma format. */ -static enum PixelFormat GetFfmpegChromaFormat(SchroChromaFormat schro_pix_fmt) +static enum PixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt) { - int num_formats = sizeof(ffmpeg_schro_pixel_format_map) / - sizeof(ffmpeg_schro_pixel_format_map[0]); + int num_formats = sizeof(schro_pixel_format_map) / + sizeof(schro_pixel_format_map[0]); int idx; for (idx = 0; idx < num_formats; ++idx) - if (ffmpeg_schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) - return ffmpeg_schro_pixel_format_map[idx].ff_pix_fmt; + if (schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) + return schro_pixel_format_map[idx].ff_pix_fmt; return PIX_FMT_NONE; } static av_cold int libschroedinger_decode_init(AVCodecContext *avccontext) { - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; /* First of all, initialize our supporting libraries. */ schro_init(); @@ -164,7 +164,7 @@ static void libschroedinger_decode_frame_free(void *frame) static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) { - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; SchroDecoder *decoder = p_schro_params->decoder; p_schro_params->format = schro_decoder_get_video_format(decoder); @@ -179,7 +179,7 @@ static void libschroedinger_handle_first_access_unit(AVCodecContext *avccontext) } avccontext->height = p_schro_params->format->height; avccontext->width = p_schro_params->format->width; - avccontext->pix_fmt = GetFfmpegChromaFormat(p_schro_params->format->chroma_format); + avccontext->pix_fmt = get_chroma_format(p_schro_params->format->chroma_format); if (ff_get_schro_frame_format(p_schro_params->format->chroma_format, &p_schro_params->frame_format) == -1) { @@ -206,7 +206,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; SchroDecoder *decoder = p_schro_params->decoder; AVPicture *picture = data; SchroBuffer *enc_buf; @@ -214,11 +214,11 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, int state; int go = 1; int outer = 1; - FfmpegSchroParseUnitContext parse_ctx; + SchroParseUnitContext parse_ctx; *data_size = 0; - FfmpegSchroParseContextInit(&parse_ctx, buf, buf_size); + SchroParseContextInit(&parse_ctx, buf, buf_size); if (!buf_size) { if (!p_schro_params->eos_signalled) { state = schro_decoder_push_end_of_stream(decoder); @@ -228,7 +228,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, /* Loop through all the individual parse units in the input buffer */ do { - if ((enc_buf = FfmpegFindNextSchroParseUnit(&parse_ctx))) { + if ((enc_buf = FindNextSchroParseUnit(&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) @@ -314,7 +314,7 @@ static int libschroedinger_decode_frame(AVCodecContext *avccontext, static av_cold int libschroedinger_decode_close(AVCodecContext *avccontext) { - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; /* Free the decoder. */ schro_decoder_free(p_schro_params->decoder); av_freep(&p_schro_params->format); @@ -332,7 +332,7 @@ static void libschroedinger_flush(AVCodecContext *avccontext) { /* Got a seek request. Free the decoded frames queue and then reset * the decoder */ - FfmpegSchroDecoderParams *p_schro_params = avccontext->priv_data; + SchroDecoderParams *p_schro_params = avccontext->priv_data; /* Free data in the output frame queue. */ ff_dirac_schro_queue_free(&p_schro_params->dec_frame_queue, @@ -348,7 +348,7 @@ AVCodec ff_libschroedinger_decoder = { .name = "libschroedinger", .type = AVMEDIA_TYPE_VIDEO, .id = CODEC_ID_DIRAC, - .priv_data_size = sizeof(FfmpegSchroDecoderParams), + .priv_data_size = sizeof(SchroDecoderParams), .init = libschroedinger_decode_init, .close = libschroedinger_decode_close, .decode = libschroedinger_decode_frame, |