| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Interface to xvidcore for mpeg4 encoding | 2  * Interface to xvidcore for mpeg4 encoding | 
| 3  * Copyright (c) 2004 Adam Thayer <krevnik@comcast.net> | 3  * Copyright (c) 2004 Adam Thayer <krevnik@comcast.net> | 
| 4  * | 4  * | 
| 5  * This file is part of FFmpeg. | 5  * This file is part of FFmpeg. | 
| 6  * | 6  * | 
| 7  * FFmpeg is free software; you can redistribute it and/or | 7  * FFmpeg is free software; you can redistribute it and/or | 
| 8  * modify it under the terms of the GNU Lesser General Public | 8  * modify it under the terms of the GNU Lesser General Public | 
| 9  * License as published by the Free Software Foundation; either | 9  * License as published by the Free Software Foundation; either | 
| 10  * version 2.1 of the License, or (at your option) any later version. | 10  * version 2.1 of the License, or (at your option) any later version. | 
| (...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 442 | 442 | 
| 443     for( i = 0; i < 4; i++ ) { | 443     for( i = 0; i < 4; i++ ) { | 
| 444         xvid_enc_frame.input.plane[i] = picture->data[i]; | 444         xvid_enc_frame.input.plane[i] = picture->data[i]; | 
| 445         xvid_enc_frame.input.stride[i] = picture->linesize[i]; | 445         xvid_enc_frame.input.stride[i] = picture->linesize[i]; | 
| 446     } | 446     } | 
| 447 | 447 | 
| 448     /* Encoder Flags */ | 448     /* Encoder Flags */ | 
| 449     xvid_enc_frame.vop_flags = x->vop_flags; | 449     xvid_enc_frame.vop_flags = x->vop_flags; | 
| 450     xvid_enc_frame.vol_flags = x->vol_flags; | 450     xvid_enc_frame.vol_flags = x->vol_flags; | 
| 451     xvid_enc_frame.motion = x->me_flags; | 451     xvid_enc_frame.motion = x->me_flags; | 
| 452     xvid_enc_frame.type = XVID_TYPE_AUTO; | 452     xvid_enc_frame.type = | 
|  | 453         picture->pict_type == FF_I_TYPE ? XVID_TYPE_IVOP : | 
|  | 454         picture->pict_type == FF_P_TYPE ? XVID_TYPE_PVOP : | 
|  | 455         picture->pict_type == FF_B_TYPE ? XVID_TYPE_BVOP : | 
|  | 456                                           XVID_TYPE_AUTO; | 
| 453 | 457 | 
| 454     /* Pixel aspect ratio setting */ | 458     /* Pixel aspect ratio setting */ | 
| 455     if (avctx->sample_aspect_ratio.num < 1 || avctx->sample_aspect_ratio.num > 2
     55 || | 459     if (avctx->sample_aspect_ratio.num < 1 || avctx->sample_aspect_ratio.num > 2
     55 || | 
| 456         avctx->sample_aspect_ratio.den < 1 || avctx->sample_aspect_ratio.den > 2
     55) { | 460         avctx->sample_aspect_ratio.den < 1 || avctx->sample_aspect_ratio.den > 2
     55) { | 
| 457         av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i\n", | 461         av_log(avctx, AV_LOG_ERROR, "Invalid pixel aspect ratio %i/%i\n", | 
| 458                avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den); | 462                avctx->sample_aspect_ratio.num, avctx->sample_aspect_ratio.den); | 
| 459         return -1; | 463         return -1; | 
| 460     } | 464     } | 
| 461     xvid_enc_frame.par = XVID_PAR_EXT; | 465     xvid_enc_frame.par = XVID_PAR_EXT; | 
| 462     xvid_enc_frame.par_width  = avctx->sample_aspect_ratio.num; | 466     xvid_enc_frame.par_width  = avctx->sample_aspect_ratio.num; | 
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 816     CODEC_ID_MPEG4, | 820     CODEC_ID_MPEG4, | 
| 817     sizeof(struct xvid_context), | 821     sizeof(struct xvid_context), | 
| 818     xvid_encode_init, | 822     xvid_encode_init, | 
| 819     xvid_encode_frame, | 823     xvid_encode_frame, | 
| 820     xvid_encode_close, | 824     xvid_encode_close, | 
| 821     .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | 825     .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | 
| 822     .long_name= NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), | 826     .long_name= NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), | 
| 823 }; | 827 }; | 
| 824 | 828 | 
| 825 #endif /* CONFIG_LIBXVID_ENCODER */ | 829 #endif /* CONFIG_LIBXVID_ENCODER */ | 
| OLD | NEW | 
|---|