diff options
Diffstat (limited to 'libavcodec/libschroedingerenc.c')
-rw-r--r-- | libavcodec/libschroedingerenc.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/libavcodec/libschroedingerenc.c b/libavcodec/libschroedingerenc.c index 71c4fd8955..0cea5a7194 100644 --- a/libavcodec/libschroedingerenc.c +++ b/libavcodec/libschroedingerenc.c @@ -36,7 +36,6 @@ #include "avcodec.h" #include "internal.h" -#include "libdirac_libschro.h" #include "libschroedinger.h" #include "bytestream.h" @@ -65,7 +64,7 @@ typedef struct SchroEncoderParams { int enc_buf_size; /** queue storing encoded frames */ - DiracSchroQueue enc_frame_queue; + FFSchroQueue enc_frame_queue; /** end of sequence signalled */ int eos_signalled; @@ -80,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]); @@ -129,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) { @@ -236,7 +235,7 @@ static int libschroedinger_encode_init(AVCodecContext *avccontext) schro_encoder_start(p_schro_params->encoder); /* Initialize the encoded frame queue. */ - ff_dirac_schro_queue_init(&p_schro_params->enc_frame_queue); + ff_schro_queue_init(&p_schro_params->enc_frame_queue); return 0; } @@ -259,9 +258,9 @@ static SchroFrame *libschroedinger_frame_from_data(AVCodecContext *avccontext, return in_frame; } -static void SchroedingerFreeFrame(void *data) +static void libschroedinger_free_frame(void *data) { - DiracSchroEncodedFrame *enc_frame = data; + FFSchroEncodedFrame *enc_frame = data; av_freep(&enc_frame->p_encbuf); av_free(enc_frame); @@ -273,7 +272,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avccontext, AVPacket *pk int enc_size = 0; SchroEncoderParams *p_schro_params = avccontext->priv_data; SchroEncoder *encoder = p_schro_params->encoder; - struct DiracSchroEncodedFrame *p_frame_output = NULL; + struct FFSchroEncodedFrame *p_frame_output = NULL; int go = 1; SchroBuffer *enc_buf; int presentation_frame; @@ -333,7 +332,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avccontext, AVPacket *pk } /* Create output frame. */ - p_frame_output = av_mallocz(sizeof(DiracSchroEncodedFrame)); + p_frame_output = av_mallocz(sizeof(FFSchroEncodedFrame)); /* Set output data. */ p_frame_output->size = p_schro_params->enc_buf_size; p_frame_output->p_encbuf = p_schro_params->enc_buf; @@ -345,8 +344,8 @@ static int libschroedinger_encode_frame(AVCodecContext *avccontext, AVPacket *pk * through 17 represesent the frame number. */ p_frame_output->frame_num = AV_RB32(enc_buf->data + 13); - ff_dirac_schro_queue_push_back(&p_schro_params->enc_frame_queue, - p_frame_output); + ff_schro_queue_push_back(&p_schro_params->enc_frame_queue, + p_frame_output); p_schro_params->enc_buf_size = 0; p_schro_params->enc_buf = NULL; @@ -373,7 +372,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avccontext, AVPacket *pk p_schro_params->eos_pulled) last_frame_in_sequence = 1; - p_frame_output = ff_dirac_schro_queue_pop(&p_schro_params->enc_frame_queue); + p_frame_output = ff_schro_queue_pop(&p_schro_params->enc_frame_queue); if (!p_frame_output) return 0; @@ -410,7 +409,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; } @@ -423,8 +422,8 @@ static int libschroedinger_encode_close(AVCodecContext *avccontext) schro_encoder_free(p_schro_params->encoder); /* Free data in the output frame queue. */ - ff_dirac_schro_queue_free(&p_schro_params->enc_frame_queue, - SchroedingerFreeFrame); + ff_schro_queue_free(&p_schro_params->enc_frame_queue, + libschroedinger_free_frame); /* Free the encoder buffer. */ |