[FFmpeg-devel] [PATCH 1/2] ac3enc: decrement by 16 instead of 64 in first stage of the CBR bit allocation search.
Måns Rullgård
mans
Sun Mar 6 21:41:51 CET 2011
Justin Ruggles <justin.ruggles at gmail.com> writes:
> This speeds up the average search time.
> ---
> libavcodec/ac3enc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
>
> diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
> index 676bb5e..beade19 100644
> --- a/libavcodec/ac3enc.c
> +++ b/libavcodec/ac3enc.c
> @@ -957,7 +957,7 @@ static int cbr_bit_allocation(AC3EncodeContext *s)
>
> while (snr_offset >= 0 &&
> bit_alloc(s, snr_offset) > bits_left) {
> - snr_offset -= 64;
> + snr_offset -= 16;
> }
> if (snr_offset < 0)
> return AVERROR(EINVAL);
If you say so... OK.
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list