xiph / vorbis Goto Github PK
View Code? Open in Web Editor NEWReference implementation of the Ogg Vorbis audio format.
License: BSD 3-Clause "New" or "Revised" License
Reference implementation of the Ogg Vorbis audio format.
License: BSD 3-Clause "New" or "Revised" License
hi,
I want to use libvorbis to manage and package audios in a game.
However, the documents I could find on the internet were for experienced c and cpp coders. I can write c and cpp, but I'm new to low level transactions like digital audio and codecs.
I would like to choose libvorbis as I have no problem with licensing.
Could you please simply answer my questions below?
sf_open_virtual
?I think many people are curious about these questions.
Hello,
I just wanted to confirm - is there no support for tests on Windows with CMake? Is it by design? I would appreciate any information about this or any pointers about running tests on Windows.
Thanks!
Kris
specifying --with-ogg-includes
to configure has no effect on build
I'm not sure if this is the correct place to put this, but I was wondering if there are plans to extend the list of standard field names in the comment header?
More specifically I'm looking for a way to add lyrics metadata to my music files, and formats/players that make use of id3 tags seem to implement this via the UNSYNCEDLYRICS tag (at least WMP supports this).
However the current Vorbis specification doesn't list an equivalent in the comment header. Of course I could set a custom comment and make up my own format, but I'm hoping that a more future-proof solution could be established, especially since other codecs like flac and opus apparently use the same comment header format.
edit: I looked more into how some audio players tend to implement lyrics functionality, and it seems most have settled on using a LYRICS
comment tag for unsynced lyrics in Vorbis header data -> https://wiki.hydrogenaudio.org/index.php?title=Tag_Mapping#Miscellaneous
It would be nice if this (or other commonly used tags) could be added to the specification at some point, but otherwise I guess this can be closed again since I've found what I was looking for.
2- and more- pass coding, like nero?
I'm building the library in msys + mingw (not the newest mingw-w64) and I set the configure script for building static libs.
Now, the library libvorbisfile.a turns out to be incomplete, because it is built using
libtool: link: ar cru .libs/libvorbisfile.a vorbisfile.o
while it should be instead
libtool: link: ar cru .libs/libvorbisfile.a vorbisfile.o synthesis.o
If we don't do so, later linking of any executables to libvorbisfile.a will fail because the library itself lacks some object (they're coming from synthesis.o).
It looks like the CMakeLists.txt
file is not packaged in the http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.gz
file. But it is needed for building with cmake. Is it not packaged on purpose? Or could it be done?
An installed VorbisConfig.cmake
needs Ogg
vorbis/cmake/VorbisConfig.cmake.in
Lines 4 to 6 in 84c0236
This assumes ogg is installed with cmake and OggConfig.cmake
/FindOgg.cmake
is somehow available.
Vorbis itself ships a FindOgg.cmake
module and thus does not require ogg to provide OggConfig.cmake
.
So I propose to installFindOgg.cmake
as well, and add it to CMAKE_MODULE_PATH
inside VorbisConfig.cmake
.
I do something similar in SDL_mixer to find the various dependencies.
(SDL_mixer only needs the dependencies when building a static library)
I compile the file in examples folder,but I have no idea how to test this examples.
Hi all,
I am trying to stream vorbis encoded audio using gstreamer.I am getting Redistribute latency error.
Please tell me is their anymistake in the command
Thank you all inadvance
Sender:
command:
gst-launch-1.0 -e --gst-debug-level=2 alsasrc device=hw:0,0 latency-time=30000 num-buffers=1000 buffer-time=800000 ! \
audio/x-raw,format=S16LE,layout=interleaved,rate=44100,channels=2 ! audioconvert ! audio/x-raw,format=F32LE,rate=44100,channels=2,layout=interleaved ! \
vorbisenc ! audio/x-vorbis,rate=44100,channels=2 ! vorbisparse ! rtpvorbispay name=pay pt=96 config-interval=3 ! application/x-rtp,media=audio,channel=2,payload=96,clock-rate=44100,encoding-name=VORBIS ! \
udpsink host=192.168.5.30 port=5000
error log:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstAudioSrcClock
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Reciever:
command:
gst-launch-1.0 -e --gst-debug-level=2 udpsrc port=5000 ! application/x-rtp,media=audio,channel=2,payload=96,clock-rate=44100,encoding-name=VORBIS ! \
rtpvorbisdepay name=pay0 ! vorbisparse ! vorbisdec ! audio/x-raw,format=F32LE,rate=44100,channel=2 ! audioconvert ! \
autoaudiosink sync=false
error log:
Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock 0:00:00.997245066 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:376:gst_rtp_vorbis_depay_setcaps: no configuration specified 0:00:00.997436314 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:635:gst_rtp_vorbis_depay_process: warning: Could not switch codebooks WARNING: from element /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not decode stream. Additional debug info: gstrtpvorbisdepay.c(635): gst_rtp_vorbis_depay_process (): /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not switch codebooks 0:00:01.048326551 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:635:gst_rtp_vorbis_depay_process: warning: Could not switch codebooks WARNING: from element /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not decode stream. Additional debug info: gstrtpvorbisdepay.c(635): gst_rtp_vorbis_depay_process (): /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not switch codebooks 0:00:01.073574969 3269 0x15c0400 WARN rtpvorbisdepay gstrtpvorbisdepay.c:635:gst_rtp_vorbis_depay_process: warning: Could not switch codebooks WARNING: from element /GstPipeline:pipeline0/GstRtpVorbisDepay:pay0: Could not decode stream. Additional debug info:
I recently noticed that Vorbis shlibs export several symbols which are
not present in it's public header (for a total of 85 symbols, see
attach). Would it make sense to filter them via -fvisibility=hidden
and -Wl,--version-script? I attached a draft patch.
The issue was found using ShlibVisibilityChecker tool.
Private_symbols.txt
0001-Hide-private-symbols.patch.txt
As a side note, it seems that instructions on filing bugs at Vorbis site are outdated ("Bugs" at https://xiph.org/vorbis/ lead to Trac instead of Github).
Hello. I'm building vobris as a part of my project (calling add_subdirectory
on this repo) and so I don't use FindOgg.cmake for finding vorbis. Can you please add "Ogg::ogg" target, so I can link with it instead of "vobris" and "vorbisfile"?
Hi,
I ran the clang static analyzer on vorbis 1.3.5 and it reported these potential issues:
Logic error: Assigned value is garbage or undefined (libvorbis/lib/floor1.c:461)
libvorbis/lib/floor1.c
447 a->xb=xb;
448 a->yb=yb;
449 a->x2b=x2b;
450 a->y2b=y2b;
451 a->xyb=xyb;
452 a->bn=nb;
453
454 return(na);
455 }
456
457 static int fit_line(lsfit_acc *a,int fits,int *y0,int *y1,
458 vorbis_info_floor1 *info){
459 double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460 int i;
461 int x0=a[0].x0;
^ Logic error: Assigned value is garbage or undefined
462 int x1=a[fits-1].x1;
463
464 for(i=0;i<fits;i++){
465 double weight = (a[i].bn+a[i].an)*info->twofitweight/(a[i].an+1)+1.;
466
467 xb+=a[i].xb + a[i].xa * weight;
468 yb+=a[i].yb + a[i].ya * weight;
469 x2b+=a[i].x2b + a[i].x2a * weight;
470 y2b+=a[i].y2b + a[i].y2a * weight;
471 xyb+=a[i].xyb + a[i].xya * weight;
472 bn+=a[i].bn + a[i].an * weight;
473 }
474
475 if(*y0>=0){
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
Loop body executed 0 times
libvorbis/lib/floor1.c
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
600 /* quantize the relevant floor points and collect them into line fit
Loop body executed 0 times
libvorbis/lib/floor1.c
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
Assuming 'posts' is not equal to 0
libvorbis/lib/floor1.c
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
602 if(posts==0){
^ Assuming 'posts' is not equal to 0
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
Loop body executed 0 times
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Loop body executed 0 times
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Assuming 'nonzero' is not equal to 0
libvorbis/lib/floor1.c
608 n,info);
609 }
610
611 if(nonzero){
^ Assuming 'nonzero' is not equal to 0
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
Calling 'fit_line'
libvorbis/lib/floor1.c
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
615 fit_line(fits,posts-1,&y0,&y1,info);
^ Calling 'fit_line'
616
617 fit_valueA[0]=y0;
618 fit_valueB[0]=y0;
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c
454 return(na);
455 }
456
457 static int fit_line(lsfit_acc *a,int fits,int *y0,int *y1,
^ Entered call from 'floor1_fit'
458 vorbis_info_floor1 *info){
459 double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460 int i;
Assigned value is garbage or undefined
libvorbis/lib/floor1.c
458 vorbis_info_floor1 *info){
459 double xb=0,yb=0,x2b=0,y2b=0,xyb=0,bn=0;
460 int i;
461 int x0=a[0].x0;
^ Assigned value is garbage or undefined
462 int x1=a[fits-1].x1;
463
464 for(i=0;i<fits;i++){
----------
Logic error: Undefined or garbage value returned to caller (libvorbis/lib/floor1.c:570)
libvorbis/lib/floor1.c
556 if(y+info->maxover<val)return(1);
557 if(y-info->maxunder>val)return(1);
558 }
559 }
560 }
561
562 if(info->maxover*info->maxover/n>info->maxerr)return(0);
563 if(info->maxunder*info->maxunder/n>info->maxerr)return(0);
564 if(mse/n>info->maxerr)return(1);
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
^ Logic error: Undefined or garbage value returned to caller
571 if(B[pos]<0)
572 return A[pos];
573
574 return (A[pos]+B[pos])>>1;
575 }
576
577 int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
578 const float *logmdct, /* in */
579 const float *logmask){
580 long i,j;
581 vorbis_info_floor1 *info=look->vi;
582 long n=look->n;
583 long posts=look->posts;
584 long nonzero=0;
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
Loop body executed 0 times
libvorbis/lib/floor1.c
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
600 /* quantize the relevant floor points and collect them into line fit
Loop body executed 0 times
libvorbis/lib/floor1.c
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
Assuming 'posts' is not equal to 0
libvorbis/lib/floor1.c
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
602 if(posts==0){
^ Assuming 'posts' is not equal to 0
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Assuming 'nonzero' is not equal to 0
libvorbis/lib/floor1.c
608 n,info);
609 }
610
611 if(nonzero){
^ Assuming 'nonzero' is not equal to 0
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
Entering loop body
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Entering loop body
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Looping back to the head of the loop
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Looping back to the head of the loop
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Entering loop body
libvorbis/lib/floor1.c
706 /* fill in posts marked as not using a fit; we will zero
707 back out to 'unused' when encoding them so long as curve
708 interpolation doesn't force them into use */
709 for(i=2;i<posts;i++){
^ Entering loop body
710 int ln=look->loneighbor[i-2];
711 int hn=look->hineighbor[i-2];
712 int x0=info->postlist[ln];
Calling 'post_Y'
libvorbis/lib/floor1.c
715 int y1=output[hn];
716
717 int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
718 int vx=post_Y(fit_valueA,fit_valueB,i);
^ Calling 'post_Y'
719
720 if(vx>=0 && predicted!=vx){
721 output[i]=vx;
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
^ Entered call from 'floor1_fit'
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
Undefined or garbage value returned to caller
libvorbis/lib/floor1.c
567
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
^ Undefined or garbage value returned to caller
571 if(B[pos]<0)
572 return A[pos];
573
----------
Logic error: The left operand of '<' is a garbage value (libvorbis/lib/floor1.c:571)
libvorbis/lib/floor1.c
557 if(y-info->maxunder>val)return(1);
558 }
559 }
560 }
561
562 if(info->maxover*info->maxover/n>info->maxerr)return(0);
563 if(info->maxunder*info->maxunder/n>info->maxerr)return(0);
564 if(mse/n>info->maxerr)return(1);
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
^ Logic error: The left operand of '<' is a garbage value
572 return A[pos];
573
574 return (A[pos]+B[pos])>>1;
575 }
576
577 int *floor1_fit(vorbis_block *vb,vorbis_look_floor1 *look,
578 const float *logmdct, /* in */
579 const float *logmask){
580 long i,j;
581 vorbis_info_floor1 *info=look->vi;
582 long n=look->n;
583 long posts=look->posts;
584 long nonzero=0;
585 lsfit_acc fits[VIF_POSIT+1];
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is < 'posts'
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Assuming 'i' is < 'posts'
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Entering loop body
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Entering loop body
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Looping back to the head of the loop
libvorbis/lib/floor1.c
591 int *output=NULL;
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
^ Looping back to the head of the loop
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
Assuming 'i' is >= 'posts'
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Assuming 'i' is >= 'posts'
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
592 int memo[VIF_POSIT+2];
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
^ Loop body executed 0 times
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
Loop body executed 0 times
libvorbis/lib/floor1.c
593
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
^ Loop body executed 0 times
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
Loop body executed 0 times
libvorbis/lib/floor1.c
594 for(i=0;i<posts;i++)fit_valueA[i]=-200; /* mark all unused */
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
^ Loop body executed 0 times
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
599
600 /* quantize the relevant floor points and collect them into line fit
Loop body executed 0 times
libvorbis/lib/floor1.c
595 for(i=0;i<posts;i++)fit_valueB[i]=-200; /* mark all unused */
596 for(i=0;i<posts;i++)loneighbor[i]=0; /* 0 for the implicit 0 post */
597 for(i=0;i<posts;i++)hineighbor[i]=1; /* 1 for the implicit post at n */
598 for(i=0;i<posts;i++)memo[i]=-1; /* no neighbor yet */
^ Loop body executed 0 times
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
Assuming 'posts' is not equal to 0
libvorbis/lib/floor1.c
599
600 /* quantize the relevant floor points and collect them into line fit
601 structures (one per minimal division) at the same time */
602 if(posts==0){
^ Assuming 'posts' is not equal to 0
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Entering loop body
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Entering loop body
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Looping back to the head of the loop
libvorbis/lib/floor1.c
602 if(posts==0){
603 nonzero+=accumulate_fit(logmask,logmdct,0,n,fits,n,info);
604 }else{
605 for(i=0;i<posts-1;i++)
^ Looping back to the head of the loop
606 nonzero+=accumulate_fit(logmask,logmdct,look->sorted_index[i],
607 look->sorted_index[i+1],fits+i,
608 n,info);
Assuming 'nonzero' is not equal to 0
libvorbis/lib/floor1.c
608 n,info);
609 }
610
611 if(nonzero){
^ Assuming 'nonzero' is not equal to 0
612 /* start by fitting the implicit base case.... */
613 int y0=-200;
614 int y1=-200;
Entering loop body
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Entering loop body
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Looping back to the head of the loop
libvorbis/lib/floor1.c
623 /* start progressive splitting. This is a greedy, non-optimal
624 algorithm, but simple and close enough to the best
625 answer. */
626 for(i=2;i<posts;i++){
^ Looping back to the head of the loop
627 int sortpos=look->reverse_index[i];
628 int ln=loneighbor[sortpos];
629 int hn=hineighbor[sortpos];
Calling 'post_Y'
libvorbis/lib/floor1.c
700
701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts);
702
703 output[0]=post_Y(fit_valueA,fit_valueB,0);
^ Calling 'post_Y'
704 output[1]=post_Y(fit_valueA,fit_valueB,1);
705
706 /* fill in posts marked as not using a fit; we will zero
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
^ Entered call from 'floor1_fit'
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
Returning from 'post_Y'
libvorbis/lib/floor1.c
700
701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts);
702
703 output[0]=post_Y(fit_valueA,fit_valueB,0);
^ Returning from 'post_Y'
704 output[1]=post_Y(fit_valueA,fit_valueB,1);
705
706 /* fill in posts marked as not using a fit; we will zero
Calling 'post_Y'
libvorbis/lib/floor1.c
701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts);
702
703 output[0]=post_Y(fit_valueA,fit_valueB,0);
704 output[1]=post_Y(fit_valueA,fit_valueB,1);
^ Calling 'post_Y'
705
706 /* fill in posts marked as not using a fit; we will zero
707 back out to 'unused' when encoding them so long as curve
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
^ Entered call from 'floor1_fit'
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
Returning from 'post_Y'
libvorbis/lib/floor1.c
701 output=_vorbis_block_alloc(vb,sizeof(*output)*posts);
702
703 output[0]=post_Y(fit_valueA,fit_valueB,0);
704 output[1]=post_Y(fit_valueA,fit_valueB,1);
^ Returning from 'post_Y'
705
706 /* fill in posts marked as not using a fit; we will zero
707 back out to 'unused' when encoding them so long as curve
Entering loop body
libvorbis/lib/floor1.c
706 /* fill in posts marked as not using a fit; we will zero
707 back out to 'unused' when encoding them so long as curve
708 interpolation doesn't force them into use */
709 for(i=2;i<posts;i++){
^ Entering loop body
710 int ln=look->loneighbor[i-2];
711 int hn=look->hineighbor[i-2];
712 int x0=info->postlist[ln];
Calling 'post_Y'
libvorbis/lib/floor1.c
715 int y1=output[hn];
716
717 int predicted=render_point(x0,x1,y0,y1,info->postlist[i]);
718 int vx=post_Y(fit_valueA,fit_valueB,i);
^ Calling 'post_Y'
719
720 if(vx>=0 && predicted!=vx){
721 output[i]=vx;
Entered call from 'floor1_fit'
libvorbis/lib/floor1.c
565 return(0);
566 }
567
568 static int post_Y(int *A,int *B,int pos){
^ Entered call from 'floor1_fit'
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
The left operand of '<' is a garbage value
libvorbis/lib/floor1.c
568 static int post_Y(int *A,int *B,int pos){
569 if(A[pos]<0)
570 return B[pos];
571 if(B[pos]<0)
^ The left operand of '<' is a garbage value
572 return A[pos];
573
574 return (A[pos]+B[pos])>>1;
----------
Logic error: The left operand of '*' is a garbage value (libvorbis/lib/lpc.c:79)
libvorbis/lib/lpc.c
65 double epsilon;
66 int i,j;
67
68 /* autocorrelation, p+1 lag coefficients */
69 j=m+1;
70 while(j--){
71 double d=0; /* double needed for accumulator depth */
72 for(i=j;i<n;i++)d+=(double)data[i]*data[i-j];
73 aut[j]=d;
74 }
75
76 /* Generate lpc coefficients from autocorr values */
77
78 /* set our noise floor to about -100dB */
79 error=aut[0] * (1. + 1e-10);
^ Logic error: The left operand of '*' is a garbage value
80 epsilon=1e-9*aut[0]+1e-10;
81
82 for(i=0;i<m;i++){
83 double r= -aut[i+1];
84
85 if(error<epsilon){
86 memset(lpc+i,0,(m-i)*sizeof(*lpc));
87 goto done;
88 }
89
90 /* Sum up this iteration's reflection coefficient; note that in
91 Vorbis we don't save it. If anyone wants to recycle this code
92 and needs reflection coefficients, save the results of 'r' from
93 each iteration. */
Loop body executed 0 times
libvorbis/lib/lpc.c
67
68 /* autocorrelation, p+1 lag coefficients */
69 j=m+1;
70 while(j--){
^ Loop body executed 0 times
71 double d=0; /* double needed for accumulator depth */
72 for(i=j;i<n;i++)d+=(double)data[i]*data[i-j];
73 aut[j]=d;
The left operand of '*' is a garbage value
libvorbis/lib/lpc.c
76 /* Generate lpc coefficients from autocorr values */
77
78 /* set our noise floor to about -100dB */
79 error=aut[0] * (1. + 1e-10);
^ The left operand of '*' is a garbage value
80 epsilon=1e-9*aut[0]+1e-10;
81
82 for(i=0;i<m;i++){
----------
Logic error: The left operand of '<=' is a garbage value (libvorbis/lib/sharedbook.c:394)
libvorbis/lib/sharedbook.c
380 unmodified decode paths. */
381 c->dec_firsttablen=1;
382 c->dec_firsttable=_ogg_calloc(2,sizeof(*c->dec_firsttable));
383 c->dec_firsttable[0]=c->dec_firsttable[1]=1;
384
385 }else{
386 c->dec_firsttablen=ov_ilog(c->used_entries)-4; /* this is magic */
387 if(c->dec_firsttablen<5)c->dec_firsttablen=5;
388 if(c->dec_firsttablen>8)c->dec_firsttablen=8;
389
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
^ Logic error: The left operand of '<=' is a garbage value
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
399 }
400
401 /* now fill in 'unused' entries in the firsttable with hi/lo search
402 hints for the non-direct-hits */
403 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/lib/sharedbook.c
337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries);
338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n);
339
340 if(codes==NULL)goto err_out;
^ Assuming 'codes' is not equal to null
341
342 for(i=0;i<n;i++){
343 codes[i]=bitreverse(codes[i]);
Entering loop body
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Entering loop body
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Looping back to the head of the loop
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Assuming 'i' is >= 'n'
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Assuming 'i' is >= 'n'
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Entering loop body
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1
378 /* special case the 'single entry codebook' with a single bit
379 fastpath table (that always returns entry 0 )in order to use
380 unmodified decode paths. */
Assuming 'i' is < 'n'
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
The left operand of '<=' is a garbage value
libvorbis/lib/sharedbook.c
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
^ The left operand of '<=' is a garbage value
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
----------
Logic error: Function call argument is an uninitialized value (libvorbis/lib/sharedbook.c:395)
libvorbis/lib/sharedbook.c
381 c->dec_firsttablen=1;
382 c->dec_firsttable=_ogg_calloc(2,sizeof(*c->dec_firsttable));
383 c->dec_firsttable[0]=c->dec_firsttable[1]=1;
384
385 }else{
386 c->dec_firsttablen=ov_ilog(c->used_entries)-4; /* this is magic */
387 if(c->dec_firsttablen<5)c->dec_firsttablen=5;
388 if(c->dec_firsttablen>8)c->dec_firsttablen=8;
389
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
^ Logic error: Function call argument is an uninitialized value
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
399 }
400
401 /* now fill in 'unused' entries in the firsttable with hi/lo search
402 hints for the non-direct-hits */
403 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/lib/sharedbook.c
337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries);
338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n);
339
340 if(codes==NULL)goto err_out;
^ Assuming 'codes' is not equal to null
341
342 for(i=0;i<n;i++){
343 codes[i]=bitreverse(codes[i]);
Entering loop body
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Entering loop body
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Looping back to the head of the loop
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Assuming 'i' is >= 'n'
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Assuming 'i' is >= 'n'
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Entering loop body
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1
378 /* special case the 'single entry codebook' with a single bit
379 fastpath table (that always returns entry 0 )in order to use
380 unmodified decode paths. */
Assuming 'i' is < 'n'
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Function call argument is an uninitialized value
libvorbis/lib/sharedbook.c
392
393 for(i=0;i<n;i++){
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
^ Function call argument is an uninitialized value
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
----------
Logic error: The left operand of '<=' is a garbage value (libvorbis/lib/sharedbook.c:410)
libvorbis/lib/sharedbook.c
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
399 }
400
401 /* now fill in 'unused' entries in the firsttable with hi/lo search
402 hints for the non-direct-hits */
403 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
^ Logic error: The left operand of '<=' is a garbage value
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
412
413 /* we only actually have 15 bits per hint to play with here.
414 In order to overflow gracefully (nothing breaks, efficiency
415 just drops), encode as the difference from the extremes. */
416 {
417 unsigned long loval=lo;
418 unsigned long hival=n-hi;
419
420 if(loval>0x7fff)loval=0x7fff;
421 if(hival>0x7fff)hival=0x7fff;
422 c->dec_firsttable[bitreverse(word)]=
423 0x80000000UL | (loval<<15) | hival;
424 }
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/lib/sharedbook.c
337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries);
338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n);
339
340 if(codes==NULL)goto err_out;
^ Assuming 'codes' is not equal to null
341
342 for(i=0;i<n;i++){
343 codes[i]=bitreverse(codes[i]);
Entering loop body
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Entering loop body
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Looping back to the head of the loop
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Assuming 'i' is >= 'n'
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Assuming 'i' is >= 'n'
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Entering loop body
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is not equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is not equal to 1
378 /* special case the 'single entry codebook' with a single bit
379 fastpath table (that always returns entry 0 )in order to use
380 unmodified decode paths. */
Assuming 'i' is < 'n'
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is < 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Looping back to the head of the loop
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Looping back to the head of the loop
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Assuming 'i' is >= 'n'
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Assuming 'i' is >= 'n'
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
^ Entering loop body
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
The left operand of '<=' is a garbage value
libvorbis/lib/sharedbook.c
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
^ The left operand of '<=' is a garbage value
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
412
413 /* we only actually have 15 bits per hint to play with here.
Event 100: Logic error: The left operand of '&' is a garbage value (libvorbis/lib/sharedbook.c:411)
libvorbis/lib/sharedbook.c
397 c->dec_firsttable[orig|(j<<c->dec_codelengths[i])]=i+1;
398 }
399 }
400
401 /* now fill in 'unused' entries in the firsttable with hi/lo search
402 hints for the non-direct-hits */
403 {
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
^ Logic error: The left operand of '&' is a garbage value
412
413 /* we only actually have 15 bits per hint to play with here.
414 In order to overflow gracefully (nothing breaks, efficiency
415 just drops), encode as the difference from the extremes. */
416 {
417 unsigned long loval=lo;
418 unsigned long hival=n-hi;
419
420 if(loval>0x7fff)loval=0x7fff;
421 if(hival>0x7fff)hival=0x7fff;
422 c->dec_firsttable[bitreverse(word)]=
423 0x80000000UL | (loval<<15) | hival;
424 }
425 }
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Entering loop body
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Entering loop body
318 if(s->lengthlist[i]>0)
319 n++;
320
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
314 memset(c,0,sizeof(*c));
315
316 /* count actually used entries and find max length */
317 for(i=0;i<s->entries;i++)
^ Looping back to the head of the loop
318 if(s->lengthlist[i]>0)
319 n++;
320
Assuming 'n' is > 0
libvorbis/lib/sharedbook.c
322 c->used_entries=n;
323 c->dim=s->dim;
324
325 if(n>0){
^ Assuming 'n' is > 0
326 /* two different remappings go on here.
327
328 First, we collapse the likely sparse codebook down only to
Assuming 'codes' is not equal to null
libvorbis/lib/sharedbook.c
337 ogg_uint32_t *codes=_make_words(s->lengthlist,s->entries,c->used_entries);
338 ogg_uint32_t **codep=alloca(sizeof(*codep)*n);
339
340 if(codes==NULL)goto err_out;
^ Assuming 'codes' is not equal to null
341
342 for(i=0;i<n;i++){
343 codes[i]=bitreverse(codes[i]);
Entering loop body
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Entering loop body
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Looping back to the head of the loop
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Assuming 'i' is >= 'n'
libvorbis/lib/sharedbook.c
339
340 if(codes==NULL)goto err_out;
341
342 for(i=0;i<n;i++){
^ Assuming 'i' is >= 'n'
343 codes[i]=bitreverse(codes[i]);
344 codep[i]=codes+i;
345 }
Entering loop body
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Entering loop body
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
349 sortindex=alloca(n*sizeof(*sortindex));
350 c->codelist=_ogg_malloc(n*sizeof(*c->codelist));
351 /* the index is a reverse index */
352 for(i=0;i<n;i++){
^ Looping back to the head of the loop
353 int position=codep[i]-codes;
354 sortindex[position]=i;
355 }
Entering loop body
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Entering loop body
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
354 sortindex[position]=i;
355 }
356
357 for(i=0;i<n;i++)
^ Looping back to the head of the loop
358 c->codelist[sortindex[i]]=codes[i];
359 _ogg_free(codes);
360
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
361 c->valuelist=_book_unquantize(s,n,sortindex);
362 c->dec_index=_ogg_malloc(n*sizeof(*c->dec_index));
363
364 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
365 if(s->lengthlist[i]>0)
366 c->dec_index[sortindex[n++]]=i;
367
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Entering loop body
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Entering loop body
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
367
368 c->dec_codelengths=_ogg_malloc(n*sizeof(*c->dec_codelengths));
369 c->dec_maxlength=0;
370 for(n=0,i=0;i<s->entries;i++)
^ Looping back to the head of the loop
371 if(s->lengthlist[i]>0){
372 c->dec_codelengths[sortindex[n++]]=s->lengthlist[i];
373 if(s->lengthlist[i]>c->dec_maxlength)
Assuming 'n' is equal to 1
libvorbis/lib/sharedbook.c
374 c->dec_maxlength=s->lengthlist[i];
375 }
376
377 if(n==1 && c->dec_maxlength==1){
^ Assuming 'n' is equal to 1
378 /* special case the 'single entry codebook' with a single bit
379 fastpath table (that always returns entry 0 )in order to use
380 unmodified decode paths. */
Entering loop body
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Entering loop body
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Looping back to the head of the loop
libvorbis/lib/sharedbook.c
390 tabn=1<<c->dec_firsttablen;
391 c->dec_firsttable=_ogg_calloc(tabn,sizeof(*c->dec_firsttable));
392
393 for(i=0;i<n;i++){
^ Looping back to the head of the loop
394 if(c->dec_codelengths[i]<=c->dec_firsttablen){
395 ogg_uint32_t orig=bitreverse(c->codelist[i]);
396 for(j=0;j<(1<<(c->dec_firsttablen-c->dec_codelengths[i]));j++)
Entering loop body
libvorbis/lib/sharedbook.c
404 ogg_uint32_t mask=0xfffffffeUL<<(31-c->dec_firsttablen);
405 long lo=0,hi=0;
406
407 for(i=0;i<tabn;i++){
^ Entering loop body
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
The left operand of '&' is a garbage value
libvorbis/lib/sharedbook.c
408 ogg_uint32_t word=i<<(32-c->dec_firsttablen);
409 if(c->dec_firsttable[bitreverse(word)]==0){
410 while((lo+1)<n && c->codelist[lo+1]<=word)lo++;
411 while( hi<n && word>=(c->codelist[hi]&mask))hi++;
^ The left operand of '&' is a garbage value
412
413 /* we only actually have 15 bits per hint to play with here.
414 In order to overflow gracefully (nothing breaks, efficiency
Event 101: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2015)
libvorbis/lib/vorbisfile.c
2001
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
2012 else if(val<-128)val=-128;
2013 *buffer++=val+off;
2014 }
2015 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2016 }else{
2017 int off=(sgned?0:32768);
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
2027 val=vorbis_ftoi(src[j]*32768.f);
2028 if(val>32767)val=32767;
2029 else if(val<-32768)val=-32768;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2003 {
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
^ Assuming 'sgned' is 0
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'
162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2004 int val;
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
Entering loop body
libvorbis/lib/vorbisfile.c
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
^ Entering loop body
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
2012 else if(val<-128)val=-128;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
2009 for(i=0;i<channels;i++){
^ Loop body executed 0 times
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
2012 else if(val<-128)val=-128;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c
2005 if(word==1){
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'
2009 for(i=0;i<channels;i++){
2010 val=vorbis_ftoi(pcm[i][j]*128.f);
2011 if(val>127)val=127;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2012 else if(val<-128)val=-128;
2013 *buffer++=val+off;
2014 }
2015 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2016 }else{
2017 int off=(sgned?0:32768);
2018
Event 102: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2034)
libvorbis/lib/vorbisfile.c
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
2027 val=vorbis_ftoi(src[j]*32768.f);
2028 if(val>32767)val=32767;
2029 else if(val<-32768)val=-32768;
2030 *dest=val;
2031 dest+=channels;
2032 }
2033 }
2034 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2035
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
2043 val=vorbis_ftoi(src[j]*32768.f);
2044 if(val>32767)val=32767;
2045 else if(val<-32768)val=-32768;
2046 *dest=val+off;
2047 dest+=channels;
2048 }
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is not equal to 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is not equal to 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2019 if(host_endian==bigendianp){
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'
162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2019 if(host_endian==bigendianp){
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
^ Assuming 'i' is >= 'channels'
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2020 if(sgned){
2021
2022 vorbis_fpu_setround(&fpu);
2023 for(i=0;i<channels;i++) { /* It's faster in this order */
^ Loop body executed 0 times
2024 float *src=pcm[i];
2025 short *dest=((short *)buffer)+i;
2026 for(j=0;j<samples;j++) {
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2031 dest+=channels;
2032 }
2033 }
2034 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2035
2036 }else{
2037
Event 103: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2050)
libvorbis/lib/vorbisfile.c
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
2043 val=vorbis_ftoi(src[j]*32768.f);
2044 if(val>32767)val=32767;
2045 else if(val<-32768)val=-32768;
2046 *dest=val+off;
2047 dest+=channels;
2048 }
2049 }
2050 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2051
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
2061 val+=off;
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2035
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'
162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2035
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2039 for(i=0;i<channels;i++) {
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
^ Assuming 'i' is >= 'channels'
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2036 }else{
2037
2038 vorbis_fpu_setround(&fpu);
2039 for(i=0;i<channels;i++) {
^ Loop body executed 0 times
2040 float *src=pcm[i];
2041 short *dest=((short *)buffer)+i;
2042 for(j=0;j<samples;j++) {
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2047 dest+=channels;
2048 }
2049 }
2050 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2051
2052 }
2053 }else if(bigendianp){
Event 104: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2065)
libvorbis/lib/vorbisfile.c
2051
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
2061 val+=off;
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
2065 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
2075 val+=off;
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079 vorbis_fpu_restore(fpu);
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Assuming 'bigendianp' is not equal to 0
libvorbis/lib/vorbisfile.c
2050 vorbis_fpu_restore(fpu);
2051
2052 }
2053 }else if(bigendianp){
^ Assuming 'bigendianp' is not equal to 0
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'
162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2052 }
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entering loop body
libvorbis/lib/vorbisfile.c
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
^ Entering loop body
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
2057 for(i=0;i<channels;i++){
^ Loop body executed 0 times
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
2060 else if(val<-32768)val=-32768;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c
2053 }else if(bigendianp){
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'
2057 for(i=0;i<channels;i++){
2058 val=vorbis_ftoi(pcm[i][j]*32768.f);
2059 if(val>32767)val=32767;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2062 *buffer++=(val>>8);
2063 *buffer++=(val&0xff);
2064 }
2065 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2066
2067 }else{
2068 int val;
Event 105: Logic error: Function call argument is an uninitialized value (libvorbis/lib/vorbisfile.c:2079)
libvorbis/lib/vorbisfile.c
2065 vorbis_fpu_restore(fpu);
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
2075 val+=off;
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079 vorbis_fpu_restore(fpu);
^ Logic error: Function call argument is an uninitialized value
2080
2081 }
2082 }
2083 }
2084
2085 vorbis_synthesis_read(&vf->vd,samples);
2086 hs=vorbis_synthesis_halfrate_p(vf->vi);
2087 vf->pcm_offset+=(samples<<hs);
2088 if(bitstream)*bitstream=vf->current_link;
2089 return(samples*bytespersample);
2090 }else{
2091 return(samples);
2092 }
2093 }
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'ret' is > 0
libvorbis/lib/vorbisfile.c
1977 int ret=_fetch_and_process_packet(vf,NULL,1,1);
1978 if(ret==OV_EOF)
1979 return(0);
1980 if(ret<=0)
^ Assuming 'ret' is > 0
1981 return(ret);
1982 }
1983
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Looping back to the head of the loop
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Entering loop body
libvorbis/lib/vorbisfile.c
1966
1967 if(vf->ready_state<OPENED)return(OV_EINVAL);
1968
1969 while(1){
^ Entering loop body
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
Assuming 'samples' is not equal to 0
libvorbis/lib/vorbisfile.c
1969 while(1){
1970 if(vf->ready_state==INITSET){
1971 samples=vorbis_synthesis_pcmout(&vf->vd,&pcm);
1972 if(samples)break;
^ Assuming 'samples' is not equal to 0
1973 }
1974
1975 /* suck in another packet */
Assuming 'samples' is > 0
libvorbis/lib/vorbisfile.c
1983
1984 }
1985
1986 if(samples>0){
^ Assuming 'samples' is > 0
1987
1988 /* yay! proceed to pack data into the byte buffer */
1989
'fpu' declared without an initial value
libvorbis/lib/vorbisfile.c
1989
1990 long channels=ov_info(vf,-1)->channels;
1991 long bytespersample=word * channels;
1992 vorbis_fpu_control fpu;
^ 'fpu' declared without an initial value
1993 if(samples>length/bytespersample)samples=length/bytespersample;
1994
1995 if(samples <= 0)
Assuming 'filter' is null
libvorbis/lib/vorbisfile.c
1996 return OV_EINVAL;
1997
1998 /* Here. */
1999 if(filter)
^ Assuming 'filter' is null
2000 filter(pcm,channels,samples,filter_param);
2001
2002 /* a tight loop to pack each size */
Assuming 'word' is not equal to 1
libvorbis/lib/vorbisfile.c
2002 /* a tight loop to pack each size */
2003 {
2004 int val;
2005 if(word==1){
^ Assuming 'word' is not equal to 1
2006 int off=(sgned?0:128);
2007 vorbis_fpu_setround(&fpu);
2008 for(j=0;j<samples;j++)
Assuming 'sgned' is 0
libvorbis/lib/vorbisfile.c
2014 }
2015 vorbis_fpu_restore(fpu);
2016 }else{
2017 int off=(sgned?0:32768);
^ Assuming 'sgned' is 0
2018
2019 if(host_endian==bigendianp){
2020 if(sgned){
Assuming 'bigendianp' is 0
libvorbis/lib/vorbisfile.c
2050 vorbis_fpu_restore(fpu);
2051
2052 }
2053 }else if(bigendianp){
^ Assuming 'bigendianp' is 0
2054
2055 vorbis_fpu_setround(&fpu);
2056 for(j=0;j<samples;j++)
Calling 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
^ Calling 'vorbis_fpu_setround'
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entered call from 'ov_read_filter'
libvorbis/lib/os.h
158 return _mm_cvtsd_si32(_mm_load_sd(&f));
159 }
160
161 static __inline void vorbis_fpu_setround(vorbis_fpu_control *fpu){
^ Entered call from 'ov_read_filter'
162 (void)fpu;
163 }
164
Returning from 'vorbis_fpu_setround'
libvorbis/lib/vorbisfile.c
2066
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
^ Returning from 'vorbis_fpu_setround'
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
Entering loop body
libvorbis/lib/vorbisfile.c
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
^ Entering loop body
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
Assuming 'i' is >= 'channels'
libvorbis/lib/vorbisfile.c
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
^ Assuming 'i' is >= 'channels'
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
Loop body executed 0 times
libvorbis/lib/vorbisfile.c
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
2071 for(i=0;i<channels;i++){
^ Loop body executed 0 times
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
2074 else if(val<-32768)val=-32768;
Looping back to the head of the loop
libvorbis/lib/vorbisfile.c
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
^ Looping back to the head of the loop
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
Assuming 'j' is >= 'samples'
libvorbis/lib/vorbisfile.c
2067 }else{
2068 int val;
2069 vorbis_fpu_setround(&fpu);
2070 for(j=0;j<samples;j++)
^ Assuming 'j' is >= 'samples'
2071 for(i=0;i<channels;i++){
2072 val=vorbis_ftoi(pcm[i][j]*32768.f);
2073 if(val>32767)val=32767;
Function call argument is an uninitialized value
libvorbis/lib/vorbisfile.c
2076 *buffer++=(val&0xff);
2077 *buffer++=(val>>8);
2078 }
2079 vorbis_fpu_restore(fpu);
^ Function call argument is an uninitialized value
2080
2081 }
2082 }
Probably some of these would not actually happen in the real world, but it might be worth addressing them all anyway.
Thanks,
Benbuck
/tmp/ccFY2ZX4.o: In function main': encoder_example.c:(.text+0xe7): undefined reference to
vorbis_info_init'
encoder_example.c:(.text+0x108): undefined reference to vorbis_encode_init_vbr' encoder_example.c:(.text+0x130): undefined reference to
vorbis_comment_init'
encoder_example.c:(.text+0x149): undefined reference to vorbis_comment_add_tag' encoder_example.c:(.text+0x162): undefined reference to
vorbis_analysis_init'
encoder_example.c:(.text+0x17b): undefined reference to vorbis_block_init' encoder_example.c:(.text+0x1a4): undefined reference to
ogg_stream_init'
encoder_example.c:(.text+0x1d2): undefined reference to vorbis_analysis_headerout' encoder_example.c:(.text+0x1eb): undefined reference to
ogg_stream_packetin'
encoder_example.c:(.text+0x204): undefined reference to ogg_stream_packetin' encoder_example.c:(.text+0x21d): undefined reference to
ogg_stream_packetin'
encoder_example.c:(.text+0x238): undefined reference to ogg_stream_flush' encoder_example.c:(.text+0x2e4): undefined reference to
vorbis_analysis_wrote'
encoder_example.c:(.text+0x2fd): undefined reference to vorbis_analysis_buffer' encoder_example.c:(.text+0x429): undefined reference to
vorbis_analysis_wrote'
encoder_example.c:(.text+0x442): undefined reference to vorbis_analysis' encoder_example.c:(.text+0x451): undefined reference to
vorbis_bitrate_addblock'
encoder_example.c:(.text+0x46f): undefined reference to ogg_stream_packetin' encoder_example.c:(.text+0x48d): undefined reference to
ogg_stream_pageout'
encoder_example.c:(.text+0x4f7): undefined reference to ogg_page_eos' encoder_example.c:(.text+0x52b): undefined reference to
vorbis_bitrate_flushpacket'
encoder_example.c:(.text+0x54c): undefined reference to vorbis_analysis_blockout' encoder_example.c:(.text+0x571): undefined reference to
ogg_stream_clear'
encoder_example.c:(.text+0x580): undefined reference to vorbis_block_clear' encoder_example.c:(.text+0x58f): undefined reference to
vorbis_dsp_clear'
encoder_example.c:(.text+0x59e): undefined reference to vorbis_comment_clear' encoder_example.c:(.text+0x5ad): undefined reference to
vorbis_info_clear'
collect2: error: ld returned 1 exit status
I'm trying to follow the "metadata workflow" instructions at https://www.xiph.org/vorbis/doc/libvorbis/overview.html to implement tag editing. Everything seems to be working, except that the resulting files report
Negative or zero granulepos (-1) on vorbis stream outside of headers. This file was created by a buggy encoder
multiple times when checked with ogginfo.exe. I believe the issue is that the majority of data packets obtained via ogg_stream_packetout have granule positions of -1, i'm guessing because this information is only available once per page.
Now, I may be fundamentally misunderstanding the instructions, but my interpretation is that i'm supposed to init a new ogg_stream and simply pass in the packets verbatim (substituting packet 1 with my updated comments) then page_out as follows (note this is C#, just think of it as C pseudocode):
`
using (var sync = new OggSync())
{
OggPage inPage;
do
{
// Read from the buffer into a page
while (!sync.PageOut(out inPage))
{
var nativeBuffer = sync.Buffer(buffer.Length);
var bytesRead = stream.Read(buffer, 0, buffer.Length);
Marshal.Copy(buffer, 0, nativeBuffer, bytesRead);
sync.Wrote(bytesRead);
}
if (inputOggStream == null)
inputOggStream = new OggStream(SafeNativeMethods.OggPageSerialNo(ref inPage));
if (outputOggStream == null)
outputOggStream = new OggStream(inputOggStream.SerialNumber);
inputOggStream.PageIn(ref inPage);
while (inputOggStream.PacketOut(out var packet))
switch (packet.PacketNumber)
{
case 0:
outputOggStream.PacketIn(ref packet);
break;
// Substitute the new comment packet
case 1:
using (var adapter = new MetadataToVorbisCommentAdapter(metadata))
{
adapter.HeaderOut(out var commentPacket);
outputOggStream.PacketIn(ref commentPacket);
}
break;
// Flush at the end of the header
case 2:
outputOggStream.PacketIn(ref packet);
while (outputOggStream.Flush(out var outPage))
WritePage(outPage, tempStream, buffer);
break;
// Write subsequent packets verbatim
default:
outputOggStream.PacketIn(ref packet);
while (outputOggStream.PageOut(out var outPage))
WritePage(outPage, tempStream, buffer);
break;
}
} while (!SafeNativeMethods.OggPageEos(ref inPage));
// Once the end of the input is reached, overwrite the original file and return
stream.Position = 0;
stream.SetLength(tempStream.Length);
tempStream.WriteTo(stream);
}
`
Let me know if this is off the mark. I'm wondering if this just fundamentally doesn't work, and I should write the data pages out verbatim and then update the page headers with new sequence numbers and recalculate the CRCs. Seems like a hack though, so i'd appreciate guidance.
I'm building libvorbis on a platform without pkg-config, libogg is installed into /opt
Now, when I run
./configure --with-ogg=/opt
it completes successfully, as when I run
./configure --prefix=/opt
libogg is found and this is odd.
What I mean is, since --prefix tells configure the destination directory, I expect configure to fail, since in the second case I omitted the libogg needed directory. Instead, --prefix is wrongly used as search path for libogg.
Does configure.ac need some tweaking ?
Using vorbis 1.3.6, when trying to decode an example Ogg-Vorbis file from Wikipedia, it always starts reading at an offset (of 11968
samples or 0.27138321995464854s
respectively).
Setting this offset to 0
using ov_pcm_seek()
, it still reads from said offset, even though ov_pcm_tell()
still returns 0
.
When trying to read samples after seeking to 0
, the tell position suddenly jumps:
0...
1024...
2048...
3072...
4096...
5120...
6144...
7168...
8192...
9216...
22208 ; what??
Although you might not see it at first glance, but the tell function was lying to you all along.
We're reading 10 x 1024 samples, or 10240 total samples.
If you add those to the initial offset of 11968, you get (surprise) 22208.
So seek didn't do it's job and neither did tell.
The data is also read from the offset and not the beginning of the file.
Whatever I tried, I could not get vorbisfile to decode the first part of the file for some reason.
It's not broken either - I could open it with Audacity, VLC, Groove, etc.
I've also tried both ov_read
and ov_read_float
.
I can't understand why the oss-fuzz tests is removed in libvorbis-1.3.7.tar.gz from https://ftp.osuosl.org/pub/xiph/releases/vorbis/, but it remained in release from git.
Should be allocated on heap to avoid stack overflow caused by long frames?
Line 420 in 84c0236
i found a issue which is a potential vulnerability, before public who i can contact? thanks.
How can I use vorbis to encode/decode pcm stream directly.It means do not contain packet head,
It would be nice if you could merge aoTuV Encoder improvements inside xiph libvorbis.
aoTuV was extensively tested at hydrogenaud.io and found to be the best vorbis encoder.
Can you add CMakeLists to release?
It helps me alot in adding vorbis to hunter package manager
int vorbis_analysis_headerout(vorbis_dsp_state *v,
577 vorbis_comment *vc,
578 ogg_packet *op,
579 ogg_packet *op_comm,
580 ogg_packet *op_code){
581 int ret=OV_EIMPL;
582 vorbis_info *vi=v->vi;
583 oggpack_buffer opb;
584 private_state *b=v->backend_state;
585
586 if(!b||vi->channels<=0){
587 ret=OV_EFAULT;
588 goto err_out;
589 }
...
639 err_out:
640 memset(op,0,sizeof(*op));
641 memset(op_comm,0,sizeof(*op_comm));
642 memset(op_code,0,sizeof(*op_code));
643
644 if(b){
645 oggpack_writeclear(&opb);
646 if(b->header)_ogg_free(b->header);
647 if(b->header1)_ogg_free(b->header1);
648 if(b->header2)_ogg_free(b->header2);
649 b->header=NULL;
650 b->header1=NULL;
651 b->header2=NULL;
652 }
as shown above, if vi->channels<=0 and b!=NULL then func goes to err_out with opb uninitialized, but before calling oggpack_writeclear, it only check if(b),so it will ultimately free a uninitialized memory in oggpack_writeclear:
250 void oggpack_writeclear(oggpack_buffer *b){
251 if(b->buffer)_ogg_free(b->buffer);
252 memset(b,0,sizeof(*b));
253 }
This vul may lead to a DOS or Remote Code Execution in products using libvorbis 1.3.5(latest version).
By the way, I found 8 years ago this function has been found a similar vul :https://bugzilla.mozilla.org/show_bug.cgi?id=550184
while cause of no check of if b=NULL before calling oggpack_writeclear. This time , it is because of incorrect check while no considering if vi->channels<=0.
To reproduce this vul, compile libtheora 1.1.1 libvorbis 1.3.5 libogg 1.3.2 ,then run as below:
╭─root@linux-jiangxin in /home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/fuzz
╰$ gdb ../examples/encoder_example
GNU gdb (GDB) 7.9
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ../examples/encoder_example...done.
(gdb) run out/Master/crashes/id:000000,sig:06,src:000000,op:flip1,pos:22 xxx.y4m
Starting program: /home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example out/Master/crashes/id:000000,sig:06,src:000000,op:flip1,pos:22 xxx.y4m
File out/Master/crashes/id:000000,sig:06,src:000000,op:flip1,pos:22 is 16 bit 0 channel 44100 Hz RIFF WAV audio.
File xxx.y4m is 176x144 29.97 fps mono video.
*** glibc detected *** /home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example: munmap_chunk(): invalid pointer: 0x00007fffffffdb30 ***
======= Backtrace: =========
/lib64/libc.so.6(+0x76628)[0x7ffff7864628]
/home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example[0x4a4505]
/home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example[0x504090]
/home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example[0x40535d]
/lib64/libc.so.6(__libc_start_main+0xe6)[0x7ffff780cc36]
/home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example[0x40a039]
======= Memory map: ========
00400000-0063a000 r-xp 00000000 08:08 6452963 /home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example
00839000-0083a000 r--p 00239000 08:08 6452963 /home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example
0083a000-0083b000 rw-p 0023a000 08:08 6452963 /home/jiangxin/experiment/fuzz/AFL/target/libtheora-1.1.1/examples/encoder_example
0083b000-008e6000 rw-p 00000000 00:00 0 [heap]
7ffff75d7000-7ffff75ed000 r-xp 00000000 08:07 155653 /usr/local/lib64/libgcc_s.so.1
7ffff75ed000-7ffff77ec000 ---p 00016000 08:07 155653 /usr/local/lib64/libgcc_s.so.1
7ffff77ec000-7ffff77ed000 r--p 00015000 08:07 155653 /usr/local/lib64/libgcc_s.so.1
7ffff77ed000-7ffff77ee000 rw-p 00016000 08:07 155653 /usr/local/lib64/libgcc_s.so.1
7ffff77ee000-7ffff795c000 r-xp 00000000 08:07 131081 /lib64/libc-2.11.3.so
7ffff795c000-7ffff7b5b000 ---p 0016e000 08:07 131081 /lib64/libc-2.11.3.so
7ffff7b5b000-7ffff7b5f000 r--p 0016d000 08:07 131081 /lib64/libc-2.11.3.so
7ffff7b5f000-7ffff7b60000 rw-p 00171000 08:07 131081 /lib64/libc-2.11.3.so
7ffff7b60000-7ffff7b65000 rw-p 00000000 00:00 0
7ffff7b65000-7ffff7bc0000 r-xp 00000000 08:07 131089 /lib64/libm-2.11.3.so
7ffff7bc0000-7ffff7dbf000 ---p 0005b000 08:07 131089 /lib64/libm-2.11.3.so
7ffff7dbf000-7ffff7dc0000 r--p 0005a000 08:07 131089 /lib64/libm-2.11.3.so
7ffff7dc0000-7ffff7dde000 rw-p 0005b000 08:07 131089 /lib64/libm-2.11.3.so
7ffff7dde000-7ffff7dfd000 r-xp 00000000 08:07 131074 /lib64/ld-2.11.3.so
7ffff7f24000-7ffff7fc1000 rw-p 00000000 00:00 0
7ffff7fc8000-7ffff7ff8000 rw-p 00000000 00:00 0
7ffff7ff8000-7ffff7ffa000 r--p 00000000 00:00 0 [vvar]
7ffff7ffa000-7ffff7ffc000 r-xp 00000000 00:00 0 [vdso]
7ffff7ffc000-7ffff7ffd000 r--p 0001e000 08:07 131074 /lib64/ld-2.11.3.so
7ffff7ffd000-7ffff7ffe000 rw-p 0001f000 08:07 131074 /lib64/ld-2.11.3.so
7ffff7ffe000-7ffff7fff000 rw-p 00000000 00:00 0
7ffffffde000-7ffffffff000 rw-p 00000000 00:00 0 [stack]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
OggSa8W!۰ہ*theora
°u0迵@
Program received signal SIGABRT, Aborted.
0x00007ffff7820b55 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff7820b55 in raise () from /lib64/libc.so.6
#1 0x00007ffff7822131 in abort () from /lib64/libc.so.6
#2 0x00007ffff785ee0f in __libc_message () from /lib64/libc.so.6
#3 0x00007ffff7864628 in malloc_printerr () from /lib64/libc.so.6
#4 0x00000000004a4505 in oggpack_writeclear (b=b@entry=0x7fffffffda10) at bitwise.c:251
#5 0x0000000000504090 in vorbis_analysis_headerout (v=v@entry=0x7fffffffdcb0, vc=vc@entry=0x7fffffffdb50, op=op@entry=0x7fffffffdba0, op_comm=op_comm@entry=0x7fffffffdbd0, op_code=op_code@entry=0x7fffffffdc00) at info.c:645
#6 0x000000000040535d in main (argc=<optimized out>, argv=<optimized out>) at encoder_example.c:1688
(gdb) detach
besides, I have write this question in https://gitlab.xiph.org/xiph/vorbis/issues/2328 but there is no replay.
hi, I just want to test this repo so i attach ASAN during the compile phase. When i run ./vorbis_test
the ASAN detected memory leaks, is it a bug ?
==7487==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 62656 byte(s) in 22 object(s) allocated from:
#0 0x4b1ec0 in malloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
#1 0x4ff7b1 in vorbis_encode_residue_setup /home/bupt/Desktop/vorbis/lib/vorbisenc.c:463:5
#2 0x4ff7b1 in vorbis_encode_map_n_res_setup /home/bupt/Desktop/vorbis/lib/vorbisenc.c:612:7
#3 0x4ff7b1 in vorbis_encode_setup_init /home/bupt/Desktop/vorbis/lib/vorbisenc.c:828:3
SUMMARY: AddressSanitizer: 62656 byte(s) leaked in 22 allocation(s).
make distcheck
fails with:
/bin/mkdir -p '/home/erikd/Git/Audio/vorbis/libvorbis-1.3.5/_inst/share/doc/libvorbis-1.3.5'
/usr/bin/install -c -m 644 ../../../doc/rfc5215.xml ../../../doc/rfc5215.txt ../../../doc/eightphase.png ../../../doc/fish_xiph_org.png ../../../doc/floor1_inverse_dB_table.html ../../../doc/floorval.png ../../../doc/fourphase.png ../../../doc/framing.html ../../../doc/helper.html ../../../doc/index.html ../../../doc/oggstream.html ../../../doc/programming.html ../../../doc/squarepolar.png ../../../doc/stereo.html ../../../doc/stream.png ../../../doc/v-comment.html ../../../doc/vorbis-clip.txt ../../../doc/vorbis-errors.txt ../../../doc/vorbis-fidelity.html ../../../doc/components.png ../../../doc/fish_xiph_org.png ../../../doc/floor1-1.png ../../../doc/floor1-2.png ../../../doc/floor1-3.png ../../../doc/floor1-4.png ../../../doc/hufftree.png ../../../doc/hufftree-under.png ../../../doc/residue-pack.png ../../../doc/residue2.png ../../../doc/window1.png ../../../doc/window2.png ../../../doc/Vorbis_I_spec.pdf ../../../doc/Vorbis_I_spec.html ../../../doc/Vorbis_I_spec.css doxygen-build.stamp '/home/erikd/Git/Audio/vorbis/libvorbis-1.3.5/_inst/share/doc/libvorbis-1.3.5'
/usr/bin/install: will not overwrite just-created '/home/erikd/Git/Audio/vorbis/libvorbis-1.3.5/_inst/share/doc/libvorbis-1.3.5/fish_xiph_org.png' with '../../../doc/fish_xiph_org.png'
I messed about with it a bit, but wasn't making any headway.
When I do:
git -C vorbis pull 2> /dev/null || git clone --depth 1 https://git.xiph.org/vorbis.git/
...I get the following error:
fatal: dumb http transport does not support shallow capabilities
This is a huge problem as shallow cloning is the standard nowadays, and Github appears to have officially deprecated dumb cloning almost a decade ago:
https://github.blog/2011-03-09-git-dumb-http-transport-to-be-turned-off-in-90-days/
Is there any chance of this being brought up to date?
i found a issue which is a potential vulnerability, before public who i can contact? thanks.
code/libvorbis/lib/psy.c: In function ‘_vp_noisemask’: code/libvorbis/lib/psy.c:714:3: warning: ‘work’ may be used uninitialized [-Wmaybe-uninitialized] 714 | bark_noise_hybridmp(n,p->bark,work,logmask,0., | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 715 | p->vi->noisewindowfixed); | ~~~~~~~~~~~~~~~~~~~~~~~~ code/libvorbis/lib/psy.c:543:13: note: by argument 3 of type ‘const float *’ to ‘bark_noise_hybridmp’ declared here 543 | static void bark_noise_hybridmp(int n,const long *b, | ^~~~~~~~~~~~~~~~~~~
work_os
declared: https://github.com/xiph/vorbis/blob/master/lib/vorbisfile.c#L1232
goto seek_error
: https://github.com/xiph/vorbis/blob/master/lib/vorbisfile.c#L1257
ogg_stream_init work_os
: https://github.com/xiph/vorbis/blob/master/lib/vorbisfile.c#L1284
ogg_stream_clear work_os
: https://github.com/xiph/vorbis/blob/master/lib/vorbisfile.c#L1395
ogg_stream_clear
tries to free data from junk pointer: https://github.com/xiph/ogg/blob/master/src/framing.c#L223
Clang's sanitizers complain about bitshifting of negative values on 64-bit Ubuntu Linux:
1:
libvorbis/src/floor1.c:840:24: runtime error: left shift of negative value -2
#0 0x7f34f64c3eb1 in floor1_encode libvorbis/src/floor1.c
#1 0x7f34f650acd0 in mapping0_forward libvorbis/src/mapping0.c:625:20
#2 0x7f34f64b0035 in vorbis_analysis libvorbis/src/analysis.c:47:11
Fix:
libvorbis/src/floor1.c:
- val=-1-(val<<1);
+ val=-1-(val*2);
2:
libvorbis/src/psy.c:320:24: runtime error: left shift of negative value -11
#0 0x7fdfedcec8b5 in _vp_psy_init libvorbis/src/psy.c:320:24
#1 0x7fdfedcfc87b in _vds_shared_init libvorbis/src/block.c:225:7
#2 0x7fdfedcfbf6d in vorbis_analysis_init libvorbis/src/block.c:298:6
Fix:
libvorbis/src/psy.c:
- p->bark[i]=((lo-1)<<16)+(hi-1);
+ p->bark[i]=((lo-1)*65536)+(hi-1);
and probably from linux to windows as said here
ffcd784
cmake 3.10.3 / ndk 21 on github actions with ubuntu-latest
== CI vorbis: now in pre-crosscompile ==
* building vorbis for target armv7a-linux-androideabi
CMake Error at /home/runner/work/pydk/pydk/aosp/lib/python3.6/site-packages/cmake/data/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Ogg (missing: OGG_LIBRARY OGG_INCLUDE_DIR) (found version
"1.3.4")
Call Stack (most recent call first):
/home/runner/work/pydk/pydk/aosp/lib/python3.6/site-packages/cmake/data/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/FindOgg.cmake:73 (find_package_handle_standard_args)
CMakeLists.txt:65 (find_package)
ERROR vorbis
Command exited with non-zero status 1
500.89user 49.47system 7:18.85elapsed 125%CPU (0avgtext+0avgdata 640260maxresident)k
270640inputs+1353592outputs (2454major+18074389minor)pagefaults 0swaps
##[error]Process completed with exit code 1.```
cmake --DOGG_ROOT=/usr/local/
FindOgg.cmake:
if(OGG_INCLUDE_DIR)
# Already in cache, be silent
set(OGG_FIND_QUIETLY TRUE)
endif()
find_package(PkgConfig QUIET)
pkg_check_modules(PC_OGG QUIET ogg)
set(OGG_VERSION_STRING ${PC_OGG_VERSION})
message(${OGG_ROOT})
find_path(OGG_INCLUDE_DIR ogg/ogg.h
HINTS
${PC_OGG_INCLUDEDIR}
${PC_OGG_INCLUDE_DIRS}
${OGG_ROOT}
PATH_SUFFIXES
include
)
message(${OGG_INCLUDE_DIR})
# MSVC built ogg may be named ogg_static.
# The provided project files name the library with the lib prefix.
find_library(OGG_LIBRARY
NAMES
ogg
ogg_static
libogg
libogg_static
HINTS
${PC_OGG_LIBDIR}
${PC_OGG_LIBRARY_DIRS}
${OGG_ROOT}
PATH_SUFFIXES
lib
)
# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
# to TRUE if all listed variables are TRUE.
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Ogg
REQUIRED_VARS
OGG_LIBRARY
OGG_INCLUDE_DIR
VERSION_VAR
OGG_VERSION_STRING
)
if(OGG_FOUND)
set(OGG_LIBRARIES ${OGG_LIBRARY})
set(OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
if(NOT TARGET Ogg::ogg)
add_library(Ogg::ogg UNKNOWN IMPORTED)
set_target_properties(Ogg::ogg PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}"
IMPORTED_LOCATION "${OGG_LIBRARIES}"
)
endif()
endif()
mark_as_advanced(OGG_INCLUDE_DIR OGG_LIBRARY)
output:
/usr/local/
OGG_INCLUDE_DIR-NOTFOUND
CMake Error at /usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find Ogg (missing: OGG_LIBRARY OGG_INCLUDE_DIR)
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
cmake/FindOgg.cmake:77 (find_package_handle_standard_args)
CMakeLists.txt:70 (find_package)
# ls /usr/local/include/ogg
config_types.h ogg.h os_types.h
# ls /usr/local/lib
cmake libogg.a libopus.a pkgconfig python3.10
the "/usr/local" has libogg and ogg.h ,but can't find ogg
Making a vorbis resampler just like the speex one will make a better resampler so why aren't we making one
Does v1.3.6 address CVE-2017-14160 https://gitlab.xiph.org/xiph/vorbis/issues/2330?
Hello,
I've been using ogg and vorbis for a while. Recently, I have packaged them with conan, an open source C/C++ package manager and placed the packages on bintray:
https://bintray.com/dimi309/conan-packages/ogg%3Adimi309
https://bintray.com/dimi309/conan-packages/vorbis%3Adimi309
I hope you don't mind :)
The packages are in the process of being evaluated for inclusion into a curated repository on bintray, which is to only contain good quality conan packages. I am writing to ask you if you would be interested in maintaining the packages directly. I can provide you with the packaging code (actually, you can just copy it, since it's open source) or even introduce a pull request with some non-intrusive changes that would allow you to package them directly from the main ogg and vorbis repositories.
On these lines https://github.com/xiph/vorbis/blob/master/lib/vorbisfile.c#L1009-L1017. Had to add an additional method on windows.
#ifdef _WIN32
int ov_wfopen(const wchar_t *path, OggVorbis_File *vf)
{
int ret;
FILE *f = _wfopen(path, L"rb");
if (!f)
return -1;
ret = ov_open(f, vf, NULL, 0);
if (ret)
fclose(f);
return ret;
}
#endif
MSVC displayed following error when I tried to build vorbis with CMake.
vorbis\test\util.c(37,41): error C2065: "M_PI": undeclared identifier
MSVC seems to require #define _USE_MATH_DEFINES
before #include <math.h>
to use M_PI
.
Build succeeded once I add it to L16.
In the section 8.6.1 of the Vorbis I specification it is mentioned how to read the residue_begin
and residue_end
for a residue configuration in the setup header. However, as far as I am aware the specification does not mention that any of these values should be validated in any way.
When decoding an audio packet that uses this residue configuration, as described in section 8.6.2, n_to_read
would be a subtraction with overflow when using unsigned integers if residue_begin
> residue_end
, or yield a negative value if using signed 32-bit arithmetic.
I think that to ensure that implementations are as interoperable as possible the specification should mention how to deal with this edge case. The reference implementation in this repository uses signed 32-bit integers in most places, so n_to_read
would be negative and probably interpreted as "nothing to read", but I haven't looked into it.
I've stumbled upon this edge case while fuzzing a Vorbis stream manipulation program.
Hi, I found a potential null pointer dereference bug in the project source code of vorbis, and I have shown the execution sequence of the program that may generate the bug on the graph below. The red text illustrates the steps that generate the bug, the red arrows represent the control flow,the file path can be seen in the blue framed section.
Although the code shown is for version 1.3.6 but is still exist in current version
Lines 898 to 902 in 84c0236
would you can help to check if this bug is true?thank you for your effort and patience!
Using CMake you get Makefile.* in target docs directory
Tested on FreeBSD 13
vorbis master branch, commit 4e1155c
I am building this on an arm mac though I am using a rosetta based terminal so am building for x86_64.
I run the following commands
./autogen.sh
./configure --prefix=<build_dest> --with-ogg=<ogg 1.3.5 install location>
make
and I get the following error message:
CC test_sharedbook-sharedbook.o
CCLD test_sharedbook
ld: unknown options: -force_cpusubtype_ALL
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [test_sharedbook] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I have a build environment on Linux cross-compiling for macOS.
I have built and installed Ogg.
I have checked out tags/v1.3.7
from a clean git clone of https://github.com/xiph/vorbis.git
.
I have run ./autogen.sh
and ./configure
.
./autogen.sh && ./configure --build=x86_64-pc-linux-gnu --host=x86_64-apple-darwin15 --prefix=/opt/ffbuild --disable-shared --enable-static
When I make
I get the following errors:
In file included from analysis.c:20:
In file included from /opt/ffbuild/include/ogg/ogg.h:24:
/opt/ffbuild/include/ogg/os_types.h:75:12: error: unknown type name 'uint16_t'
typedef uint16_t ogg_uint16_t;
^
/opt/ffbuild/include/ogg/os_types.h:77:12: error: unknown type name 'uint32_t'
typedef uint32_t ogg_uint32_t;
^
/opt/ffbuild/include/ogg/os_types.h:79:12: error: unknown type name 'uint64_t'
typedef uint64_t ogg_uint64_t;
^
3 errors generated.
Full output of ./configure and make is below:
Updating build configuration files for vorbis, please wait....
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:60: installing './compile'
configure.ac:14: installing './config.guess'
configure.ac:14: installing './config.sub'
configure.ac:16: installing './install-sh'
configure.ac:16: installing './missing'
examples/Makefile.am: installing './depcomp'
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-apple-darwin15
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for x86_64-apple-darwin15-strip... /opt/osxcross/target/bin/x86_64-apple-darwin15-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking for x86_64-apple-darwin15-gcc... /opt/osxcross/target/bin/x86_64-apple-darwin15-cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /opt/osxcross/target/bin/x86_64-apple-darwin15-cc accepts -g... yes
checking for /opt/osxcross/target/bin/x86_64-apple-darwin15-cc option to accept ISO C89... none needed
checking whether /opt/osxcross/target/bin/x86_64-apple-darwin15-cc understands -c and -o together... yes
checking for style of include used by make... GNU
checking dependency style of /opt/osxcross/target/bin/x86_64-apple-darwin15-cc... gcc3
checking how to run the C preprocessor... /opt/osxcross/target/bin/x86_64-apple-darwin15-cc -E
checking for inline... inline
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by /opt/osxcross/target/bin/x86_64-apple-darwin15-cc... /opt/osxcross/target/bin/x86_64-apple-darwin15-ld
checking if the linker (/opt/osxcross/target/bin/x86_64-apple-darwin15-ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /opt/osxcross/target/bin/x86_64-apple-darwin15-nm
checking the name lister (/opt/osxcross/target/bin/x86_64-apple-darwin15-nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-apple-darwin15 format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /opt/osxcross/target/bin/x86_64-apple-darwin15-ld option to reload object files... -r
checking for x86_64-apple-darwin15-objdump... /opt/osxcross/target/bin/x86_64-apple-darwin15-ObjectDump
checking how to recognize dependent libraries... pass_all
checking for x86_64-apple-darwin15-dlltool... /opt/osxcross/target/bin/x86_64-apple-darwin15-dlltool
checking how to associate runtime and link libraries... printf %s\n
checking for x86_64-apple-darwin15-ar... /opt/osxcross/target/bin/x86_64-apple-darwin15-ar
checking for archiver @FILE support... no
checking for x86_64-apple-darwin15-strip... (cached) /opt/osxcross/target/bin/x86_64-apple-darwin15-strip
checking for x86_64-apple-darwin15-ranlib... /opt/osxcross/target/bin/x86_64-apple-darwin15-ranlib
checking command to parse /opt/osxcross/target/bin/x86_64-apple-darwin15-nm output from /opt/osxcross/target/bin/x86_64-apple-darwin15-cc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for x86_64-apple-darwin15-mt... no
checking for mt... mt
configure: WARNING: using cross tools not prefixed with host triplet
checking if mt is a manifest tool... no
checking for x86_64-apple-darwin15-dsymutil... x86_64-apple-darwin15-dsymutil
checking for x86_64-apple-darwin15-nmedit... x86_64-apple-darwin15-nmedit
checking for x86_64-apple-darwin15-lipo... x86_64-apple-darwin15-lipo
checking for x86_64-apple-darwin15-otool... x86_64-apple-darwin15-otool
checking for x86_64-apple-darwin15-otool64... no
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if /opt/osxcross/target/bin/x86_64-apple-darwin15-cc supports -fno-rtti -fno-exceptions... yes
checking for /opt/osxcross/target/bin/x86_64-apple-darwin15-cc option to produce PIC... -fno-common -DPIC
checking if /opt/osxcross/target/bin/x86_64-apple-darwin15-cc PIC flag -fno-common -DPIC works... yes
checking if /opt/osxcross/target/bin/x86_64-apple-darwin15-cc static flag -static works... no
checking if /opt/osxcross/target/bin/x86_64-apple-darwin15-cc supports -c -o file.o... yes
checking if /opt/osxcross/target/bin/x86_64-apple-darwin15-cc supports -c -o file.o... (cached) yes
checking whether the /opt/osxcross/target/bin/x86_64-apple-darwin15-cc linker (/opt/osxcross/target/bin/x86_64-apple-darwin15-ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin15 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking GCC version... 4.2.1
checking if /opt/osxcross/target/bin/x86_64-apple-darwin15-cc accepts -Wdeclaration-after-statement... yes
checking for memory.h... (cached) yes
checking for cos in -lm... yes
checking for pthread_create in -lpthread... yes
checking pkg-config is at least version 0.9.0... yes
checking for OGG... yes
checking for size_t... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for working memcmp... no
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating m4/Makefile
config.status: creating lib/Makefile
config.status: creating lib/modes/Makefile
config.status: creating lib/books/Makefile
config.status: creating lib/books/coupled/Makefile
config.status: creating lib/books/uncoupled/Makefile
config.status: creating lib/books/floor/Makefile
config.status: creating doc/Makefile
config.status: creating doc/vorbisfile/Makefile
config.status: creating doc/vorbisenc/Makefile
config.status: creating doc/libvorbis/Makefile
config.status: creating doc/Doxyfile
config.status: creating include/Makefile
config.status: creating include/vorbis/Makefile
config.status: creating examples/Makefile
config.status: creating test/Makefile
config.status: creating vq/Makefile
config.status: creating libvorbis.spec
config.status: creating vorbis.pc
config.status: creating vorbisenc.pc
config.status: creating vorbisfile.pc
config.status: creating vorbis-uninstalled.pc
config.status: creating vorbisenc-uninstalled.pc
config.status: creating vorbisfile-uninstalled.pc
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
make all-recursive
make[1]: Entering directory '/opt/ffbuild/src/vorbis'
Making all in m4
make[2]: Entering directory '/opt/ffbuild/src/vorbis/m4'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/ffbuild/src/vorbis/m4'
Making all in include
make[2]: Entering directory '/opt/ffbuild/src/vorbis/include'
Making all in vorbis
make[3]: Entering directory '/opt/ffbuild/src/vorbis/include/vorbis'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/opt/ffbuild/src/vorbis/include/vorbis'
make[3]: Entering directory '/opt/ffbuild/src/vorbis/include'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/opt/ffbuild/src/vorbis/include'
make[2]: Leaving directory '/opt/ffbuild/src/vorbis/include'
Making all in vq
make[2]: Entering directory '/opt/ffbuild/src/vorbis/vq'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/opt/ffbuild/src/vorbis/vq'
Making all in lib
make[2]: Entering directory '/opt/ffbuild/src/vorbis/lib'
Making all in modes
make[3]: Entering directory '/opt/ffbuild/src/vorbis/lib/modes'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/opt/ffbuild/src/vorbis/lib/modes'
Making all in books
make[3]: Entering directory '/opt/ffbuild/src/vorbis/lib/books'
Making all in coupled
make[4]: Entering directory '/opt/ffbuild/src/vorbis/lib/books/coupled'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/opt/ffbuild/src/vorbis/lib/books/coupled'
Making all in uncoupled
make[4]: Entering directory '/opt/ffbuild/src/vorbis/lib/books/uncoupled'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/opt/ffbuild/src/vorbis/lib/books/uncoupled'
Making all in floor
make[4]: Entering directory '/opt/ffbuild/src/vorbis/lib/books/floor'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/opt/ffbuild/src/vorbis/lib/books/floor'
make[4]: Entering directory '/opt/ffbuild/src/vorbis/lib/books'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/opt/ffbuild/src/vorbis/lib/books'
make[3]: Leaving directory '/opt/ffbuild/src/vorbis/lib/books'
make[3]: Entering directory '/opt/ffbuild/src/vorbis/lib'
CC mdct.lo
CC smallft.lo
CC block.lo
CC envelope.lo
CC window.lo
CC lsp.lo
CC lpc.lo
CC analysis.lo
CC synthesis.lo
In file included from analysis.c:20:
In file included from /opt/ffbuild/include/ogg/ogg.h:24:
/opt/ffbuild/include/ogg/os_types.h:75:12: error: unknown type name 'uint16_t'
typedef uint16_t ogg_uint16_t;
^
/opt/ffbuild/include/ogg/os_types.h:77:12: error: unknown type name 'uint32_t'
typedef uint32_t ogg_uint32_t;
^
/opt/ffbuild/include/ogg/os_types.h:79:12: error: unknown type name 'uint64_t'
typedef uint64_t ogg_uint64_t;
^
3 errors generated.
Makefile:623: recipe for target 'analysis.lo' failed
make[3]: *** [analysis.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
In file included from synthesis.c:18:
In file included from /opt/ffbuild/include/ogg/ogg.h:24:
/opt/ffbuild/include/ogg/os_types.h:75:12: error: unknown type name 'uint16_t'
typedef uint16_t ogg_uint16_t;
^
/opt/ffbuild/include/ogg/os_types.h:77:12: error: unknown type name 'uint32_t'
typedef uint32_t ogg_uint32_t;
^
/opt/ffbuild/include/ogg/os_types.h:79:12: error: unknown type name 'uint64_t'
typedef uint64_t ogg_uint64_t;
^
3 errors generated.
Makefile:623: recipe for target 'synthesis.lo' failed
make[3]: *** [synthesis.lo] Error 1
make[3]: Leaving directory '/opt/ffbuild/src/vorbis/lib'
make[2]: *** [all-recursive] Error 1
Makefile:656: recipe for target 'all-recursive' failed
make[2]: Leaving directory '/opt/ffbuild/src/vorbis/lib'
make[1]: *** [all-recursive] Error 1
Makefile:530: recipe for target 'all-recursive' failed
make[1]: Leaving directory '/opt/ffbuild/src/vorbis'
Makefile:406: recipe for target 'all' failed
make: *** [all] Error 2
@stopiccot Can you add a script to verify the cmake build to the test directory? Would be nice to catch problems with it in jenkins/travis.
Hi, please can you update the sum files with new versions of vorbis?
https://ftp.osuosl.org/pub/xiph/releases/vorbis/ ← all sums are missing the latest release
Thanks in advance.
README.md says you can build vorbis from master like this:
./autogen.sh
./configure
make
However, autogen.sh
already runs configure
at the end:
...
$srcdir/configure --enable-maintainer-mode "$@" && echo
From microsoft/vcpkg#941:
Removes symbol duplication in vorbis.dll and vorbisenc.dll - upstream has a bug in which vorbis.def contains symbols of vorbisencmodule. Original port solved this by embedding related symbols in vorbis.dllbut that caused several functions to be defined in (and exported from) both modules. Now these symbols are simply removed from vorbis.def.
To fix this, the following symbols need to be removed from vorbis.def:
vorbis_encode_init
vorbis_encode_setup_managed
vorbis_encode_setup_vbr
vorbis_encode_init_vbr
vorbis_encode_setup_init
vorbis_encode_ctl
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.