Unified · Split
| @@ -15,6 +15,10 @@ libavutil: 2015-08-28 · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | API changes, most recent first: | 16 | API changes, most recent first: |
| 17 | 17 | ||
| 18 | 2015-09-15 - lavc 57.2.100 - avcodec.h | ||
| 19 | bit_rate/rc_max_rate/rc_min_rate were changed to 64bit, make sure you update | ||
| 20 | any printf() or other type sensitive code | ||
| 21 | |||
| 18 | 2015-xx-xx - lavu 55.0.100 / lavu 55.0.0 | 22 | 2015-xx-xx - lavu 55.0.100 / lavu 55.0.0 |
| 19 | xxxxxxx - Change type of AVPixFmtDescriptor.flags from uint8_t to uint64_t. | 23 | xxxxxxx - Change type of AVPixFmtDescriptor.flags from uint8_t to uint64_t. |
| 20 | xxxxxxx - Change type of AVComponentDescriptor fields from uint16_t to int | 24 | xxxxxxx - Change type of AVComponentDescriptor fields from uint16_t to int |
| @@ -1787,9 +1787,9 @@ static inline void print_stream_params(AVIOContext *pb, FFServerStream *stream) · 1786 unmodified lines | |||
| 1787 | abort(); | 1787 | abort(); |
| 1788 | } | 1788 | } |
| 1789 | 1789 | ||
| 1790 | avio_printf(pb, "<tr><td align=right>%d<td>%s<td align=right>%d" | 1790 | avio_printf(pb, "<tr><td align=right>%d<td>%s<td align=right>%"PRId64 |
| 1791 | "<td>%s<td>%s\n", | 1791 | "<td>%s<td>%s\n", |
| 1792 | i, type, st->codec->bit_rate/1000, | 1792 | i, type, (int64_t)st->codec->bit_rate/1000, |
| 1793 | codec ? codec->name : "", parameters); | 1793 | codec ? codec->name : "", parameters); |
| 1794 | } | 1794 | } |
| 1795 | 1795 | ||
| @@ -1532,7 +1532,11 @@ typedef struct AVCodecContext { · 1531 unmodified lines | |||
| 1532 | * - decoding: Set by user, may be overwritten by libavcodec | 1532 | * - decoding: Set by user, may be overwritten by libavcodec |
| 1533 | * if this info is available in the stream | 1533 | * if this info is available in the stream |
| 1534 | */ | 1534 | */ |
| 1535 | #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | ||
| 1535 | int bit_rate; | 1536 | int bit_rate; |
| 1537 | #else | ||
| 1538 | int64_t bit_rate; | ||
| 1539 | #endif | ||
| 1536 | 1540 | ||
| 1537 | /** | 1541 | /** |
| 1538 | * number of bits the bitstream is allowed to diverge from the reference. | 1542 | * number of bits the bitstream is allowed to diverge from the reference. |
| @@ -2463,14 +2467,22 @@ typedef struct AVCodecContext { · 924 unmodified lines | |||
| 2463 | * - encoding: Set by user. | 2467 | * - encoding: Set by user. |
| 2464 | * - decoding: Set by user, may be overwritten by libavcodec. | 2468 | * - decoding: Set by user, may be overwritten by libavcodec. |
| 2465 | */ | 2469 | */ |
| 2470 | #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | ||
| 2466 | int rc_max_rate; | 2471 | int rc_max_rate; |
| 2472 | #else | ||
| 2473 | int64_t rc_max_rate; | ||
| 2474 | #endif | ||
| 2467 | 2475 | ||
| 2468 | /** | 2476 | /** |
| 2469 | * minimum bitrate | 2477 | * minimum bitrate |
| 2470 | * - encoding: Set by user. | 2478 | * - encoding: Set by user. |
| 2471 | * - decoding: unused | 2479 | * - decoding: unused |
| 2472 | */ | 2480 | */ |
| 2481 | #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | ||
| 2473 | int rc_min_rate; | 2482 | int rc_min_rate; |
| 2483 | #else | ||
| 2484 | int64_t rc_min_rate; | ||
| 2485 | #endif | ||
| 2474 | 2486 | ||
| 2475 | #if FF_API_MPV_OPT | 2487 | #if FF_API_MPV_OPT |
| 2476 | /** | 2488 | /** |
| @@ -1028,7 +1028,7 @@ static void dump_cook_context(COOKContext *q) · 1027 unmodified lines | |||
| 1028 | } | 1028 | } |
| 1029 | ff_dlog(q->avctx, "COOKContext\n"); | 1029 | ff_dlog(q->avctx, "COOKContext\n"); |
| 1030 | PRINT("nb_channels", q->avctx->channels); | 1030 | PRINT("nb_channels", q->avctx->channels); |
| 1031 | PRINT("bit_rate", q->avctx->bit_rate); | 1031 | PRINT("bit_rate", (int)q->avctx->bit_rate); |
| 1032 | PRINT("sample_rate", q->avctx->sample_rate); | 1032 | PRINT("sample_rate", q->avctx->sample_rate); |
| 1033 | PRINT("samples_per_channel", q->subpacket[0].samples_per_channel); | 1033 | PRINT("samples_per_channel", q->subpacket[0].samples_per_channel); |
| 1034 | PRINT("subbands", q->subpacket[0].subbands); | 1034 | PRINT("subbands", q->subpacket[0].subbands); |
| @@ -145,7 +145,7 @@ static int encode_init(AVCodecContext *avctx) · 144 unmodified lines | |||
| 145 | c->samplerate_index = i; | 145 | c->samplerate_index = i; |
| 146 | 146 | ||
| 147 | if (avctx->bit_rate < 32000 || avctx->bit_rate > 3840000) { | 147 | if (avctx->bit_rate < 32000 || avctx->bit_rate > 3840000) { |
| 148 | av_log(avctx, AV_LOG_ERROR, "Bit rate %i not supported.", avctx->bit_rate); | 148 | av_log(avctx, AV_LOG_ERROR, "Bit rate %"PRId64" not supported.", (int64_t)avctx->bit_rate); |
| 149 | return AVERROR(EINVAL); | 149 | return AVERROR(EINVAL); |
| 150 | } | 150 | } |
| 151 | for (i = 0; ff_dca_bit_rates[i] < avctx->bit_rate; i++) | 151 | for (i = 0; ff_dca_bit_rates[i] < avctx->bit_rate; i++) |
| @@ -215,8 +215,8 @@ static av_cold int aac_encode_init(AVCodecContext *avctx) · 214 unmodified lines | |||
| 215 | } | 215 | } |
| 216 | if ((err = aacEncoder_SetParam(s->handle, AACENC_BITRATE, | 216 | if ((err = aacEncoder_SetParam(s->handle, AACENC_BITRATE, |
| 217 | avctx->bit_rate)) != AACENC_OK) { | 217 | avctx->bit_rate)) != AACENC_OK) { |
| 218 | av_log(avctx, AV_LOG_ERROR, "Unable to set the bitrate %d: %s\n", | 218 | av_log(avctx, AV_LOG_ERROR, "Unable to set the bitrate %"PRId64": %s\n", |
| 219 | avctx->bit_rate, aac_get_error(err)); | 219 | (int64_t)avctx->bit_rate, aac_get_error(err)); |
| 220 | goto error; | 220 | goto error; |
| 221 | } | 221 | } |
| 222 | } | 222 | } |
| @@ -62,8 +62,8 @@ static av_cold int libgsm_encode_init(AVCodecContext *avctx) { · 61 unmodified lines | |||
| 62 | if (avctx->bit_rate != 13000 /* Official */ && | 62 | if (avctx->bit_rate != 13000 /* Official */ && |
| 63 | avctx->bit_rate != 13200 /* Very common */ && | 63 | avctx->bit_rate != 13200 /* Very common */ && |
| 64 | avctx->bit_rate != 0 /* Unknown; a.o. mov does not set bitrate when decoding */ ) { | 64 | avctx->bit_rate != 0 /* Unknown; a.o. mov does not set bitrate when decoding */ ) { |
| 65 | av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %dbps\n", | 65 | av_log(avctx, AV_LOG_ERROR, "Bitrate 13000bps required for GSM, got %"PRId64"bps\n", |
| 66 | avctx->bit_rate); | 66 | (int64_t)avctx->bit_rate); |
| 67 | if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) | 67 | if (avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL) |
| 68 | return -1; | 68 | return -1; |
| 69 | } | 69 | } |
| @@ -180,12 +180,12 @@ static av_cold int libopus_encode_init(AVCodecContext *avctx) · 179 unmodified lines | |||
| 180 | avctx->bit_rate = 64000 * opus->stream_count + | 180 | avctx->bit_rate = 64000 * opus->stream_count + |
| 181 | 32000 * coupled_stream_count; | 181 | 32000 * coupled_stream_count; |
| 182 | av_log(avctx, AV_LOG_WARNING, | 182 | av_log(avctx, AV_LOG_WARNING, |
| 183 | "No bit rate set. Defaulting to %d bps.\n", avctx->bit_rate); | 183 | "No bit rate set. Defaulting to %"PRId64" bps.\n", (int64_t)avctx->bit_rate); |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | if (avctx->bit_rate < 500 || avctx->bit_rate > 256000 * avctx->channels) { | 186 | if (avctx->bit_rate < 500 || avctx->bit_rate > 256000 * avctx->channels) { |
| 187 | av_log(avctx, AV_LOG_ERROR, "The bit rate %d bps is unsupported. " | 187 | av_log(avctx, AV_LOG_ERROR, "The bit rate %"PRId64" bps is unsupported. " |
| 188 | "Please choose a value between 500 and %d.\n", avctx->bit_rate, | 188 | "Please choose a value between 500 and %d.\n", (int64_t)avctx->bit_rate, |
| 189 | 256000 * avctx->channels); | 189 | 256000 * avctx->channels); |
| 190 | return AVERROR(EINVAL); | 190 | return AVERROR(EINVAL); |
| 191 | } | 191 | } |
| @@ -125,10 +125,10 @@ static av_cold void print_enc_params(AVCodecContext *avctx, · 124 unmodified lines | |||
| 125 | av_log(avctx, AV_LOG_DEBUG, " quality: %f\n", s->vbr_quality); | 125 | av_log(avctx, AV_LOG_DEBUG, " quality: %f\n", s->vbr_quality); |
| 126 | } else if (s->abr) { | 126 | } else if (s->abr) { |
| 127 | av_log(avctx, AV_LOG_DEBUG, "rate control: ABR\n"); | 127 | av_log(avctx, AV_LOG_DEBUG, "rate control: ABR\n"); |
| 128 | av_log(avctx, AV_LOG_DEBUG, " bitrate: %d bps\n", avctx->bit_rate); | 128 | av_log(avctx, AV_LOG_DEBUG, " bitrate: %"PRId64" bps\n", (int64_t)avctx->bit_rate); |
| 129 | } else { | 129 | } else { |
| 130 | av_log(avctx, AV_LOG_DEBUG, "rate control: CBR\n"); | 130 | av_log(avctx, AV_LOG_DEBUG, "rate control: CBR\n"); |
| 131 | av_log(avctx, AV_LOG_DEBUG, " bitrate: %d bps\n", avctx->bit_rate); | 131 | av_log(avctx, AV_LOG_DEBUG, " bitrate: %"PRId64" bps\n", (int64_t)avctx->bit_rate); |
| 132 | } | 132 | } |
| 133 | av_log(avctx, AV_LOG_DEBUG, "complexity: %d\n", | 133 | av_log(avctx, AV_LOG_DEBUG, "complexity: %d\n", |
| 134 | avctx->compression_level); | 134 | avctx->compression_level); |
| @@ -486,7 +486,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 485 unmodified lines | |||
| 486 | avctx->bit_rate * av_q2d(avctx->time_base) > | 486 | avctx->bit_rate * av_q2d(avctx->time_base) > |
| 487 | avctx->bit_rate_tolerance) { | 487 | avctx->bit_rate_tolerance) { |
| 488 | av_log(avctx, AV_LOG_WARNING, | 488 | av_log(avctx, AV_LOG_WARNING, |
| 489 | "bitrate tolerance %d too small for bitrate %d, overriding\n", avctx->bit_rate_tolerance, avctx->bit_rate); | 489 | "bitrate tolerance %d too small for bitrate %"PRId64", overriding\n", avctx->bit_rate_tolerance, (int64_t)avctx->bit_rate); |
| 490 | avctx->bit_rate_tolerance = 5 * avctx->bit_rate * av_q2d(avctx->time_base); | 490 | avctx->bit_rate_tolerance = 5 * avctx->bit_rate * av_q2d(avctx->time_base); |
| 491 | } | 491 | } |
| 492 | 492 | ||
| @@ -42,8 +42,13 @@ · 41 unmodified lines | |||
| 42 | #define AV_CODEC_DEFAULT_BITRATE 200*1000 | 42 | #define AV_CODEC_DEFAULT_BITRATE 200*1000 |
| 43 | 43 | ||
| 44 | static const AVOption avcodec_options[] = { | 44 | static const AVOption avcodec_options[] = { |
| 45 | #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | ||
| 45 | {"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E}, | 46 | {"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E}, |
| 46 | {"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, | 47 | {"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, |
| 48 | #else | ||
| 49 | {"b", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT64, {.i64 = AV_CODEC_DEFAULT_BITRATE }, 0, INT_MAX, A|V|E}, | ||
| 50 | {"ab", "set bitrate (in bits/s)", OFFSET(bit_rate), AV_OPT_TYPE_INT64, {.i64 = 128*1000 }, 0, INT_MAX, A|E}, | ||
| 51 | #endif | ||
| 47 | {"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far " | 52 | {"bt", "Set video bitrate tolerance (in bits/s). In 1-pass mode, bitrate tolerance specifies how far " |
| 48 | "ratecontrol is willing to deviate from the target average bitrate value. This is not related " | 53 | "ratecontrol is willing to deviate from the target average bitrate value. This is not related " |
| 49 | "to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality.", | 54 | "to minimum/maximum bitrate. Lowering tolerance too much has an adverse effect on quality.", |
| @@ -186,9 +191,15 @@ static const AVOption avcodec_options[] = { · 136 unmodified lines | |||
| 186 | #if FF_API_MPV_OPT | 191 | #if FF_API_MPV_OPT |
| 187 | {"rc_eq", "deprecated, use encoder private options instead", OFFSET(rc_eq), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, V|E}, | 192 | {"rc_eq", "deprecated, use encoder private options instead", OFFSET(rc_eq), AV_OPT_TYPE_STRING, {.str = NULL}, CHAR_MIN, CHAR_MAX, V|E}, |
| 188 | #endif | 193 | #endif |
| 194 | #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | ||
| 189 | {"maxrate", "maximum bitrate (in bits/s). Used for VBV together with bufsize.", OFFSET(rc_max_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|A|E}, | 195 | {"maxrate", "maximum bitrate (in bits/s). Used for VBV together with bufsize.", OFFSET(rc_max_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, 0, INT_MAX, V|A|E}, |
| 190 | {"minrate", "minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.", | 196 | {"minrate", "minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.", |
| 191 | OFFSET(rc_min_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, | 197 | OFFSET(rc_min_rate), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, |
| 198 | #else | ||
| 199 | {"maxrate", "maximum bitrate (in bits/s). Used for VBV together with bufsize.", OFFSET(rc_max_rate), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, 0, INT_MAX, V|A|E}, | ||
| 200 | {"minrate", "minimum bitrate (in bits/s). Most useful in setting up a CBR encode. It is of little use otherwise.", | ||
| 201 | OFFSET(rc_min_rate), AV_OPT_TYPE_INT64, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|A|E}, | ||
| 202 | #endif | ||
| 192 | {"bufsize", "set ratecontrol buffer size (in bits)", OFFSET(rc_buffer_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|V|E}, | 203 | {"bufsize", "set ratecontrol buffer size (in bits)", OFFSET(rc_buffer_size), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, A|V|E}, |
| 193 | #if FF_API_MPV_OPT | 204 | #if FF_API_MPV_OPT |
| 194 | {"rc_buf_aggressivity", "deprecated, use encoder private options instead", OFFSET(rc_buffer_aggressivity), AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, V|E}, | 205 | {"rc_buf_aggressivity", "deprecated, use encoder private options instead", OFFSET(rc_buffer_aggressivity), AV_OPT_TYPE_FLOAT, {.dbl = 1.0 }, -FLT_MAX, FLT_MAX, V|E}, |
| @@ -117,9 +117,9 @@ static int pcm_bluray_parse_header(AVCodecContext *avctx, · 116 unmodified lines | |||
| 117 | 117 | ||
| 118 | if (avctx->debug & FF_DEBUG_PICT_INFO) | 118 | if (avctx->debug & FF_DEBUG_PICT_INFO) |
| 119 | ff_dlog(avctx, | 119 | ff_dlog(avctx, |
| 120 | "pcm_bluray_parse_header: %d channels, %d bits per sample, %d Hz, %d bit/s\n", | 120 | "pcm_bluray_parse_header: %d channels, %d bits per sample, %d Hz, %"PRId64" bit/s\n", |
| 121 | avctx->channels, avctx->bits_per_coded_sample, | 121 | avctx->channels, avctx->bits_per_coded_sample, |
| 122 | avctx->sample_rate, avctx->bit_rate); | 122 | avctx->sample_rate, (int64_t)avctx->bit_rate); |
| 123 | return 0; | 123 | return 0; |
| 124 | } | 124 | } |
| 125 | 125 | ||
| @@ -140,9 +140,9 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header) · 139 unmodified lines | |||
| 140 | 140 | ||
| 141 | if (avctx->debug & FF_DEBUG_PICT_INFO) | 141 | if (avctx->debug & FF_DEBUG_PICT_INFO) |
| 142 | ff_dlog(avctx, | 142 | ff_dlog(avctx, |
| 143 | "pcm_dvd_parse_header: %d channels, %d bits per sample, %d Hz, %d bit/s\n", | 143 | "pcm_dvd_parse_header: %d channels, %d bits per sample, %d Hz, %"PRId64" bit/s\n", |
| 144 | avctx->channels, avctx->bits_per_coded_sample, | 144 | avctx->channels, avctx->bits_per_coded_sample, |
| 145 | avctx->sample_rate, avctx->bit_rate); | 145 | avctx->sample_rate, (int64_t)avctx->bit_rate); |
| 146 | 146 | ||
| 147 | s->last_header = header_int; | 147 | s->last_header = header_int; |
| 148 | 148 | ||
| @@ -493,8 +493,8 @@ static av_cold int sipr_decoder_init(AVCodecContext * avctx) · 492 unmodified lines | |||
| 493 | else if (avctx->bit_rate > 5750 ) ctx->mode = MODE_6k5; | 493 | else if (avctx->bit_rate > 5750 ) ctx->mode = MODE_6k5; |
| 494 | else ctx->mode = MODE_5k0; | 494 | else ctx->mode = MODE_5k0; |
| 495 | av_log(avctx, AV_LOG_WARNING, | 495 | av_log(avctx, AV_LOG_WARNING, |
| 496 | "Invalid block_align: %d. Mode %s guessed based on bitrate: %d\n", | 496 | "Invalid block_align: %d. Mode %s guessed based on bitrate: %"PRId64"\n", |
| 497 | avctx->block_align, modes[ctx->mode].mode_name, avctx->bit_rate); | 497 | avctx->block_align, modes[ctx->mode].mode_name, (int64_t)avctx->bit_rate); |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | av_log(avctx, AV_LOG_DEBUG, "Mode: %s\n", modes[ctx->mode].mode_name); | 500 | av_log(avctx, AV_LOG_DEBUG, "Mode: %s\n", modes[ctx->mode].mode_name); |
| @@ -1450,7 +1450,7 @@ FF_ENABLE_DEPRECATION_WARNINGS · 1449 unmodified lines | |||
| 1450 | } | 1450 | } |
| 1451 | if ( (avctx->codec_type == AVMEDIA_TYPE_VIDEO || avctx->codec_type == AVMEDIA_TYPE_AUDIO) | 1451 | if ( (avctx->codec_type == AVMEDIA_TYPE_VIDEO || avctx->codec_type == AVMEDIA_TYPE_AUDIO) |
| 1452 | && avctx->bit_rate>0 && avctx->bit_rate<1000) { | 1452 | && avctx->bit_rate>0 && avctx->bit_rate<1000) { |
| 1453 | av_log(avctx, AV_LOG_WARNING, "Bitrate %d is extremely low, maybe you mean %dk\n", avctx->bit_rate, avctx->bit_rate); | 1453 | av_log(avctx, AV_LOG_WARNING, "Bitrate %"PRId64" is extremely low, maybe you mean %"PRId64"k\n", (int64_t)avctx->bit_rate, (int64_t)avctx->bit_rate); |
| 1454 | } | 1454 | } |
| 1455 | 1455 | ||
| 1456 | if (!avctx->rc_initial_buffer_occupancy) | 1456 | if (!avctx->rc_initial_buffer_occupancy) |
| @@ -2828,7 +2828,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 1371 unmodified lines | |||
| 2828 | ", %d kb/s", bitrate / 1000); | 2828 | ", %d kb/s", bitrate / 1000); |
| 2829 | } else if (enc->rc_max_rate > 0) { | 2829 | } else if (enc->rc_max_rate > 0) { |
| 2830 | snprintf(buf + strlen(buf), buf_size - strlen(buf), | 2830 | snprintf(buf + strlen(buf), buf_size - strlen(buf), |
| 2831 | ", max. %d kb/s", enc->rc_max_rate / 1000); | 2831 | ", max. %"PRId64" kb/s", (int64_t)enc->rc_max_rate / 1000); |
| 2832 | } | 2832 | } |
| 2833 | } | 2833 | } |
| 2834 | 2834 | ||
| @@ -29,7 +29,7 @@ · 28 unmodified lines | |||
| 29 | #include "libavutil/version.h" | 29 | #include "libavutil/version.h" |
| 30 | 30 | ||
| 31 | #define LIBAVCODEC_VERSION_MAJOR 57 | 31 | #define LIBAVCODEC_VERSION_MAJOR 57 |
| 32 | #define LIBAVCODEC_VERSION_MINOR 1 | 32 | #define LIBAVCODEC_VERSION_MINOR 2 |
| 33 | #define LIBAVCODEC_VERSION_MICRO 100 | 33 | #define LIBAVCODEC_VERSION_MICRO 100 |
| 34 | 34 | ||
| 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ | 35 | #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ |
| @@ -185,8 +185,8 @@ av_cold int ff_wma_init(AVCodecContext *avctx, int flags2) · 184 unmodified lines | |||
| 185 | high_freq = high_freq * 0.5; | 185 | high_freq = high_freq * 0.5; |
| 186 | } | 186 | } |
| 187 | ff_dlog(s->avctx, "flags2=0x%x\n", flags2); | 187 | ff_dlog(s->avctx, "flags2=0x%x\n", flags2); |
| 188 | ff_dlog(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%d block_align=%d\n", | 188 | ff_dlog(s->avctx, "version=%d channels=%d sample_rate=%d bitrate=%"PRId64" block_align=%d\n", |
| 189 | s->version, avctx->channels, avctx->sample_rate, avctx->bit_rate, | 189 | s->version, avctx->channels, avctx->sample_rate, (int64_t)avctx->bit_rate, |
| 190 | avctx->block_align); | 190 | avctx->block_align); |
| 191 | ff_dlog(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n", | 191 | ff_dlog(s->avctx, "bps=%f bps1=%f high_freq=%f bitoffset=%d\n", |
| 192 | bps, bps1, high_freq, s->byte_offset_bits); | 192 | bps, bps1, high_freq, s->byte_offset_bits); |
| @@ -50,8 +50,8 @@ static av_cold int encode_init(AVCodecContext *avctx) · 49 unmodified lines | |||
| 50 | 50 | ||
| 51 | if (avctx->bit_rate < 24 * 1000) { | 51 | if (avctx->bit_rate < 24 * 1000) { |
| 52 | av_log(avctx, AV_LOG_ERROR, | 52 | av_log(avctx, AV_LOG_ERROR, |
| 53 | "bitrate too low: got %i, need 24000 or higher\n", | 53 | "bitrate too low: got %"PRId64", need 24000 or higher\n", |
| 54 | avctx->bit_rate); | 54 | (int64_t)avctx->bit_rate); |
| 55 | return AVERROR(EINVAL); | 55 | return AVERROR(EINVAL); |
| 56 | } | 56 | } |
| 57 | 57 | ||
| @@ -136,11 +136,11 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx) · 135 unmodified lines | |||
| 136 | fbdev->width * fbdev->height * fbdev->bytes_per_pixel * av_q2d(fbdev->framerate_q) * 8; | 136 | fbdev->width * fbdev->height * fbdev->bytes_per_pixel * av_q2d(fbdev->framerate_q) * 8; |
| 137 | 137 | ||
| 138 | av_log(avctx, AV_LOG_INFO, | 138 | av_log(avctx, AV_LOG_INFO, |
| 139 | "w:%d h:%d bpp:%d pixfmt:%s fps:%d/%d bit_rate:%d\n", | 139 | "w:%d h:%d bpp:%d pixfmt:%s fps:%d/%d bit_rate:%"PRId64"\n", |
| 140 | fbdev->width, fbdev->height, fbdev->varinfo.bits_per_pixel, | 140 | fbdev->width, fbdev->height, fbdev->varinfo.bits_per_pixel, |
| 141 | av_get_pix_fmt_name(pix_fmt), | 141 | av_get_pix_fmt_name(pix_fmt), |
| 142 | fbdev->framerate_q.num, fbdev->framerate_q.den, | 142 | fbdev->framerate_q.num, fbdev->framerate_q.den, |
| 143 | st->codec->bit_rate); | 143 | (int64_t)st->codec->bit_rate); |
| 144 | return 0; | 144 | return 0; |
| 145 | 145 | ||
| 146 | fail: | 146 | fail: |
| @@ -3296,8 +3296,8 @@ static int mov_write_isml_manifest(AVIOContext *pb, MOVMuxContext *mov) · 3295 unmodified lines | |||
| 3296 | } else { | 3296 | } else { |
| 3297 | continue; | 3297 | continue; |
| 3298 | } | 3298 | } |
| 3299 | avio_printf(pb, "<%s systemBitrate=\"%d\">\n", type, | 3299 | avio_printf(pb, "<%s systemBitrate=\"%"PRId64"\">\n", type, |
| 3300 | track->enc->bit_rate); | 3300 | (int64_t)track->enc->bit_rate); |
| 3301 | param_write_int(pb, "systemBitrate", track->enc->bit_rate); | 3301 | param_write_int(pb, "systemBitrate", track->enc->bit_rate); |
| 3302 | param_write_int(pb, "trackID", track_id); | 3302 | param_write_int(pb, "trackID", track_id); |
| 3303 | if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) { | 3303 | if (track->enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| @@ -448,7 +448,11 @@ real_parse_asm_rule(AVStream *st, const char *p, const char *end) · 447 unmodified lines | |||
| 448 | { | 448 | { |
| 449 | do { | 449 | do { |
| 450 | /* can be either averagebandwidth= or AverageBandwidth= */ | 450 | /* can be either averagebandwidth= or AverageBandwidth= */ |
| 451 | #if AV_HAVE_INCOMPATIBLE_LIBAV_ABI | ||
| 451 | if (sscanf(p, " %*1[Aa]verage%*1[Bb]andwidth=%d", &st->codec->bit_rate) == 1) | 452 | if (sscanf(p, " %*1[Aa]verage%*1[Bb]andwidth=%d", &st->codec->bit_rate) == 1) |
| 453 | #else | ||
| 454 | if (sscanf(p, " %*1[Aa]verage%*1[Bb]andwidth=%"SCNd64, &st->codec->bit_rate) == 1) | ||
| 455 | #endif | ||
| 452 | break; | 456 | break; |
| 453 | if (!(p = strchr(p, ',')) || p > end) | 457 | if (!(p = strchr(p, ',')) || p > end) |
| 454 | p = end; | 458 | p = end; |
| @@ -740,7 +740,7 @@ void ff_sdp_write_media(char *buff, int size, AVStream *st, int idx, · 739 unmodified lines | |||
| 740 | av_strlcatf(buff, size, "m=%s %d RTP/AVP %d\r\n", type, port, payload_type); | 740 | av_strlcatf(buff, size, "m=%s %d RTP/AVP %d\r\n", type, port, payload_type); |
| 741 | sdp_write_address(buff, size, dest_addr, dest_type, ttl); | 741 | sdp_write_address(buff, size, dest_addr, dest_type, ttl); |
| 742 | if (c->bit_rate) { | 742 | if (c->bit_rate) { |
| 743 | av_strlcatf(buff, size, "b=AS:%d\r\n", c->bit_rate / 1000); | 743 | av_strlcatf(buff, size, "b=AS:%"PRId64"\r\n", (int64_t)c->bit_rate / 1000); |
| 744 | } | 744 | } |
| 745 | 745 | ||
| 746 | sdp_write_media_attributes(buff, size, c, payload_type, fmt); | 746 | sdp_write_media_attributes(buff, size, c, payload_type, fmt); |
| @@ -260,7 +260,7 @@ static int write_manifest(AVFormatContext *s, int final) · 259 unmodified lines | |||
| 260 | if (s->streams[i]->codec->codec_type != AVMEDIA_TYPE_VIDEO) | 260 | if (s->streams[i]->codec->codec_type != AVMEDIA_TYPE_VIDEO) |
| 261 | continue; | 261 | continue; |
| 262 | last = i; | 262 | last = i; |
| 263 | avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%d\" FourCC=\"%s\" MaxWidth=\"%d\" MaxHeight=\"%d\" CodecPrivateData=\"%s\" />\n", index, s->streams[i]->codec->bit_rate, os->fourcc, s->streams[i]->codec->width, s->streams[i]->codec->height, os->private_str); | 263 | avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%"PRId64"\" FourCC=\"%s\" MaxWidth=\"%d\" MaxHeight=\"%d\" CodecPrivateData=\"%s\" />\n", index, (int64_t)s->streams[i]->codec->bit_rate, os->fourcc, s->streams[i]->codec->width, s->streams[i]->codec->height, os->private_str); |
| 264 | index++; | 264 | index++; |
| 265 | } | 265 | } |
| 266 | output_chunk_list(&c->streams[last], out, final, c->lookahead_count, c->window_size); | 266 | output_chunk_list(&c->streams[last], out, final, c->lookahead_count, c->window_size); |
| @@ -274,7 +274,7 @@ static int write_manifest(AVFormatContext *s, int final) · 7 unmodified lines | |||
| 274 | if (s->streams[i]->codec->codec_type != AVMEDIA_TYPE_AUDIO) | 274 | if (s->streams[i]->codec->codec_type != AVMEDIA_TYPE_AUDIO) |
| 275 | continue; | 275 | continue; |
| 276 | last = i; | 276 | last = i; |
| 277 | avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%d\" FourCC=\"%s\" SamplingRate=\"%d\" Channels=\"%d\" BitsPerSample=\"16\" PacketSize=\"%d\" AudioTag=\"%d\" CodecPrivateData=\"%s\" />\n", index, s->streams[i]->codec->bit_rate, os->fourcc, s->streams[i]->codec->sample_rate, s->streams[i]->codec->channels, os->packet_size, os->audio_tag, os->private_str); | 277 | avio_printf(out, "<QualityLevel Index=\"%d\" Bitrate=\"%"PRId64"\" FourCC=\"%s\" SamplingRate=\"%d\" Channels=\"%d\" BitsPerSample=\"16\" PacketSize=\"%d\" AudioTag=\"%d\" CodecPrivateData=\"%s\" />\n", index, (int64_t)s->streams[i]->codec->bit_rate, os->fourcc, s->streams[i]->codec->sample_rate, s->streams[i]->codec->channels, os->packet_size, os->audio_tag, os->private_str); |
| 278 | index++; | 278 | index++; |
| 279 | } | 279 | } |
| 280 | output_chunk_list(&c->streams[last], out, final, c->lookahead_count, c->window_size); | 280 | output_chunk_list(&c->streams[last], out, final, c->lookahead_count, c->window_size); |
| @@ -321,7 +321,7 @@ static int ism_write_header(AVFormatContext *s) · 40 unmodified lines | |||
| 321 | ret = AVERROR(EINVAL); | 321 | ret = AVERROR(EINVAL); |
| 322 | goto fail; | 322 | goto fail; |
| 323 | } | 323 | } |
| 324 | snprintf(os->dirname, sizeof(os->dirname), "%s/QualityLevels(%d)", s->filename, s->streams[i]->codec->bit_rate); | 324 | snprintf(os->dirname, sizeof(os->dirname), "%s/QualityLevels(%"PRId64")", s->filename, (int64_t)s->streams[i]->codec->bit_rate); |
| 325 | if (mkdir(os->dirname, 0777) == -1 && errno != EEXIST) { | 325 | if (mkdir(os->dirname, 0777) == -1 && errno != EEXIST) { |
| 326 | ret = AVERROR(errno); | 326 | ret = AVERROR(errno); |
| 327 | av_log(s, AV_LOG_ERROR, "mkdir failed\n"); | 327 | av_log(s, AV_LOG_ERROR, "mkdir failed\n"); |
| @@ -211,8 +211,8 @@ static int vqf_read_header(AVFormatContext *s) · 210 unmodified lines | |||
| 211 | size = 2048; | 211 | size = 2048; |
| 212 | break; | 212 | break; |
| 213 | default: | 213 | default: |
| 214 | av_log(s, AV_LOG_ERROR, "Mode not suported: %d Hz, %d kb/s.\n", | 214 | av_log(s, AV_LOG_ERROR, "Mode not suported: %d Hz, %"PRId64" kb/s.\n", |
| 215 | st->codec->sample_rate, st->codec->bit_rate); | 215 | st->codec->sample_rate, (int64_t)st->codec->bit_rate); |
| 216 | return -1; | 216 | return -1; |
| 217 | } | 217 | } |
| 218 | c->frame_bit_len = st->codec->bit_rate*size/st->codec->sample_rate; | 218 | c->frame_bit_len = st->codec->bit_rate*size/st->codec->sample_rate; |