Lines Matching +full:- +full:dvalgrind
1 /* Copyright (c) 2011-2013 Xiph.Org Foundation
8 - Redistributions of source code must retain the above copyright
11 - Redistributions in binary form must reproduce the above copyright
41 /* These tests are more sensitive if compiled with -DVALGRIND and
102 fprintf(stdout," ---------------------------------------------------\n"); in test_dec_api()
114 for(i=-7;i<=96000;i++) in test_dec_api()
120 case(-5):fs=-8000;break; in test_dec_api()
121 case(-6):fs=INT32_MAX;break; in test_dec_api()
122 case(-7):fs=INT32_MIN;break; in test_dec_api()
187 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_dec_api()
195 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_dec_api()
202 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_dec_api()
222 err=opus_decoder_ctl(dec, OPUS_SET_GAIN(-32769)); in test_dec_api()
228 err=opus_decoder_ctl(dec, OPUS_SET_GAIN(-15)); in test_dec_api()
234 if(err != OPUS_OK || i!=-15)test_failed(); in test_dec_api()
283 bw=OPUS_BANDWIDTH_NARROWBAND+(((((bw&7)*9)&(63-(bw&8)))+2+12*((bw&8)!=0))>>4); in test_dec_api()
293 fp3s=((((3-(fp3s&3))*13&119)+9)>>2)*((fp3s>13)*(3-((fp3s&3)==3))+1)*25; in test_dec_api()
309 if(opus_decode(dec, packet, -1, sbuf, 960, 0)!=OPUS_BAD_ARG)test_failed(); in test_dec_api()
364 fprintf(stdout," ---------------------------------------------------\n"); in test_msdec_api()
365 for(a=-1;a<4;a++) in test_msdec_api()
367 for(b=-1;b<4;b++) in test_msdec_api()
379 for(i=-7;i<=96000;i++) in test_msdec_api()
385 case(-5):fs=-8000;break; in test_msdec_api()
386 case(-6):fs=INT32_MAX;break; in test_msdec_api()
387 case(-7):fs=INT32_MIN;break; in test_msdec_api()
392 dec = opus_multistream_decoder_create(fs, c, 1, c-1, mapping, &err); in test_msdec_api()
395 dec = opus_multistream_decoder_create(fs, c, 1, c-1, mapping, 0); in test_msdec_api()
400 err = opus_multistream_decoder_init(dec,fs,c,1,c-1, mapping); in test_msdec_api()
441 err = opus_multistream_decoder_init(dec,48000, 1, 1, -1, mapping); in test_msdec_api()
463 dec = opus_multistream_decoder_create(48000, -1, 1, 1, mapping, ret_err); in test_msdec_api()
475 dec = opus_multistream_decoder_create(48000, 1, -1, 2, mapping, ret_err); in test_msdec_api()
481 dec = opus_multistream_decoder_create(48000, 1, -1, -1, mapping, ret_err); in test_msdec_api()
552 err=opus_multistream_decoder_ctl(dec, OPUS_MULTISTREAM_GET_DECODER_STATE(-1,&streamdec)); in test_msdec_api()
614 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_msdec_api()
622 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_msdec_api()
629 if(err != OPUS_OK || i>0 || i<-1)test_failed(); in test_msdec_api()
654 …s_multistream_decode(dec, packet, -1, sbuf, 960, 0)!=OPUS_BAD_ARG){printf("%d\n",opus_multistream_… in test_msdec_api()
656 if(opus_multistream_decode(dec, packet, 3, sbuf, -960, 0)!=OPUS_BAD_ARG)test_failed(); in test_msdec_api()
688 #define UNDEFINE_FOR_PARSE toc=-1; \
691 payload_offset=-1; \
696 #define UNDEFINE_FOR_PARSE toc=-1; \
699 payload_offset=-1;
717 fprintf(stdout," ---------------------------------------------------\n"); in test_parse()
750 if(size[0]!=size[1] || size[0]!=((jj-1)>>1))test_failed(); in test_parse()
776 else{packet[1]=252+(j&3);packet[2]=(j-252)>>2;} in test_parse()
779 ret=opus_packet_parse(packet,j+(j<252?2:3)-1,&toc,frames,size,&payload_offset); in test_parse()
800 if(size[0]!=j||size[1]!=(j<<1)+3-j-(j<252?1:2))test_failed(); in test_parse()
817 fprintf(stdout," code 3 m-truncation (%2d cases) ............... OK.\n",cfgs); in test_parse()
822 /*code 3, m is zero or 49-63*/ in test_parse()
848 fprintf(stdout," code 3 m=0,49-64 (%2d cases) ................ OK.\n",cfgs); in test_parse()
888 if(frame_samp*j<=5760 && (sz-2)%j==0 && (sz-2)/j<1276) in test_parse()
891 for(jj=1;jj<ret;jj++)if(frames[jj]!=frames[jj-1]+size[jj-1])test_failed(); in test_parse()
904 fprintf(stdout," code 3 m=1-48 CBR (%2d cases) .......... OK.\n",cfgs); in test_parse()
932 ret=opus_packet_parse(packet,2+j-2,&toc,frames,size,&payload_offset); in test_parse()
945 ret=opus_packet_parse(packet,2+j-2,&toc,frames,size,&payload_offset); in test_parse()
953 ret=opus_packet_parse(packet,2+j+252-1,&toc,frames,size,&payload_offset); in test_parse()
959 ret=opus_packet_parse(packet,2+j-1,&toc,frames,size,&payload_offset); in test_parse()
966 /*Quasi-CBR use of mode 3*/ in test_parse()
971 int as=(tsz[sz]+i-j-2)/j; in test_parse()
972 for(jj=0;jj<j-1;jj++) in test_parse()
975 else{packet[2+pos]=252+(as&3);packet[3+pos]=(as-252)>>2;pos+=2;} in test_parse()
980 if(frame_samp*j<=5760 && as<1276 && (tsz[sz]+i-2-pos-as*(j-1))<1276){ in test_parse()
982 for(jj=0;jj<j-1;jj++)if(size[jj]!=as)test_failed(); in test_parse()
983 if(size[j-1]!=(tsz[sz]+i-2-pos-as*(j-1)))test_failed(); in test_parse()
989 fprintf(stdout," code 3 m=1-48 VBR (%2d cases) ............. OK.\n",cfgs); in test_parse()
1017 ret=opus_packet_parse(packet,2+jj+pos-1,&toc,frames,size,&payload_offset); in test_parse()
1042 The encoder api tests all have a pattern of set-must-fail, set-must-fail,
1043 set-must-pass, get-and-compare, set-must-pass, get-and-compare. */
1051 i=-12345;\
1058 i=-12345;\
1080 fprintf(stdout," ---------------------------------------------------\n"); in test_enc_api()
1092 for(i=-7;i<=96000;i++) in test_enc_api()
1098 case(-5):fs=-8000;break; in test_enc_api()
1099 case(-6):fs=INT32_MAX;break; in test_enc_api()
1100 case(-7):fs=INT32_MIN;break; in test_enc_api()
1162 i=-12345; in test_enc_api()
1187 CHECK_SETGET(OPUS_SET_APPLICATION(i),OPUS_GET_APPLICATION(&i),-1,OPUS_AUTO, in test_enc_api()
1201 CHECK_SETGET(OPUS_SET_BITRATE(i),OPUS_GET_BITRATE(&i),-12345,0, in test_enc_api()
1209 CHECK_SETGET(OPUS_SET_FORCE_CHANNELS(i),OPUS_GET_FORCE_CHANNELS(&i),-1,3, in test_enc_api()
1214 i=-2; in test_enc_api()
1235 i=-12345; in test_enc_api()
1249 i=-2; in test_enc_api()
1270 i=-12345; in test_enc_api()
1285 CHECK_SETGET(OPUS_SET_DTX(i),OPUS_GET_DTX(&i),-1,2, in test_enc_api()
1293 CHECK_SETGET(OPUS_SET_COMPLEXITY(i),OPUS_GET_COMPLEXITY(&i),-1,11, in test_enc_api()
1301 CHECK_SETGET(OPUS_SET_INBAND_FEC(i),OPUS_GET_INBAND_FEC(&i),-1,2, in test_enc_api()
1309 CHECK_SETGET(OPUS_SET_PACKET_LOSS_PERC(i),OPUS_GET_PACKET_LOSS_PERC(&i),-1,101, in test_enc_api()
1317 CHECK_SETGET(OPUS_SET_VBR(i),OPUS_GET_VBR(&i),-1,2, in test_enc_api()
1325 CHECK_SETGET(OPUS_SET_VOICE_RATIO(i),OPUS_GET_VOICE_RATIO(&i),-2,101, in test_enc_api()
1333 CHECK_SETGET(OPUS_SET_VBR_CONSTRAINT(i),OPUS_GET_VBR_CONSTRAINT(&i),-1,2, in test_enc_api()
1341 CHECK_SETGET(OPUS_SET_SIGNAL(i),OPUS_GET_SIGNAL(&i),-12345,0x7FFFFFFF, in test_enc_api()
1359 CHECK_SETGET(OPUS_SET_PREDICTION_DISABLED(i),OPUS_GET_PREDICTION_DISABLED(&i),-1,2,1,0, in test_enc_api()
1393 CHECK_SETGET(OPUS_SET_EXPERT_FRAME_DURATION(i),OPUS_GET_EXPERT_FRAME_DURATION(&i),0,-1, in test_enc_api()
1452 fprintf(stdout," ---------------------------------------------------\n"); in test_repacketizer_api()
1516 /* Code 0,1,3 CBR -> Code 0,1,3 CBR */ in test_repacketizer_api()
1576 if(opus_repacketizer_out(rp,po,len-1)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1664 sum+=i-1; in test_repacketizer_api()
1667 len=sum+(rcnt<2?1:rcnt<3?2:2+rcnt-1); in test_repacketizer_api()
1691 if(opus_repacketizer_out(rp,po,len-1)!=OPUS_BUFFER_TOO_SMALL)test_failed(); in test_repacketizer_api()
1761 #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
1781 fprintf(stdout," ---------------------------------------------------\n"); in test_malloc_fail()
1819 msdec=opus_multistream_decoder_create(opus_rates[rate], c, 1, c-1, mapping, ep); in test_malloc_fail()
1839 … msenc=opus_multistream_encoder_create(opus_rates[rate], c, 1, c-1, mapping, opus_apps[app],ep); in test_malloc_fail()
1871 #pragma GCC diagnostic pop /* restore -Wdeprecated-declarations */
1889 if(opus_strerror(-32768)==NULL)test_failed(); in main()