| OLD | NEW |
| 1 /* | 1 /* |
| 2 * The simplest mpeg encoder (well, it was the simplest!) | 2 * The simplest mpeg encoder (well, it was the simplest!) |
| 3 * Copyright (c) 2000,2001 Fabrice Bellard | 3 * Copyright (c) 2000,2001 Fabrice Bellard |
| 4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> | 4 * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at> |
| 5 * | 5 * |
| 6 * 4MV & hq & B-frame encoding stuff by Michael Niedermayer <michaelni@gmx.at> | 6 * 4MV & hq & B-frame encoding stuff by Michael Niedermayer <michaelni@gmx.at> |
| 7 * | 7 * |
| 8 * This file is part of FFmpeg. | 8 * This file is part of FFmpeg. |
| 9 * | 9 * |
| 10 * FFmpeg is free software; you can redistribute it and/or | 10 * FFmpeg is free software; you can redistribute it and/or |
| (...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 345 | 345 |
| 346 if(avctx->rc_max_rate && avctx->rc_max_rate < avctx->bit_rate){ | 346 if(avctx->rc_max_rate && avctx->rc_max_rate < avctx->bit_rate){ |
| 347 av_log(avctx, AV_LOG_INFO, "bitrate above max bitrate\n"); | 347 av_log(avctx, AV_LOG_INFO, "bitrate above max bitrate\n"); |
| 348 return -1; | 348 return -1; |
| 349 } | 349 } |
| 350 | 350 |
| 351 if(avctx->rc_max_rate && avctx->rc_max_rate == avctx->bit_rate && avctx->rc_
max_rate != avctx->rc_min_rate){ | 351 if(avctx->rc_max_rate && avctx->rc_max_rate == avctx->bit_rate && avctx->rc_
max_rate != avctx->rc_min_rate){ |
| 352 av_log(avctx, AV_LOG_INFO, "impossible bitrate constraints, this will fa
il\n"); | 352 av_log(avctx, AV_LOG_INFO, "impossible bitrate constraints, this will fa
il\n"); |
| 353 } | 353 } |
| 354 | 354 |
| 355 if(avctx->rc_buffer_size && avctx->bit_rate*av_q2d(avctx->time_base) > avctx
->rc_buffer_size){ | 355 if(avctx->rc_buffer_size && avctx->bit_rate*(int64_t)avctx->time_base.num >
avctx->rc_buffer_size * (int64_t)avctx->time_base.den){ |
| 356 av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n"); | 356 av_log(avctx, AV_LOG_ERROR, "VBV buffer too small for bitrate\n"); |
| 357 return -1; | 357 return -1; |
| 358 } | 358 } |
| 359 | 359 |
| 360 if(avctx->bit_rate*av_q2d(avctx->time_base) > avctx->bit_rate_tolerance){ | 360 if(avctx->bit_rate*av_q2d(avctx->time_base) > avctx->bit_rate_tolerance){ |
| 361 av_log(avctx, AV_LOG_ERROR, "bitrate tolerance too small for bitrate\n")
; | 361 av_log(avctx, AV_LOG_ERROR, "bitrate tolerance too small for bitrate\n")
; |
| 362 return -1; | 362 return -1; |
| 363 } | 363 } |
| 364 | 364 |
| 365 if( s->avctx->rc_max_rate && s->avctx->rc_min_rate == s->avctx->rc_max_rat
e | 365 if( s->avctx->rc_max_rate && s->avctx->rc_min_rate == s->avctx->rc_max_rat
e |
| (...skipping 3469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3835 "wmv1", | 3835 "wmv1", |
| 3836 AVMEDIA_TYPE_VIDEO, | 3836 AVMEDIA_TYPE_VIDEO, |
| 3837 CODEC_ID_WMV1, | 3837 CODEC_ID_WMV1, |
| 3838 sizeof(MpegEncContext), | 3838 sizeof(MpegEncContext), |
| 3839 MPV_encode_init, | 3839 MPV_encode_init, |
| 3840 MPV_encode_picture, | 3840 MPV_encode_picture, |
| 3841 MPV_encode_end, | 3841 MPV_encode_end, |
| 3842 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | 3842 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, |
| 3843 .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"), | 3843 .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"), |
| 3844 }; | 3844 }; |
| OLD | NEW |