Changes the PLC behaviour and fixes the FEC behaviour on concatenated packets
PLC and FEC now return exactly the number of samples specified for the buffer rather than (usually) returning the size of the last packet. Doc and tests are updated accordingly.
This commit is contained in:
parent
124f69b00c
commit
7fcd66c40d
5 changed files with 85 additions and 40 deletions
|
@ -269,7 +269,7 @@ int run_test1(int no_fuzz)
|
|||
if(opus_decoder_ctl(dec, OPUS_GET_FINAL_RANGE(&dec_final_range))!=OPUS_OK)test_failed();
|
||||
if(enc_final_range!=dec_final_range)test_failed();
|
||||
/*LBRR decode*/
|
||||
out_samples = opus_decode(dec_err[0], packet, len, out2buf, MAX_FRAME_SAMP, (fast_rand()&3)!=0);
|
||||
out_samples = opus_decode(dec_err[0], packet, len, out2buf, frame_size, (fast_rand()&3)!=0);
|
||||
if(out_samples!=frame_size)test_failed();
|
||||
out_samples = opus_decode(dec_err[1], packet, (fast_rand()&3)==0?0:len, out2buf, MAX_FRAME_SAMP, (fast_rand()&7)!=0);
|
||||
if(out_samples<120)test_failed();
|
||||
|
@ -317,8 +317,8 @@ int run_test1(int no_fuzz)
|
|||
if(enc_final_range!=dec_final_range)test_failed();
|
||||
/*LBRR decode*/
|
||||
loss=(fast_rand()&63)==0;
|
||||
out_samples = opus_multistream_decode(MSdec_err, packet, loss?0:len, out2buf, MAX_FRAME_SAMP, (fast_rand()&3)!=0);
|
||||
if(loss?out_samples<120:out_samples!=(frame_size*6))test_failed();
|
||||
out_samples = opus_multistream_decode(MSdec_err, packet, loss?0:len, out2buf, frame_size*6, (fast_rand()&3)!=0);
|
||||
if(out_samples!=(frame_size*6))test_failed();
|
||||
i+=frame_size;
|
||||
count++;
|
||||
}while(i<(SSAMPLES/12-MAX_FRAME_SAMP));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue