On Tue, Jun 16, 2015 at 08:25:01AM +0100, George Boyle wrote: > Fixes ticket #4628. > > The problem arose, in the sample file at least, in the last block where the > minimum and maximum Rice partition orders were both 0. In that case, and any > other where pmax == pmin, the original UINT32_MAX placeholder value for > bits[opt_porder] was getting overwritten before the comparison to check if the > current partition order is a new optimal, so the correct partition order and > RiceContext params were not being set. > > Regression test sample to be added to `$(SAMPLES)/audio-reference/`: > http://thebuds.net/chorusnoise_2ch_44kHz_s16.wav > > Signed-off-by: George Boyle <geo...@thebuds.net> > --- > libavcodec/flacenc.c | 2 +- > tests/fate/flac.mak | 4 ++++ > 2 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c > index cdfeaf8..29bd999 100644 > --- a/libavcodec/flacenc.c > +++ b/libavcodec/flacenc.c > @@ -705,7 +705,7 @@ static uint64_t calc_rice_params(RiceContext *rc, > bits[pmin] = UINT32_MAX; > for (i = pmax; ; ) { > bits[i] = calc_optimal_rice_params(&tmp_rc, i, sums, n, pred_order, > kmax, exact); > - if (bits[i] < bits[opt_porder]) { > + if (bits[i] < bits[opt_porder] || pmax == pmin) { > opt_porder = i; > *rc = tmp_rc; > }
bugfix applied fate sample uploaded fate test not applied as some of the clients need 24h to sync the samples please post a patch that contains the remaining 2 hunks in >24h also for future fate tests, small samples are preferred to keep the fate testsuite manageable size wise Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I do not agree with what you have to say, but I'll defend to the death your right to say it. -- Voltaire
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel