comparison libxvidff.c @ 11321:e0feb5fa4e97 libavcodec

Make the following functions static (and remove ff_), they are only used inside libxvidff.c: ff_xvid_encode_init(), ff_xvid_encode_frame(), ff_xvid_encode_close()
author cehoyos
date Sun, 28 Feb 2010 18:57:18 +0000
parents 38cfe222e1a4
children 67786aecf351
comparison
equal deleted inserted replaced
11320:01d5e38a0d35 11321:e0feb5fa4e97
80 * and the encoder context created. 80 * and the encoder context created.
81 * 81 *
82 * @param avctx AVCodecContext pointer to context 82 * @param avctx AVCodecContext pointer to context
83 * @return Returns 0 on success, -1 on failure 83 * @return Returns 0 on success, -1 on failure
84 */ 84 */
85 av_cold int ff_xvid_encode_init(AVCodecContext *avctx) { 85 static av_cold int xvid_encode_init(AVCodecContext *avctx) {
86 int xerr, i; 86 int xerr, i;
87 int xvid_flags = avctx->flags; 87 int xvid_flags = avctx->flags;
88 struct xvid_context *x = avctx->priv_data; 88 struct xvid_context *x = avctx->priv_data;
89 uint16_t *intra, *inter; 89 uint16_t *intra, *inter;
90 int fd; 90 int fd;
365 * @param frame Pointer to encoded frame buffer 365 * @param frame Pointer to encoded frame buffer
366 * @param buf_size Size of encoded frame buffer 366 * @param buf_size Size of encoded frame buffer
367 * @param data Pointer to AVFrame of unencoded frame 367 * @param data Pointer to AVFrame of unencoded frame
368 * @return Returns 0 on success, -1 on failure 368 * @return Returns 0 on success, -1 on failure
369 */ 369 */
370 int ff_xvid_encode_frame(AVCodecContext *avctx, 370 static int xvid_encode_frame(AVCodecContext *avctx,
371 unsigned char *frame, int buf_size, void *data) { 371 unsigned char *frame, int buf_size, void *data) {
372 int xerr, i; 372 int xerr, i;
373 char *tmp; 373 char *tmp;
374 struct xvid_context *x = avctx->priv_data; 374 struct xvid_context *x = avctx->priv_data;
375 AVFrame *picture = data; 375 AVFrame *picture = data;
473 * All buffers are freed, and the Xvid encoder context is destroyed. 473 * All buffers are freed, and the Xvid encoder context is destroyed.
474 * 474 *
475 * @param avctx AVCodecContext pointer to context 475 * @param avctx AVCodecContext pointer to context
476 * @return Returns 0, success guaranteed 476 * @return Returns 0, success guaranteed
477 */ 477 */
478 av_cold int ff_xvid_encode_close(AVCodecContext *avctx) { 478 static av_cold int xvid_encode_close(AVCodecContext *avctx) {
479 struct xvid_context *x = avctx->priv_data; 479 struct xvid_context *x = avctx->priv_data;
480 480
481 xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL); 481 xvid_encore(x->encoder_handle, XVID_ENC_DESTROY, NULL, NULL);
482 482
483 if( avctx->extradata != NULL ) 483 if( avctx->extradata != NULL )
770 AVCodec libxvid_encoder = { 770 AVCodec libxvid_encoder = {
771 "libxvid", 771 "libxvid",
772 CODEC_TYPE_VIDEO, 772 CODEC_TYPE_VIDEO,
773 CODEC_ID_XVID, 773 CODEC_ID_XVID,
774 sizeof(struct xvid_context), 774 sizeof(struct xvid_context),
775 ff_xvid_encode_init, 775 xvid_encode_init,
776 ff_xvid_encode_frame, 776 xvid_encode_frame,
777 ff_xvid_encode_close, 777 xvid_encode_close,
778 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, 778 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
779 .long_name= NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), 779 .long_name= NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"),
780 }; 780 };