From: Good Guy Date: Sat, 2 Feb 2019 20:52:10 +0000 (-0700) Subject: remove file ogg/vorbis X-Git-Tag: 2019-08~114 X-Git-Url: https://git.cinelerra-gg.org/git/?a=commitdiff_plain;h=f4204ea29aa3760a91c10791944ab848dd74ef8c;p=goodguy%2Fcinelerra.git remove file ogg/vorbis Makefile clean tweak fixes shuttle focus/99rules file ydiff ffmpeg tweak upgrade fftw,opus,ogg,vorbis,tiff,x265,openjpeg add vcodecs av1,webp new options files: av1,webp,jp2 delete old CHANGELOGS --- diff --git a/cinelerra-5.1/cinelerra/CHANGELOG b/cinelerra-5.1/cinelerra/CHANGELOG deleted file mode 100644 index 2637a5d2..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG +++ /dev/null @@ -1,1365 +0,0 @@ -11/7/01 - -Mask feathering and value implemented. Crash bug in -CWindowMaskGUI::get_keyframe fixed. - - - - - -11/22/01 - -Removed memory leak in VirtualConsole. Another case of base destructor -calling base methods only. - -Time average finally implemented. Deinterlace implemented. - -Translation in screencapture recording implemented. - -AVI parameter editing box. - -Drag and drop of assets during an index build doesn't lock up. -Dragging mixtures of audio and video works better. Better handling of -shared effects which are off. - -Batches can be moved up and down the list. - - - - - -12/6/01 - -OpenDIVX debugging: - -Fixed bugs in decore2: *run = *last = -1; was not copied over from -encore50. - -Rewrote bitstream parser in encore2 and decore2 to be more reliable. - -Disabled MMX due to crashes in Redhat 7.2. - -Discovered decore2 can't do P frames so switched back to decore50. - -Renamed header files, symbols to all -in the same program. - -Renamed more symbols in mpeg2enc to coexist with opendivx. - -To make encore2 work on 64 bit processors: - -Typecasted offsets in CompensateBlock and get_ref to (int) - -Decore50 still not functional on 64 bit processors. - - - - -Implemeneted PNG list output. Debugged list output and input. - -Configuration dialog for OpenDivx in Cinelerra migrated from encore50 -to encore2. - -Configuration dialog for Vorbis and Vorbis export to Quicktime. - -Can use shift-R to render. - -DV encoding implemented. The last libdv library only supported MMX and -B&W. - - - - -12/16/01 - -Moved all OpenDivx support to the encore50 derivative of the encoder. -This appears to do everything that the encore2 derivative could do at -equal or lesser reliability. - -Changed bmp argument for decore50 to 3 member array. Added quant -argument which, when set to nonzero, fixes the quantization. OpenDivx -with fixed quantization looks 33% better than MPEG-2. - -Direct copy rendering for OpenDivx so output of the renderfarm can be -direct copied into a single file. - -Moved all theme support into a plugin. Resources are no longer -compiled in but concatenated to the binaries. This made compilation -take less time and should theoretically allow more themes to be -supported without increasing resident set size. - -Made ports specific to each render node instead of global. This way -multiple Cinelerra clients can run on the same box without violating -the single thread requirement of new libraries. - -Cinelerra daemon forks to background. Made assets export more -compression parameters to render nodes. - -Vorbis decoding in Quicktime without seeking. The encoding is probably -not going to change anymore but Vorbis doesn't appear seekable. No-one -is going to use OpenDivx and Vorbis without an endorsement from -Microsoft anyway. - - - - - - - -12/22/01 - -Seeking support for Quicktime/Vorbis. Support for Vorbis on 64 bit -processors. Further debugging of Divx. Quality of 6 yields errors in -output. Quality of 5 seems to be the maximum. Changed fourcc from -VBIS to OggS for vorbis. - -To make Vorbis work on 64 bit processors: - -change sizeof(int) to sizeof(int*) in lib/floor1.c: 263 - -Menu effects can paste into the timeline. - -Changes in label handling when pasting resources. - -Statusbar and zoombar resizing restored. - -Implemented code to move plugin sets up and down a level. - -Improved table of contents support for libmpeg3. This scans every byte -of the mpeg files and records the location of every keyframe and every -sample of audio. The table of contents can then be loaded by -Cinelerra, allowing frame accurate editing from mpeg source material. - -A memory allocation bug in the Linux kernel crashes the system when -using mpeg3toc on DVD's so forget about transcoding Starwars on a -render farm. Don't know who discovered that either. - - - - - - - -12/28/01 - -Ignored the warnings and set -ieee for all files in quicktime to fix -floating point exceptions. This made it twice as slow but it worked. - -Floating point exceptions in the following places were fixable with -certain changes: - -vorbis_lpc_predict -> A return statement before anything is done. -bark_noise_pointmp -> noise[i] could be set to 0 -bark_noise_hybridmp -> noise[i] could be set to 0 - -Defining VORBIS_IEEE_FLOAT32 seemed to fix mapping0 crashes so the -preceeding changes were backed out. - -Loading XML files with multiple video tracks works better. - -Linux 2.4.17 handles DVD table of contents operations better but -crashes after 5 hours of reading a DVD. You'll have to reboot often to -control memory corruption. - - - - - - - -1/4/02 - -Credit for official Microsoft software even though there isn't any -official Microsoft software. - -Records to DV again but not under kernels after 2.4.7. - -New audio effects: -Tone generator -Reverse audio -Delay audio - -3rd attempt to improve main window scrollbars. - - - - - - -1/11/02 - -New video effects: -Delay video -Reverse video -Swap channels - -New audio effects: -Denoise -Parametric EQ using fast fourier transform. This isn't standard but -it gives real gaussian curves. -Spectrogram -Time stretch -Resample -Pitch shift - -Frequency table expanded in Units. This uses real 1/3 octave steps. - -Flipped U and V in opendivx encoder so it conforms to YUV order on -disk. - -Reconfiguration during audio rendering reenabled. - -Constitutive reconfiguration for video turned off. This was used to -debug the memory leaks. - -Icon for Normalize. Tone generator improvement. - - - - - -1/18/02 - -New audio effects: -Compressor - - -New video effects: -Denoise -Frame to field conversion -Field to frame conversion -Reframe - -Video denoise uses the average of an arbitrary number of previous -frames to predict what the value for the next frame should be. This -can also be used as a threshold effect or a time average. - -Optimized time average. - - - - -1/25/02 - -Plugin keyframes loaded from XML. -Correct rendering of plugin keyframes. Some plugins interpolate. -Most plugin GUI's update when insertion point is moved among keyframes. -Plugin keyframes draw when created. -Cursor jumps to plugin keyframes when selected. -Samplerate adjustable in all media info windows. -Samplerate and framerate adjustments not overridden when loaded in an EDL. -Improved fade automation rendering. - -New video effects: -Oil painting -Whirl/pinch -Polar -Rotation -Waves -Waveform/Vectorscope -Hue/Saturation -YUV adjustment -Invert video - -New audio effect: -Invert audio - - - - - - - -2/1/02 - -Progress windows really cancel instead of just letting you press the -button. -Status bar shows how long something took when it finishes. -Removed Send and Recieve options from effects. It was never needed and it -complicated the use of variable track sizes. - -First stage of making width and height specific to tracks and renamed -projector size to canvas size. -More interpolation for effects. -Second stage of titler. - - - - - - -2/8/02 -Pasting effect keyframes works better. -Improved extension and contraction of effects during clear and paste. -Automation for more effects. -Effect keyframe behavior is more predictable. -For a good time enable auto keyframes and type stuff into the titler while playing back. -Clearing VFrames clears the alpha too. -Added a tests directory and stored some test EDLs. -Blur can selectively blur single channels -Effects can be attached to tracks with no data via a popup menu finally. -Plugin GUI's are more often updated when tracks are deleted. - -Final stage of titling implementation. -Chromakey and lumakey - - - -2/15/02 -Effects more accurately follow edits while cutting and pasting. -More accurate keyframing in effects. -Video Transitions restored. -Audio transitions enabled. -Transition length inputted in seconds. -Stepped up the number of previous files displayed. -Option to disable tracks when no edits was removed. The VConsole automatically -detects when effects synthesize material. -Independant track sizes can now be changed with a popup menu. -Renderfarm more accurately calculates balanced loads. -Disabled avifile to reduce the debugging noise. -Removed memory leak from Quicktime MPEG-4 decoder. -Slightly optimized resource window updates after loading. - -Linux 2.4.17 crashes probably because Cinelerra moves too much memory -around. We disabled kswapd by putting a return 0; in -/usr/src/linux/mm/vmscan.c. The operating system seems more stable now. - -Enabled deletion of assets and clips from the project. Also can delete -assets from disk. -Rebuild indices should handle multiple indices if selected. - -Rectangle selection in asset window. The heroine background was -lightened but mind you, the heroine background is a permanent feature. - -Latest seeking issue fixed in libmpeg3. Looking for ways to shift -audio based on the pts. -Compositor window tumblers work better. -More verbose overlays for camera, projector, and output regions, making -it easier to visualize the compositing pipeline. -Easier to use magnifying glass. -Middle mouse button dragging in CWindow works. - - -new video transitions: -bandslide -bandwipe -slide -wipe -irissquare - - - - - - - -2/22/02 - -Implemented another MPEG-2 bitrate control algorithm. YUV 4:2:2 MPEG-2 -in fixed bitrate modes above 7000000 is recommended for DV footage for -now. - -Assets and effects are now sortable in the Resource window. Text -displays aren't corrupted as much. - -Certain EDL load operations honor the labels follow edits setting and -certain load operations insert labels constitutively. - -Width and height of tracks load properly. Adjustments to track width -and height render more often. - -Playback automation always restored from undos. - -Improved tracking when every frame is played. Smooth scrolling during -playback is now supported. - -Right mouse button doesn't activate selection rectangles anymore. -AVIFile disabled since it doesn't support GCC 3.0 anymore. -More reliable reading of individual image files. -More accurate rendering of fade automation. -More accurate tracking during playback. -Deinterlace with average works. -Certain edit operations from CWindow don't lock up the MWindow anymore. -CWindow scrollbars updatge after loading. -Track canvas after In/Out point dragging is properly refreshed. -Cursor motion over keyframes doesn't force rendering as often. - - - - - - -3/1/02 - -In/Out clearing crashes less and works better. - -Removed IPC modeled semaphores. Now no IPC stubs are left after a crash. - -Rendering nodes and recording batches can be individually toggled. - -Buz driver refurbished. No longer requires kernel hacks to change channels. - -Motion JPEG compression library debugged further. Less corruption. - -Playback through Buz driver enabled. Now adjust color correction and see -it on a monitor. - -Playback of video through Firewire implemented. Still not functional. - -YUV 4:2:0 Planar -> YUV 4:2:2 Planar color conversion - -Renderengine retools the playback configuration for every command instead of -every EDL change. - -Integrated IA-32 assembly language jpeg library. - - - - - - - -3/15/02 - -Enabled assembly language routines in jpeg library. Added swap fields -option to Buz output driver. - -YUV overlay reenabled. Only works on commercial NVidia drivers. - -Libmpeg3 reads transport streams again. - -Dissolve debugged further. - -Moving out guicast images. Implementing defaulttheme and microtheme. - - - - - - - - - - - - -3/22/02 - -Consolidated audio and video settings into a format dialog. -Made XVideo a separate driver. -Continued improvements of defaulttheme. -Draws MWindow BG and copies top background instead of several MWindow drawing calls. - - - - - - - - - - - - - -4/5/02 - -Re-enabled configurable preloading in Quicktime since moov atoms larger -than 2 M were setting the preload too high. - -Frame to field copies two fields into the output instead of line -doubling one field. - -Tightened synchronization during recording startup. - -CWindow and VWindow timebars implemented. -Timebars in CWindow and VWindow allow a region to be selected for -previewing. - -Debugged configuration updates in Synthesizer and Parametric EQ. - -Extra redundancies in the jpeg library enabled to get IA-32 assembly -working. - -Time average is absolute. - -Keybindings and icons for In/Out points changed. - -Bezier keyframes less than 10 frames apart don't freeze the CWindow. - -Clearing puts the cursor at the in point when using in/out points. - -Camera translation from the exact top of a frame to less than the full -height really translates instead of squishing. - -Reenabled background_pixmap in TrackCanvas to allow faster overlay drawing. - -Loading non-XML files doesn't change the output width and height -anymore. This allows VWindow to change sources without reverting the -output size. - -Loop region loads right. - -Pan images aren't corrupted anymore. - -Clips created when no region is selected take the entire EDL now. - -Parametric EQ reenabled. - -Shared effects work again when deleted. - -Multiple effects per effect row load properly again. - -Jumping to next and prev label from CWindow doesn't lock up when playing back. - -Instead of synchronizing the absolute position of each fader, the gang -option now changes the relative position of each fader. - -Slider tooltips always update before being shown instead of showing -obsolete data. - -Got rid of next record label in RecordGUI. Labels set while recording -are finally inserted in the timeline. The 'l' key triggers a label -when recording. - -Busy wait removed from repeater finally. -Prepared settings menu for addition of plugin editing option. - -Began first stage of Microsoft AVI importer for Quicktime. - - - - - - -4/19/02 - -AVI decoding of official Microsoft MPEG-4 and mp3. -Second debugging pass for BC_Repeater. -23.976 framerate put in place of 24.976 framerate. -Synthesizer locks up less. -Libmpeg3 needs only 1 include path instead of 5000. -MPEG audio decoding 75% reimplemented for use in Quicktime. -AC3 reimplemented using liba52. -The mpeg3_layer_t structure handles mp2 and mp3 decoding separate -from libmpeg3 on a frame basis. -The mpeg3_ac3_t structure handles ac3 decoding on a frame basis. -The mpeg3_pcm_t handles pcm decoding. PCM is repacketized by the demuxer. - -Zoombar clamps more selection values. - - - - - - -5/3/02 - -Microsoft MPEG-4 and MP3 encoding in Quicktime, AVI edition. - 100% Readable by Cinelerra and Xine but not by Microsoft. - Either audio or video plays back in Windows but not both. -Several Quicktime frame rates changed to double. -CWindow scrollbars updated on startup. -Another pass through scrollbar appearance. -New option to make effects follow edits. -Preview range updated more often in CWindow. -Another pass through listbox appearance. -Track cursor redrawn more frequently. -XMovie merged with new theme. -MPEG audio debugging pass 1. -Got rid of AVIFile and obsolete ffmpeg copy. - - - - - - - - - - - -5/10/02 - -Better handling of non-existent files in edit lists and renderfarms. -Hopefully better reporting of errors with the renderfarm. -Debugged percentage seeking in mpeg3audio. -Vorbis rc3 doesn't encode without crashing. Downgraded to vorbis rc2. -JPEG exporting in AVI. -More codec checking in AVI and Quicktime export. -Paste assets from AWindow doesn't lock up as much. -Faders not visible in the patchbay should now be gangable. -Debugged YUV compositing algorithms. -New RGBA -> YUV 16 bit conversions. -Selecting labels during playback in CWindow doesn't lock up. -Rewind and end in CWindow and VWindow do something again. -Playing from the VWindow after loading from XML doesn't crash as much. -Localsession needs to initialize everything in its constructor. -Paste from one samplerate to another isn't corrupted as much. Samplerate conversion in paste_edls. - -MICROSOFT mouse wheel adjusts all scrollbars, sliders, pots, and -tumblers, perfect for fine adjustments and zooming. In CWindow and -VWindow it performs frame advance. - -Mix2000 update for mouse wheel. - - - - - -5/17/02 - -Pulling the official MICROSOFT mouse wheel back zooms out the CWindow -when using the zoom tool. - -Brought back the last reflection level in Heroine College Concert Hall -since backwards reverb seems to be popular. - -Paste automation resampling implemented. - -Splice and overwrite debugged. Paste_edls doesn't change the VWindow -source during splice and overwrite. Splice inserts before the in_point -and ignores the out_point. Overwrite erases between in_point and -out_point. - -Dragging asset into VWindow updates the timebar. - -Shifting effect handles works better. Disabled checks not important to -effects. - -TIFF and TGA I/O with image sequences. - -Reenabled alpha blending. - -Got rid of row_table[i] reference in cmodel_permutation output subscript. - -Decompression of YUV 4:4:4 JPEG. - - - - - - - -6/10/02 - -New option to disable thumbnails in AWindow. -Shift right handle out doesn't shift keyframes before it. -Waveform drawn more often after undo load. -Confirmation box for quit. -Quit really quits instead of crashing and looking like it quit. -MP3 decoding hacks to skip JPEG images without parsing ID3 tags. -Changing track titles redraws overlays. -Window is renamed after replacing project. - -Shrank threshold in equivalency tests. It was catching the wrong -in/out points. - -Made FloatAutos store bezier curve information. - -Got rid of full duplex record options. Since modern sound drivers -allow single devices to be opened twice this is more easily done by -starting playback on the timeline manually when recording. - -Plugin titles updated when track titles change. -Create clip with just in or out point creates something of positive length. -Create clip with no in or out point takes the entire length in VWindow. -Labels enabled in VWindow. -Overwrite doesn't shift effects or labels. -Overwrite overwrites the region between in and out of in and out are different -but overwrites its own length if in and out are identical. - -Shifting out point in doesn't delete transitions. - -Paste should extend effects when the clipboard has no effects and should -overwrite effects when the clipboard has effects. - -Labels are undone during undo after paste. -Video tracks are added to the top of the stack while audio tracks are added -to the bottom of the stack. - -Dragging an effect from one track to a zero length track retains the length -of the effect instead of crashing. - -Dragging an effect from the Resource Window onto a zero length track doesn't -insert the effect on the track. - - - - - - - -6/14/02 - -Bilinear interpolation from Broadcast 2000 migrated over. This -averaged more pixels than the standard bilinear interpolation we -upgraded to in 2000. - -Mutual exclusion lock for liba52 since liba52 can't run two frame -decodes simultaneously. - -Removed double lock from Heroine College Concert Hall. - -Correctly detects playable tracks more often. - -Bezier curves for fade and zoom. - -64 bit mpeg file support. XMovie plays 64 bit mpeg files. - -Variable channel numbers work finally. Audio pans adjust when channel -count changes. - -DV encoding in color works slightly better but still corrupted on the -right side. The libdv upgrade can't decode of course. - -After assessing levels of interest, marketing direction, and -experiencing a CVS erasing filesystem crash we moved forward on the -folding of all code into a single repository. Moved quicktime, -libmpeg3, xmovie, mix2000, and 2 mpeg multiplexing tools into the -cinelerra tree and renamed the one gigantic tree hvirtual. The upside -is Cinelerra compilation only requires exporting CFLAGS instead of -hunting down 5 packages and exporting CFLAGS. The downside is the one -guy who uses Quicktime has to download a bigger package through his -bankrupt ISP's refurbished 1998 reissued cable modem. - -Mind you everything except cinelerra and plugins will remain -independant of each other. - -While it may work for servers ext3 isn't suitable for desktops which -are constantly shut down and restarted. - - - -6/21/02 - -DV decoder 0.9.5 migrated. Not tested for error resilience yet. -Made to_clip not copy all to the temporary clipboard so it wouldn't -copy the child EDL's. -Sort items put in AssetPopup. -Plugin titles don't extend beyond background. -Menus reposition when the window is repositioned. -Default window positions is more accurate. -Despike migrated to interpolated keyframes. -Level window resets with everything else. -Fixed detection of playable tracks error that was introduced with bezier faders. -More often plays full audio track instead of truncating it. -MPEG decoder supports XVideo better. -Going to next and previous label with scrolling refreshes the compositor. -Drawing of highlight box when dragging over the timeline is more accurate. -Dragging one keyframe beyond another deletes the keyframe like it should. -Bezier keyframes may work better than before. - -tracks->get_total_length considers keyframe length as well as edit -length. This allows keyframe undo for regions where no edits exist. - -Update undo routines can be called recursively without corrupting the -undo table. -Undoing and redoing keyframe adjustments works better. - -Bilinear reduction with alpha channels fixed. - -Memory leak removed from Quicktime udta. -Kludge for 88200 samplerate in Quicktime. Not tested. - - - - - - - - - -7/12/02 - -Sharpen GUI synchronized to keyframes. -Flip video. -Freezeframe. -Freeverb. -Shift interlace. -AWindow scrollbars calculated more accurately. -Attach when effect is already in slot lets you change the effect. -Faders and effect GUI's track playback. -More frequent updating of patchbay when scrubbing. -Pan automation works. -Raw PCM export supports endian changes. -All assets are saved during Save File. -Keyframing right curves for projector zoom. -All paste_edl operations copy all the assets. -Camera zoom and projector zoom keyframes are properly generated from CWindow. -Better bezier keyframe drawing in CWindow. -Default window positions work in KDE, Gnome, and fvwm. - -Can grab control points in CWindow more easily if they're both against -the left side. - -Large amout of unused Broadcast 2000 code removed. -RecordGUI uses EDL aspect ratio. - -Grabbing control points in CWindow works better. -Different colors for curves. -Frame advance reverse plays the last frame in the timeline properly. -Single frame record. -Rendered effects handle transitions. - -Fewer crashes when hiding and showing effects during playback. -More macros for plugins. -Ganged faders are unaffected with record off. - -Pasting shared effects to different tracks than they were copied from -doesn't crash but shared effect resolution will be broken. - -Shift key snaps curve values when dragging curves. - -Documentation buildout. - -Creating a clip in the VWindow doesn't automatically set the VWindow to -the new clip. - -Changing asset sample rate works again. -List boxes updated in AWindow after changing mode. -Interface preferences have options for trimming. - -Copy added to CWindow buttons. Cut removed from VWindow buttons. -Copying always takes session parameters, so it works in VWindow instead -of crashing. - -Audio module fragment reduced to support Linux 2.4.18. Maximum DMA -allocation is no longer supported in 2.4.18 so audio fragments must be -kept below 4096. - -Units in freeverb changed to DB. - - - - - - - - - - -7/19/02 - -libmjpeg works on dual CPU systems finally. Mutually excludes -allocate_temps. MJPEG files should crash less often. - -Start playback after editing doesn't have noise. Denoise mutes first window. - -Clear plugin GUI after attach changes it to a different plugin. - -DV capture migrated to Linux 2.4.18. - -Freezeframe works better. - -Concatenate tracks works more often. - -When dragging effects, the effect can be positioned at the start of an -edit or at the start of a track instead of just at the start of a -track. - -More accurate drawing of highlighting. - -ALSA driver migrated to Linux 2.4.18, alsa-0.9.0rc2. - -Render realtime affect doesn't crash when bringing up GUI. -Plugin initialization takes proper buffer size. -Resource Window starts up with nothing highlighted. -Textboxes don't update contents if the contents are identical. -Textboxes allow entry and have normal cursor behavior during playback. - -Loading with insertion modes that don't replace the project doesn't -change the project filename. - -Curves aren't affected by the cursor when the track isn't armed. -Tooltips deleted when widgets are deleted. -start_realtime and stop_realtime removed from plugin interface. -Memory leaks due to plugins not deleting data reduced. - -Must use -O3 because optimization errors prevent video from playing with -O2. - -Labels in CWindow don't vanish after resize to fullscreen. -Undo for transitions. - -Better recording from DV camcorders. - - - - - - - - - -7/26/02 - -FFT based denoiser. -Ogg Vorbis support. -Interpolate effect interpolates the start and end sample of a selection. -Quicktime ported to Vorbis 1.0 -Undo detach transition. -Fade should cut out at INFINITYGAIN. -More accurate waveform drawing of sound files. -Dragging end of an edit in doesn't clear the first keyframe of the next edit. -Dragging end of an edit out shifts keyframes with it. -AgingTV debugged. -Changing sample rate of asset has an effect on played output. -Reset camera and projector once again resets the zoom curve. -U and u key for default transition. Default transition menu item. -VWindow remembers labels and in/out points. -Labels updated in CWindow after undo. -More intuitive centering on cursor after zooming. - - - - - - -7/29/02 -16 bit color supported again. -Apply button in format settings. -Fewer crashes when toggling play and mute patches during playback. -More locking when record updates the GUI. -Better floating point comparison for setting labels. -More intuitive scrollbar behavior for timeline. -Level window updates when meter range changes. -Waveforms drawn after window expansion. -Background for RecordGUI. -Preview size adjusted after in/out point dragging and silence pasting. -More robust handling of Freetype failures in titler. -Private font directory for titler. Should ease renderfarm administration. -AWindow background title updated more often. -Drop shadow in titler. -Compositor overlays translated more accurately when scrollbars are gone. -Better handling of scrollbar and tumbler repeating after mousewheel is used. -Creating a new project removes the clip reference from VWindow instead of making it crash. -Project deletion operations while CWindow or VWindow is playing crash less often. -Overlay modes ported to YUV colormodels. -8 bit RGB -> 16 bit YUV importing. -RGB601 refurbished. -Pots debugged. They might change value with cursor keys now. -Bilinear scaling has better clipping for fewer crashes. - - - - - - - - - - - -8/2/02 -Titler crash with drop shadow fixed. -Titler looping. -Render uses in/out points if they exist. -More accurate edges in bilinear scaling. -Playback termination memory leak removed. -Module calls render_stop before deleting the attachmentpoint. -Render farm crash fixed. -More often terminates recording when no firewire device exists instead -of just freezing up. -Titler doesn't interpolate any parameters. -Old references to real_transition removed from virtual console. -Source position in plugin client made relative to start of track. - - - - - - - - -8/19/02 -Titler fonts installed by rpm. -XMovie decodes ac3 according to redesigned liba52 channel mappings. -Quicktime MPEG4 parameters debugged. -Gradient effect. -Background rendering over a renderfarm. -Renderfarm clients automatically reduced to idle priority. -Better MJPA decoding on single processors. -Better title functionality in 16 bit colormodels. -Undo for effect keyframes. -Effect GUI's cleared during undo for effect attachment. -Fewer lockups on startup. -Proper keyframe interpolation in scale effect. -Stamp timecode in titler. -Memory leak in rendering stages removed. -Removed legacy plugin server code. -Downsample video resolution. -Option to generate sequence header in every GOP for MPEG2. -LADSPA support. -Listbox doesn't enter drag_icon state when dragging column division. -Radial, linear, and zoom blur. -Effect rendering bug fixed. -64 bit mpeg transport stream seeking beyond 2 gigs. -More accurate mask drawing when projector is zoomed. -Clear labels updates CWindow -More accurate YUV/RGB conversions. -Histogram. -Perspective. -Import partial tga's -Copy keyframes doesn't copy default keyframe. -Track highlighting offset by vertical scroll. -Multiple video scope, spectrogram, and histogram displays may be opened. -HutSaturation in YUV colorspaces. -Undo for masks. - - - - -10/13/02 -Interpolation of gradient keyframes -libmpeg3 handles case where audio channel count increases in the middle of the stream -Zoom bar redrawn more accurately when time format changes. -More reliable quit of render nodes when master node crashes. -Render doesn't reset brender to 0. -Play keyframes discontinued. -Deleting media from middle of track and pasting to end plays back. -Persistent frame rate statistics stored in render farm. -Flash transition. -Undo for in and out points. - - - -10/19/02 -sync_parameters for splice, drag assets on CWindow. -Change asset path updates brender and index file status. -Transition drop on CWindow. -Changing video play patch doesn't freeze brender permanently. -Swap channels generates correct output. -Shared synthesis effects cause the sharing tracks to -play back instead of just the owning track. -Quicktime recovery utility improved. -Memory leaks in FileVorbis::check_sig and AssetPicon::create_objects removed. - - Remove asset from disk removes it more often. -AttachmentPoint::~AttachmentPoint deletes plugin servers. - - For some reason they were originally deleted in render_stop but render_stop - was commented out of Module::~Module. -Drag scroll working for region selections. -Single frame recording with multiple batches doesn't crash. -Sound Level -DV encoding with proper color conversion. - - - - - - - - -11/08/02 - -More options for the ffmpeg/MPEG-4 codecs. -Histogram works on SMP. -Proper 16 bit alpha blending. -BRender path updates from preferences. -Separate preroll for background rendering and rendering. -Deinterlace by averaging lines 0 and 2 or 1 and 3 to get intervening lines. -Adaptive deinterlace. -Frame per second statistics in renderfarm are more reliable. -Select and slide in the patchbay. -Video scope can be resized. -Effect keyframes pasted in right positions. -Selective denoising of video based on color channel. - - - -1/12/03 - -More mouse wheel bindings in MainWindow and ListBox. -Ctrl-w closes effect windows. -Perspective doesn't crash when switching from stretch to sheer. -Better text list searching and keyboard navigation. -Better Vorbis decoding. - - - -2/10/03 - -Close recording without recording anything doesn't crash. -Save backup now option. -OpenGL not required anymore. -Time format changes update the selection textboxes more often. -MPEG-4 deblocking option in XMovie. -Resize in Record GUI. -Export of YUVA16161616 to Component Y'CbCr 10-bit 4:4:4. -Import of Component Y'CbCr 10-bit 4:4:4 to RGB colorspaces. - - - - - - - - - -2/14/03 - - -Create fade keyframe inadverdently drags bezier handle less often. -Float autos don't draw on right edge of timeline when keyframes are beyond right edge. -Better float auto creation. -Add track anywhere in timeline through track popup. -Shared track references are automatically reconfigured after deleting or adding tracks. -Libmpeg3: Better decoding of field-based MPEG video. -Channels can be moved up or down in the Channel picker properly. -Better handling of the long delay in deleting files without overflowing the recording buffers. -Deinterlace really swaps fields instead of just saying it. -Two line swapping combinations in deinterlace. -Better listbox row sizing. -Downsample offset. -Faster window creation. -Splash screen while you wait for it to start up. -File deletion occurs before opening the driver instead of - after opening the driver for recording. -Changing sample rate of WAV file in Asset window works. -JPEG stills get saved with proper dimensions. -Migrated to RedHat 8.0. - - e2fsprogs-devel is needed to compile the background render object. -Fewer crashes due to OpenDivx global variables getting overwritten. -Paste silence and clipboards also shifts effect keyframes properly. -More checks for circular references in shared effects and shared tracks. -Tracking during audio playback without video doesn't run past edge of loop boundaries. -Better keyframing in Titler. -Multiple language encodings in Titler. -Undo of replace project after an effect works. -Frame -> field conversion does line averaging and pixel shifting. -Field -> frame conversion uses pixel shifting. -Negative cursor selection is frame aligned. -Documentation on video cleaning and deinterlacing tools. -Buttons repositioned properly when filebox is resized vertically. -Fade automation is more accurate. -CWindow and VWindow slider position is less erratic after the window is resized. -Timebars with regions track the playback position. -More workarounds for buz driver lockups. -Dragging the cursor on the timebar off the edges scrolls the timeline. -IVTC uses luminance only in YUV colorspaces to improve accuracy. -Quicktime: Tighter audio synchronization when encoding Quicktime with Vorbis audio. -Start of audio effects is more accurate. -Better IEEE1394 playback of video only. -More IEEE1394 playback options. - - - - - - - -A lot of patches were rejected. Some were accepted. Most of these -coding practices were done in 1997 but abandonned later because of high -maintenance. To save code size, the memory leak checker shouldn't flag -single allocations as leaks and static pointers shouldn't be -explicitely deleted on exit. - - -titler-charsets.diff - -merged. - - -cinelerra-loop-patch* - -The bugs in loops and audio positioning were fixed another way. - - -cursor-patch.diff - -Too much maintenance in function indirection with no effect. - -Explicit declaration of the movement distance requires too much -maintenance. The move commands were separated for scalability reasons. - - - -mempatch-2.diff - - -Units::topower was already static. Patch has no effect and requires -too much maintenance. - - -mempatch-3.diff: - -DefaultTheme is intended to be replaced by a subclass of BC_Theme and -use BC_Theme for all memory management. No expansion of this file is -maintainable. - -ArrayList::aray_delete was merged. - -Changes to BC_Meter, BC_Resources require too much maintainence and -have no effect. - -static variables in BC_WindowBase prevent different windows in the same -application from having different fonts. - -Deletion of pointers in AWindow, CWindow, VWindow, MWindow requires too -much maintenance. - -Buttons in AWindow may be used in the future and should not be deleted. - -Buttons in editpanel may be used in the future and should not be deleted. - -Selections were replaced by masks. Deleted from VTrack. - - - - - - - -mempatch-5.diff - -BC_NewFolderThread expansion done differently. -BC_FileBox widget deletion already done by BC_WindowBase. Too much code for no effect. -BC_ProgressBar::~BC_ProgressBar() implemented. -BC_Resources changes have no effect. -It's already a static object and if the images were overridden, their BC_Theme class would delete the lists. -BC_WindowBase changes were preemptively rejected. -Canvas::~Canvas merged. -CPanel::~CPanel already done by BC_WindowBase. Too much code. -CWindowGUI::~CWindowGUI mostly done by BC_WindowBase. -MeterPanel::~MeterPanel merged -Module::create_new_attachments merged -StatusBar::~StatusBar already done by BC_SubWindow. -theme.C too much code. -VirtualConsole::~VirtualConsole introduced too many bugs. -ZoomBar::~ZoomBar partially merged. Mostly done by BC_SubWindow. -DefaultTheme::DeleteVFrames is done by BC_Theme. -title.C fonts is a static variable because it shouldn't be deleted. - - - - -mempatch-6.diff -BC_FileBox done differently. Lock_window is normally used when updating a GUI from a thread. - -mempatch-7.diff -VirtualConsole refurbishment was handled differently. - -filevorbis.C asymetric fclose patch applied. - - - - - - - -mempatch-9.diff - -MWindow::load_filenames memory management applied. -Rest has no effect. - -mempatch-10.diff - -decode_lock is static because it shouldn't be deleted. -Rest has no effect. - - - - - - - - - - - - -5/16/03 - -Audio and video playback through firewire. Can't get a playable -audio stream for the camcorder in realtime but the interface is there. - -Quicktime: Libraw1394 and grabbing removed. Didn't serve any purpose -since playback requires a completely different mechanism than record. - -Quicktime, XMovie, Cinelerra: ffmpeg decoder used in MPEG-4. This -gives slightly faster playback but is lousy at seeking. - -More file writing recovery from crashes. - -Cinelerra: Module dereferences renderengine less often in nonrealtime -effects where renderengine is 0. - -Quicktime: Importing of dvgrab and lavtools AVI files. -Cinelerra: Hitting space rapidly doesn't lock up recording as much. -Cinelerra: Resize Render effect window. -Cinelerra: Changing parameters for PCM file works more often. - -Cinelerra: tiff upgraded to 3.1.7 -Firehose: Fixed bug in firehose reciever. -Cinelerra: Virtual file system for renderfarm. - - The filesystem prefix for rendering nodes was decidedly useless so it was -discontinued. -Cinelerra: Time stretch based on overlapping windows instead of FFT. -Cinelerra: Freeze frame has line doubling option. - -Integrated mpeg2enc, toolame, lame encoding as libraries. -Toolame refurbishment: - - converted exit to return in main. - - put prototypes in filempeg.h - - created input buffer management. - - forced stdin at all times - - created error and eof variables. - - freq2bark -> toolame_freq2bark -mpeg2enc symbol conflicts: - - putbits -> mpeg2enc_putbits - - SmpFrqIndex -> toolame_SmpFrqIndex - - BitrateIndex -> toolame_BitrateIndex - -edit and effect titles stay visible at all times. We'll see how long -this lasts. - -long replaced with int64 wherever possible. After many years of -assuming long would automatically scale to whatever it was compiled on, -it appears more of a pain than a scalability point in matters of -function overloading. - -Default configuration should run on stock Redhat 9.0 system. - - - -Patches: -loop-crush.diff applied -exit-crush.diff too much code for no effect -splash-leak.diff applied -overlay-speedup.diff applied -overlay-speedup2.diff applied -titler-stroke.diff -titler-stroke2.diff applied but disabled due to SMP crash. (crush) - Added Outline style and tumbler. - Reduced number of exits due to bounds checking errors. - - -quicktime_leak.diff applied -small-clean2.diff file may be closed and reopened without calling destructor. - -patchbay_free.diff applied but the real problem was PatchBay::update() - dereferenced non-existent tracks to get the ID. - - -perspective_alpha_stretch.diff applied -virtualconsole_leak.diff applied but the default destructors seem to be - getting called. -dvlib_bug_workaround.diff applied -debian_new_dvlib_compile.diff applied - -multihead_compositor-1.1.5.diff rejected The X11 parameter in Playback -preferences is the compositor display. - -filexml.diff applied -paste-outpoints.diff needs testing - -paste-outpoints.diff rejected. Broke other paste behavior. The paste -behavior is not a uniform case but the result of trying behaviors on a -case by case basis and deciding which behavior is the most convenient. -Most of the time what's convenient is not the most scientific. - - - - - - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.1.1.7 b/cinelerra-5.1/cinelerra/CHANGELOG.1.1.7 deleted file mode 100644 index ce17a3ee..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.1.1.7 +++ /dev/null @@ -1,109 +0,0 @@ -Audio and video playback through firewire. Can't get a playable -audio stream for the camcorder in realtime but the interface is there. - -Quicktime: Libraw1394 and grabbing interface removed. Didn't serve any -purpose since playback requires a completely different mechanism than -record. - -Quicktime, XMovie, Cinelerra: ffmpeg decoder used in MPEG-4. This -gives slightly faster playback but is lousy at seeking. - -More file writing recovery from crashes. - -Cinelerra: Module dereferences renderengine less often in nonrealtime -effects where renderengine is 0. - -Quicktime: Importing of dvgrab and lavtools AVI files. -Cinelerra: Hitting space rapidly doesn't lock up recording as much. -Cinelerra: Resize Render effect window. -Cinelerra: Changing parameters for PCM file works more often. - -Cinelerra: tiff upgraded to 3.1.7 -Firehose: Fixed bug in firehose reciever. -Cinelerra: Virtual file system for renderfarm. - - The filesystem prefix for rendering nodes was decidedly useless so it was -discontinued. -Cinelerra: Time stretch based on overlapping windows instead of FFT. -Cinelerra: Freeze frame has line doubling option. - -Integrated mpeg2enc, toolame, lame encoding as libraries. -Toolame refurbishment: - - converted exit to return in main. - - put prototypes in filempeg.h - - created input buffer management. - - forced stdin at all times - - created error and eof variables. - - freq2bark -> toolame_freq2bark -mpeg2enc symbol conflicts: - - putbits -> mpeg2enc_putbits - - SmpFrqIndex -> toolame_SmpFrqIndex - - BitrateIndex -> toolame_BitrateIndex - -edit and effect titles stay visible at all times. We'll see how long -this lasts. - -long replaced with int64 wherever possible. After many years of -assuming long would automatically scale to whatever it was compiled on, -it appears more of a pain than a scalability point in matters of -function overloading. - -Default configuration should run on stock Redhat 9.0 system. - - - -Patches: -loop-crush.diff applied -exit-crush.diff too much code for no effect -splash-leak.diff applied -overlay-speedup.diff applied -overlay-speedup2.diff applied -titler-stroke.diff -titler-stroke2.diff applied but disabled due to SMP crash. (crush) - Added Outline style and tumbler. - Reduced number of exits due to bounds checking errors. - - -quicktime_leak.diff applied -small-clean2.diff file may be closed and reopened without calling destructor. - -patchbay_free.diff applied but the real problem was PatchBay::update() - dereferenced non-existent tracks to get the ID. - - -perspective_alpha_stretch.diff applied -virtualconsole_leak.diff applied but the default destructors seem to be - getting called. -dvlib_bug_workaround.diff applied -debian_new_dvlib_compile.diff applied - -multihead_compositor-1.1.5.diff rejected The X11 parameter in Playback -preferences is the compositor display. - -filexml.diff applied -paste-outpoints.diff needs testing - -paste-outpoints.diff rejected. Broke other paste behavior. The paste -behavior is not a uniform case but the result of trying behaviors on a -case by case basis and deciding which behavior is the most convenient. -Most of the time what's convenient is not the most scientific. - - - - - - - - -Brief: - - -Improved playback through firewire. Importing of dvgrab and lavtools -AVI files. Changing parameters for PCM works more often. Virtual file -system for renderfarm. Time stretch based on overlapping windows -instead of FFT. Integrated mpeg2enc, toolame, lame encoding as -libraries. Default configuration should run on stock Redhat 9.0 system. - - - - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.1.1.8 b/cinelerra-5.1/cinelerra/CHANGELOG.1.1.8 deleted file mode 100644 index 3ea731b6..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.1.1.8 +++ /dev/null @@ -1,94 +0,0 @@ -Date, Size, Path sorting in file boxes. - -libsndfile upgraded - - libsndfile.diff applied - - Debugged libsndfile patches. - - Modified libsndfile to support VFS -MJPEG software encoding debug on AVI and Quicktime. -Better drawing of highly oversampled waves. -Better rendering of MPEG video where the framerate is oversampled. -Overlay mode displayed as icon. -Date, Size, Path sorting in file boxes. -Track nudge. -Tool tips for nudge, pan, overlay mode. -Context menu for seconds or samples/frames for nudge -Better handling of mpeg table of contents files with relative paths. -MPEG-4 decoding starts on right frame more often. -Cursors deactivate when window not focused -Pan positions load properly. -Short audio clips play in their entirety. -Text conforming in time textboxes. -Troubleshooting guide for recording slow framerates. -Crash when cancelling some Vorbis Quicktime rendering fixed. -Better synchronization for fixed bitrate Vorbis Quicktime movies. -Home and End keys go to start and end of timeline. -Patternless Inverse Telecine. -Better drag select behavior for patches. -Single confirmation dialog instead of multiple dialogs for file overwrites. -Batch rendering. -Force single processor is a preferences option not an EDL parameter. -Simple lock debugging and tracing. -ESound migrated to new GCC syntax. -Video In transport control removed due to lockups. Should be a remote control there. -DV1394 implemented as new driver. -Titler: More redundancy when scanning font dir. -Tracking::stop_playback stops the thread entirely instead of capturing loop_lock. - - In the NPTL, a mutex can't be locked unless the other user delays - between unlocking and locking. - - In the NPTL, cancelling a select operation crashes. -libmpeg3: seek_percentage replaced by seek_byte - mpeg3_previous_frame really gets previous frame - more accurate decoding of start of video - faster seeking -xmovie: previous frame really gets previous frame in MPEG 1&2 - Quit during playback -> fewer crashes - Workaround for NPTL cancel. - MMX disabled due to compiler changes. -quicktime: ffmpeg upgraded to 0.4.8 -Configure script implemented to error out in an unsuitable build environment. -Foreign languages implemented but disabled due to new bugs. -Buz recording migrated to 2.4.22. -Assorted locks migrated to NPTL. -Boundary tests in EDL::load_xml. - - -Jens Seidel: -German translation - - - - - -Andraz Tori: - -Slovanian translation - -Fixed crash when slave plugin extended past master plugin with no asset -in track. - -bcsignal_new_delete.diff - the meters need to have separations at 5 and -20, not 1/6 and 2/5. - -bcmeter_illegal_access.diff - this function shouldn't copy the string -at all. - - -overlay-speedup3.diff applied - -overlay-speedup4.diff rejected - - pixel_transparency is still taken from the alpha of the pixel, which is 0 - max. - Bit shifting reduces the result by 1. - -imagesequence.patch applied - -framecache1.diff rejected - - The cache explodes when handling HDTV. Can't use it until you've - finished the options in preferences and the absolute size. - -close_window.diff rejected - - too much work for something that a set_done call would do. - -quicktime debug - - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.1.1.9 b/cinelerra-5.1/cinelerra/CHANGELOG.1.1.9 deleted file mode 100644 index fe000388..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.1.1.9 +++ /dev/null @@ -1,138 +0,0 @@ -Command line option for alternate configure file. -Pinch works if whirl is zero. -Push method replaced by pull method in virtual console. - - less memory - - realtime time domain effects possible - - no distinction between amount to read from disk and amount to send through console -Popup menu instead of text entry for playback fragment size. -Video decimation -Parametric EQ, pitch shift, time stretch have no delay. -Synchronized start of video and audio playback. -Controls can be hidden from compositor. -Mov not improperly detected as OGG Vorbis - - ov_open result also needs testing against first 8 bytes -Fixed histogram crashes due to not all LoadClients being called. -Attach button attaches shared effects properly. -Automatic filename generation doesn't change directory. -Nudge values updated when project rates change. -Background rendering detects nudge change. -Loading an EDL with the CWindow tool followed by loading an EDL without - the CWindow tool crashes less. -PCM format configuration more reliable. -Freeze frame freezes on the exact frame the effect starts - or on the latest keyframe. -Better alignment of fade out in Titler. -Better text entry in titler. -Video overlay effect. -Realtime reverse video and audio. -Loop audio and video effects. -Colorbalance tabulation doesn't leave last entry empty -Zoom menu goes towards center instead of top left of compositor. -Middle mouse button scrolling works when compositor output is smaller than canvas. -Aspect ratio saved in mpeg video. -Default keyframe position stays at 0 after shifting effect right then left. -Batch render from command line without GUI. -Titler reverted to old freetype API. - - 400 less lines of code and better vertical alignment. - - the "stroker" outline looked terrible. Outlines need to be done with a real - outline filter. -Rendering load balancing tests for infinite frame rate. -Frame -> fields optimized for pull console. -Fields -> frame converted to realtime. -Bounds checking in crop entry point. -Credits screen. Send omitted names to broadcast@earthling.net -Memory debug system. -An optimization error in GCC 3.3.2 causes RGB16 colormodels to crash. -Easier changing of the nudge parameters during playback. - -quicktime: Memory leak in raw.c with temp_rows removed. - RLE decoding - -libmpeg3: multiple title stream handling and table of contents moved to -absolute offsets -- mpeg3toc takes -a to limit the number of audio streams scanned. - - -Patches (Send whining to billg@microsoft.com): - - - -Andraz Tori: - -locale.diff more language bindings - applied -bctheme_memfix.diff different arraylist handling - applied -cinelerra-gettext-6.diff more language bindings - applied -sharpen.diff engine debug - applied -buttons.diff + buttons_pngs.tar.gz 3 segment replacement for text - rejected. - Why don't you add support for picons in generic buttons - instead of requiring different 3segment bitmaps. - Set real x and y in the initialize() instead of guessing in the constructor. -canvas_cache2.diff picon and rendering cache with preferences rejected. - Make File work without *preferences. - Caching picons should only involve FrameCache and ResourcePixmap. - Picon caching is good. Playback caching is too slow. - Either require a total cache bytes or a total cache items but not both. -libdv yuv->rgb conversion used again. -version_define.diff version macro renamed - applied -dv_in_32khz.diff 12 bit hack for 1394 - applied -alsa_fix.diff ALSA API change - applied -crop_crush.diff new crop interface - Partially applied. The corners shouldn't snap to the cursor. -qt_mpeg_cleanup.diff: - Partially applied. The temp rows are needed for packed colormodels. -overlay-speedup5.diff TRANSFER_REPLACE overlay optimization: - applied -maskengine4* mask engine rewrite: - rejected - not SMP compatible -masks_fixes.diff new rerendering test + interpolation rewrite - new rerendering test imported - new interpolation rejected. This needs to be done with the existing API - instead of an orthogonal one. Try confining it to CWindowGUI. - Mask points need to interpolate in every - previous and every next keyframe instead of just the previous. - - -David Arendt - -xml.diff different xml syntax - rejected. These standards points are ignored in - most every web page anyway, and Cinelerra exports aren't used by - anything else. -render.diff rendering hack - rejected. Command line rendering should run without a GUI and do - batches. - - - -Eric Seigne - -french translation imported - - - -ga - -drag.diff different drag behavior - rejected. Most people seem to want arbitary dropping with an - option to paste to arbitrary positions. -spanish translation imported - - - -koen muylkens - -newskin-cinelerra.diff - rejected. Move Cinelerra specific settings -from BC_Resources to Theme. Put default values back in BC_Resources so -it can be used by other applications. Need button picons instead of 3 -segment button. Make splash screen determined by a default field, set -when the user sets a theme. - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.0 b/cinelerra-5.1/cinelerra/CHANGELOG.1.2.0 deleted file mode 100644 index 27540248..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.0 +++ /dev/null @@ -1,56 +0,0 @@ -I/O subsystems partially migrated to 2.6.3 - - Video4Linux 2 JPEG capture - - ALSA migrated to alsa-lib 1.0.2 -Fixed rounding error in conversion between requested position and - project position in VModule::render -Patchbay redrawn after rendering effect which adds tracks. -Caching of picons and single frame playback. -Caching based on total megabytes instead of total open files. -Compression settings retained in batch render if the data type is not enabled. -Batch render doesn't insert into project if an insertion strategy was selected in Render. -More useful increments for compressed video bitrate and compressed audio bitrate. -AC3 audio encoding. -Key bindings for AVC transport. -Realtime effect rendering debugged. -Interpolate audio in realtime. -Time based interpolate of video in realtime. - -Shift dragging floatautos snaps to closest neighboring value if adjoined -by other autos. - -Quad CPU's debugged. FileThread now limits the ring buffer count to 2 -and expands the frame number count to match the CPU's. - -Temporary file deletion on crash. - -Nudge forces update of PARAMS instead of EDL for audio. - -Default render jobs increased - -Automatic disabling of realtime priority for nonroot. -Deck control for DV camcorders. -DV playback debugs. -Histogram crashes fixed. -Slide optimization. -More locale debugging. -Context sensitive menu for effect keyframes. -Double click on effect selects the region of the effect. -Scrollbars in asset window improved. -Drag and drop debugs. -Optimizations in fade engine. -Alignment buttons for camera and projector debugged. -Fewer loopvideo crashes. -Direct copy of more Quicktime DV files. -Rounding changed to conform to PAL framerates. - - - -Quicktime: - Decoding of compressed headers. - Sorenson Video 1 & 3 playback supported through ffmpeg. - mp4v decoding - -Mix2000: signal handling fixed again so defaults get saved during X -server crashes. - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.1 b/cinelerra-5.1/cinelerra/CHANGELOG.1.2.1 deleted file mode 100644 index 59c86b6c..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.1 +++ /dev/null @@ -1,53 +0,0 @@ -Theme images stored as elf binaries instead of concatenated png files. -Project filename restored from backups. -Proper frame being read out of cache for frame advance. -Automatically repositions when loading new file to top left of timeline. -Presets in Set Format for quick reconfiguration. -Transition lengths adjusted for frame rate changes. -Keyframes for effects are hidden if edits are collapsed. - -Compressor works better. Readahead option removed. Delay removed. -Setting reaction time negative provides readahead now. Also a -smoothing only option renders the just loudness for academic uses. - -Realtime time stretch and reframe for video. -Time average now supports accumulation and doesn't require reading ahead. - -ALSA buffer underruns handled better for 2.6.7. -ALSA synchronization and interrupts handled better. -32 bit option in ALSA. -Backup fonts in case primary fonts don't exist. -Sound levels over 0 DB show in meters with a new max level setting. -DenoiseFFT debug - -New event propogation system should reduce the number of lockups due to -repeat events. - -Faster meter responsiveness. - -Migrated to DV1394 version 2.6.7 for DV capture. -Migrated the Video 4 Linux 2 JPEG driver to Video 4 Linux 2 JPEG version 2.6.7. -Partially supported uncompressed Video 4 Linux 2 version 2.6.7 but need new frequency table. -Linux 2.4 is depreciated. - -RGB floating point color space. -RGB 16 removed. -OpenEXR support -Floating point TIFF. - -Higher precision in YUV/RGB conversions. -Greyscale JPEGs imported properly. - -CD ripper accepts ending tracks higher than the total tracks. Put in -100 for the ending track to get the entire disk. - -Race conditions in certain dialog box openings removed. - - -Quicktime: faster writing since write buffer is disabled while writing -data. -Quicktime: floating point color conversions - - - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.2 b/cinelerra-5.1/cinelerra/CHANGELOG.1.2.2 deleted file mode 100644 index c8c3534e..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.2 +++ /dev/null @@ -1,36 +0,0 @@ -Debugging for VFS in 64 bit mode -Quicktime: quicktime_set_position without buffering sets the position -Threshold effect. -Unsharp mask effect. -Debugging for image sequence rendering on renderfarms. -Greyscale TIFF loading. -Wheel mouse works over textbox for tumble textboxes. -Rotation moved to the affine transform since trig transform seemed to have very -slight errors. -Writing floating point wav files doesn't clamp the sound level anymore. -Writing and reading quicktime RGBA8888 works. -Compression title in asset info displays readable info. -Spherical gradient -Motion and rotation tracking. -Bilinear reduction banding error fixed. -Realtime priority routines migrated to 2.6 kernels. -Realtime priority now extends from the virtual console to the sound driver and is -inherited by Thread objects from the parent thread. -Rendering effects where the region contains a transition doesn't crash. -Allow effect keyframe at end of effect. -Video keyframes positioned more accurately at subframe zoom levels. -Shift clicking a boundary of an effect causes the trim operation to - change only the one effect. -Interpolate video doesn't use the input frame rate when keyframes are used - as the border frames. -Status indicator on Compositor window shows when processing is occurring. -Time can be displayed as seconds. -On time bar, ctrl-middle button selects previous time format. - Ctrl-left button selects next time format. -AC3 file creation works better. -X11 video doesn't blank out before playback. -Tried disabling ALSA thread cancellation again due to continued crashes -with this library. - - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.3 b/cinelerra-5.1/cinelerra/CHANGELOG.1.2.3 deleted file mode 100644 index e3da3cd5..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.1.2.3 +++ /dev/null @@ -1,116 +0,0 @@ -H.264 Video, MPEG-4 Audio and Video encoding in Quicktime, compatible with Quicktime player. - - The ffmpeg front end has been improved to where it generates useful quality. - - Certain frame rates and compression options don't work in Win. - -Refurbished MPEG table of contents. - - Tables of contents now detect changes in PID. - - Tables of contents are created twice as fast. - - Load any MPEG or IFO file with video in Cinelerra and a table of - contents is automatically created. - - Audio indexes are created simultaneously with MPEG tables of contents. - - Still possible to create permanent tables of contents with mpeg3toc. - - Using MPEG files in a renderfarm still requires mpeg3toc due to the fact that the - automatic .toc files are hidden. - -Fewer lockups when resizing video window. -Fewer crashes due to socket timeouts in background rendering. -Directory search boxes only contain relevant information for directories. -Hourglass displayed in main window during time consuming operations. -Having shared effect off but sharing instance on doesn't create mono sound anymore. -Tool options get closed when CWindow is closed. -Picture settings retained after recording from V4L2. Workaround for V4L2 driver - where 2 different picture settings must be uploaded. -Bitrate displayed in asset info box. -64 bit plugins are stored in /usr/lib64 so 64 bit executables can be run on the - same systems as 32 bit executables without renaming the directory. -Color picker in compositor window allows selecting colors from the output frame - for use in effects. -Refurbushed chroma key: - - uses color cube instead of hue for color comparison - - uses the color picker to select the color -Support for raw digital camera importing. - - Uses dcraw to decode the images into floating point RGB. - - tested on Canon .cr2 and .tiff files. - - Linearize effect is provided to convert gamma values. -White balance function in colorbalance effect. - - Select the grey color in the compositor window. - - Hit the white balance button. - -YUV 16 bit colormodels have been depreciated. The only practical -colormodels have been 8 bit and floating point. Even with raw sensor -data, the precision needs to be higher to handle the gamma correction. - -Difference key using different tracks. -Undo buffers use compression to reduce memory usage. -Undo supports effect tweeks. -Nudge textboxes are ganged. -Mouse wheel changes nudge value. - -Holding CTRL when doing any playback operation causes the in/out points to be used -for the playback range. - -Moved from the unified camera and projector keyframes to discrete x -and y curves. - - Z was already made discrete out of necessary utility. - - Too much information was drawn on the Compositor window. - - The timeline functionality is extended to better handle curves. - -Alt+up and Alt+down zoom the automation vertically. - -Dedicated window provided for selecting which automation overlays to show. - -The problem with virtual filesystem: - - VFS was developed back when we wanted to use some high powered servers but - didn't have root access to mount filesystems on them. That situation ended and - it was taking an enourmous amount of effort to work VFS around the number of - strange things libraries do like accessing megabytes using fgetc. - VFS has now been phased out. - -Fixed lockups due to MWindow locking CWindow when MWindow was still locked. -Fixed problems loading ulaw sound files. - -Tip of the day shown. -Filebox supports deleting files and refreshing. -Extra zoom levels added to Compositor window. - -Highlighted region overrides in/out points if it is nonzero length. - -Blond theme has not been updated. Instead it has been replaced by the -SUV theme. The SUV theme is extremely manly and dark and should make -the media stand out more. - -MPEG4 audio decodes on x86_64. Had to put stdint.h in faad.h and -change all the unsigned long to uint32_t because those structures were -redefined in structs.h with uint32_t. - -Channel changing for Video4Linux2 ported to kernel 2.6.7. Automatic -channel scanning and sorting is supported for the 1 guy who still uses -these cards. - -Pressing ALT while clicking in cropping window causes translation of -all 4 cropping points. - -Rotation effect supports a variable pivot and drawing of the pivot in -the frame. - -DV support migrated to latest API rewrite: libIEC61883 - -MPEG video encoding provides a graphical interface for YUV 4:2:0 -encoding on the mjpegtools version of mpeg2enc. - -The audio playback options support a global offset for audio -synchronization. This doesn't affect the audio playback or the -rendering. It just compensates for inaccuracy in the Linux sound -drivers. - -The ALSA options allow compensation for lockups at end of playback -depending on the ALSA version, soundcard, and ALSA rewrite. - -Press Tab while the cursor is anywhere over a track to toggle the track -arming status. Press Shift-Tab while the cursor is over a track to -toggle the arming status of every other track. - -Resample effect changed to match the behavior of the Reframe effects. -Scale factors > 1 shorten the length of the audio. - - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.2.1 b/cinelerra-5.1/cinelerra/CHANGELOG.2.1 deleted file mode 100644 index 5f066bf5..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.2.1 +++ /dev/null @@ -1,171 +0,0 @@ -Overlay audio effect. Allows applying compression to the result of a -6 -> 2 mixdown in realtime. - -Compressor can use sum of all channels in addition to highest channel -and trigger. - -Channel position recall based on number of channels. - -Audio recording uses another layer of buffers to handle the extremely -small ALSA buffers better. -ALSA support migrated to version 1.0.11 and using the dynamic library since -it is now installed by default. - -Faster entry into recording interface. Recording file format is now -set in Preferences under Recording so the r key drops you straight into -monitor mode. - -Live Audio effect, allowing processing of the soundcard's input through -the timeline, in realtime. - - effects requiring read ahead don't work - -Live Video effect for IEC61883 and uncompressed Video4Linux 2 devices. - - With OpenGL, allows processing video input through the timeline in realtime. - - Must configure video driver using Record interface first. - - Uses record output file format to determine video path. - - Can't be used simultaneously with Live Audio if both drivers use DV. - -Filename extension automatically changed when selecting file format. - -Toggles for effect on/show. - -Motion tracking controls width and height for the block and range -instead of just size. Motion tracking takes the previous keyframe's x -and y instead of interpolating them. - -Channel mapping for the AC3/A52 decoder is fixed for 5.1 channels. -Liba52 outputs LFE, FL, C, FR, BL, BR but every other library expects -C, FL, FR, BL, BR, LFE, which caused errors when the BR channel from -liba52 was encoded straight through as LFE. - -2 presets for audio mixing positions. Map each track to a different -channel and map 5.1 tracks to stereo. - -Preview region in VWindow and CWindow follows the timeline length more often. - -Background drawing of tracks for more responsiveness. - -Number of channels is no longer set in device configuration but totally -dependant on project settings. - -Automatic cursor hiding when video is playing back. - -Fullscreen video in compositor window, recording monitor. Lots of new -menu options in the compositor popup. - -A floating point boundary condition in Linearize was fixed, defeating -the color glitches that would show up many steps later in floating -point images. - -Smarter timebar drawing. - -Tabs instead of pulldown menu for changing preferences dialogs. - -Pulldown menu for automation zoom with most popular values. -Keyframes->Straighten curves: straightens the bezier curves if more than one -curve keyframe is in the highlighted area. - -W and H may be swapped by a single button in the project settings. - -Entire GOP's from compressed MPEG-4, H.264, and MPEG-2 video are -cached during seeking, allowing faster reverse playback. - -Plugin dialog has a single OK button instead of 3 attach buttons. - -Option to match project frame rate in asset popup. -Asset info gives bitrate of actual MPEG stream instead of table of -contents file. - -TOC rebuilt if source MPG file changes date. - -Antialiased fonts for the interface. - -Colorbalance ranges changed to more easily support white balancing. - -Histogram shows the output of the RGB transfer in the value plot, -because the value transfer is applied after the RGB transfer. - - Histogram has split output - -Limited DVD subtitle support. Requires starting playback before the -subtitle appears. The number of subtitle tracks are given in the asset -info dialog for MPEG video files. - -Full OpenGL support during playback for compositing and effects. - - Some effects can't be useful and software isn't catching up to hardware. - - Requires OpenGL 2.0 drivers which only NVidia supports currently. - - Selected effects have been OpenGL enabled but most have not. - - OpenGL allows higher video resolution than Xv can handle. - - OpenGL enabled effects must be placed after software-only effects to get the hardware -acceleration. - - The OpenGL routines are not very optimized. You can get in the code -and fix that. - - Histogram only uses OpenGL if no channel has more than 3 points. - - Histogram effects only use OpenGL if the - GUI is closed or the histogram plot is disabled. - - Certain frame sizes don't work in OpenGL. If they're not multiples of 4. - - Most effect sequences have 8 bit intermediates. - - Certain effect sequences don't have 8 bit intermediates. - - Interpolate Pixels->Linearize->Color Balance->Histogram - - Frames to Fields->RGB601 - - Multichannel effects should set discarded outputs to TEXTURE. - - PBuffers are unreliable. It may take advancing 2 frames or restarting for - an OpenGL operation to take effect. - -The following effects support OpenGL: -brightness -chromakey -chromakeyhsv -colorbalance -deinterlace -diffkey -dissolve -flip -frames to fields -freezeframe -gamma -gradient -histogram -huesaturation -interpolate Pixels -invertvideo -linearblur -overlay -perspective -radialblur -rgb601 -rotate -scale -threshold -zoomblur - - - -Advancing labels and edits from compositor window doesn't get stuck on -select mode as often. - -The line doubling options in Frames to Fields and Freezeframe were -removed to simplify things. Use deinterlace after freezeframe. Frames -to Fields always averages lines. - -Rounding error in picon drawing for long timelines fixed. - -Handy error dialog pops up showing errors that would previously only -appear on the console. - -Gradient in floating point doesn't stair step anymore. -Gradient with changing alpha works when colormodel doesn't have alpha. - -Chromakey with hue/saturation/value is back, in addition to the color -cube method and difference key. - -All operations except STOP that could interrupt a recording in progress -are confirmed instead of just cancel. - -For overlaying, divide behavior is the same as the Gimp. -New overlaying algorithm: Max takes the maximum r, g, and b values. - -If an output track contains a shared track but the output track has no -media, the output track reads the shared track's media. If the output -track has media, it reads its own media. This allows replicating media -between tracks with shared tracks instead of copying the media. - diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.2.2 b/cinelerra-5.1/cinelerra/CHANGELOG.2.2 deleted file mode 100644 index 026af377..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.2.2 +++ /dev/null @@ -1,27 +0,0 @@ -Newer faster icon buttons for selecting load mode. -Blur extended to radei beyond 100 pixels. -Swap channels supports OpenGL. -New swap frames effect. -Quicktime make_streamable utility has been ported to support some outside - streams with AVC1. -QDesign Music 2 decoding finally supported. -x and backspace function in the Compositor window. -Ruler and angle tool. -For IEEE1394/IEC61883/DV1394 replaced timed waits with polling since pthread_cond_timedwait doesn't work -in all kernels. -Beefier table of contents generation for the MPEG decoding. -2 point motion tracking for faster rotation tracking. -Configurable x, y for search area in addition to w, h. -Backed out broken default keyframe paste from Cinelerra-CV. -Full screen mode selects the right monitor for dual head. -Title does proper alpha blending when dropshadow and fade are used but is slower. -Lens aberration effect -Graphic EQ. -Parametric EQ now uses a logarithmic envelope. -Musical note entry in the Synthesizer. -FLAC audio -Linear & bezier modes for curves. -Proper outlining for Titles. -Attach effects to multiple tracks simultaneously from the Audio & Video menus. -Asynchronous decoding debugged. -ID3 tags handled by mp3 parser. diff --git a/cinelerra-5.1/cinelerra/CHANGELOG.4 b/cinelerra-5.1/cinelerra/CHANGELOG.4 deleted file mode 100644 index e0c9d70d..00000000 --- a/cinelerra-5.1/cinelerra/CHANGELOG.4 +++ /dev/null @@ -1,33 +0,0 @@ -Newer faster icon buttons for selecting load mode. -Blur extended to radei beyond 100 pixels. -Swap channels supports OpenGL. -New swap frames effect. -Quicktime make_streamable utility has been ported to support some outside - streams with AVC1. -Most QDesign Music 2 derivatives supported. -Most WMA, WMV & FLV derivatives supported through FFMPEG. These formats don't support seeking. -x and backspace function in the Compositor window. -Ruler and angle tool. -For IEEE1394/IEC61883/DV1394 replaced timed waits with polling since pthread_cond_timedwait doesn't work -in all kernels. -Better table of contents generation for the MPEG decoding. -2 point motion tracking for faster rotation tracking. -Configurable x, y for search area in addition to w, h. -Backed out broken default keyframe paste from Cinelerra-CV. -Full screen mode selects the right monitor for dual head. -Title does proper alpha blending when dropshadow and fade are used but is slower. -Lens aberration effect -Graphic EQ. -Parametric EQ now uses a logarithmic envelope. -Musical note entry in the Synthesizer. -FLAC audio -Linear & bezier modes for curves. -Proper outlining for Titles. -Attach effects to multiple tracks simultaneously from the Audio & Video menus. -Asynchronous decoding debugged. -ID3 tags handled by mp3 parser. -Keyframe spanning for effects & masks. - - Select single point in time & it uses default keyframe generation as before. - - Select a range & it copies the changed parameter to all selected keyframes. -Spectrogram horizontal zoom & color - diff --git a/cinelerra-5.1/cinelerra/Makefile b/cinelerra-5.1/cinelerra/Makefile index 4c08bbf0..acef3b48 100644 --- a/cinelerra-5.1/cinelerra/Makefile +++ b/cinelerra-5.1/cinelerra/Makefile @@ -109,7 +109,6 @@ OBJS := \ $(OBJDIR)/filejpeg.o \ $(OBJDIR)/filelist.o \ $(OBJDIR)/file.o \ - $(OBJDIR)/fileogg.o \ $(OBJDIR)/filepng.o \ $(OBJDIR)/fileppm.o \ $(OBJDIR)/filescene.o \ @@ -117,7 +116,6 @@ OBJS := \ $(OBJDIR)/filetga.o \ $(OBJDIR)/filethread.o \ $(OBJDIR)/filetiff.o \ - $(OBJDIR)/filevorbis.o \ $(OBJDIR)/filexml.o \ $(OBJDIR)/floatauto.o \ $(OBJDIR)/floatautos.o \ @@ -557,6 +555,7 @@ ydiff: ydiff.C $(LIBRARIES) clean: rm -rf $(OBJDIR) + rm -f shuttle_keys.h tags: diff --git a/cinelerra-5.1/cinelerra/asset.C b/cinelerra-5.1/cinelerra/asset.C index 2856ed5c..ad5c5c8d 100644 --- a/cinelerra-5.1/cinelerra/asset.C +++ b/cinelerra-5.1/cinelerra/asset.C @@ -103,18 +103,6 @@ int Asset::init_values() ampeg_bitrate = 256; ampeg_derivative = 3; - vorbis_vbr = 0; - vorbis_min_bitrate = -1; - vorbis_bitrate = 128000; - vorbis_max_bitrate = -1; - - theora_fix_bitrate = 1; - theora_bitrate = 860000; - theora_quality = 16; - theora_sharpness = 2; - theora_keyframe_frequency = 64; - theora_keyframe_force_frequency = 64; - // mpeg parameters vmpeg_iframe_distance = 45; vmpeg_pframe_distance = 0; @@ -241,21 +229,6 @@ void Asset::copy_format(Asset *asset, int do_index) ampeg_bitrate = asset->ampeg_bitrate; ampeg_derivative = asset->ampeg_derivative; - - vorbis_vbr = asset->vorbis_vbr; - vorbis_min_bitrate = asset->vorbis_min_bitrate; - vorbis_bitrate = asset->vorbis_bitrate; - vorbis_max_bitrate = asset->vorbis_max_bitrate; - - - theora_fix_bitrate = asset->theora_fix_bitrate; - theora_bitrate = asset->theora_bitrate; - theora_quality = asset->theora_quality; - theora_sharpness = asset->theora_sharpness; - theora_keyframe_frequency = asset->theora_keyframe_frequency; - theora_keyframe_force_frequency = asset->theora_keyframe_frequency; - - jpeg_quality = asset->jpeg_quality; // mpeg parameters @@ -639,14 +612,7 @@ int Asset::write_audio(FileXML *file) // file->tag.set_property("AMPEG_BITRATE", ampeg_bitrate); // file->tag.set_property("AMPEG_DERIVATIVE", ampeg_derivative); -// -// file->tag.set_property("VORBIS_VBR", vorbis_vbr); -// file->tag.set_property("VORBIS_MIN_BITRATE", vorbis_min_bitrate); -// file->tag.set_property("VORBIS_BITRATE", vorbis_bitrate); -// file->tag.set_property("VORBIS_MAX_BITRATE", vorbis_max_bitrate); -// // file->tag.set_property("MP3_BITRATE", mp3_bitrate); -// @@ -788,18 +754,6 @@ void Asset::load_defaults(BC_Hash *defaults, ampeg_bitrate = GET_DEFAULT("AMPEG_BITRATE", ampeg_bitrate); ampeg_derivative = GET_DEFAULT("AMPEG_DERIVATIVE", ampeg_derivative); - vorbis_vbr = GET_DEFAULT("VORBIS_VBR", vorbis_vbr); - vorbis_min_bitrate = GET_DEFAULT("VORBIS_MIN_BITRATE", vorbis_min_bitrate); - vorbis_bitrate = GET_DEFAULT("VORBIS_BITRATE", vorbis_bitrate); - vorbis_max_bitrate = GET_DEFAULT("VORBIS_MAX_BITRATE", vorbis_max_bitrate); - - theora_fix_bitrate = GET_DEFAULT("THEORA_FIX_BITRATE", theora_fix_bitrate); - theora_bitrate = GET_DEFAULT("THEORA_BITRATE", theora_bitrate); - theora_quality = GET_DEFAULT("THEORA_QUALITY", theora_quality); - theora_sharpness = GET_DEFAULT("THEORA_SHARPNESS", theora_sharpness); - theora_keyframe_frequency = GET_DEFAULT("THEORA_KEYFRAME_FREQUENCY", theora_keyframe_frequency); - theora_keyframe_force_frequency = GET_DEFAULT("THEORA_FORCE_KEYFRAME_FREQUENCY", theora_keyframe_force_frequency); - GET_DEFAULT("FF_AUDIO_OPTIONS", ff_audio_options); GET_DEFAULT("FF_SAMPLE_FORMAT", ff_sample_format); ff_audio_bitrate = GET_DEFAULT("FF_AUDIO_BITRATE", ff_audio_bitrate); @@ -832,14 +786,6 @@ void Asset::load_defaults(BC_Hash *defaults, vmpeg_preset = GET_DEFAULT("VMPEG_PRESET", vmpeg_preset); vmpeg_field_order = GET_DEFAULT("VMPEG_FIELD_ORDER", vmpeg_field_order); - theora_fix_bitrate = GET_DEFAULT("THEORA_FIX_BITRATE", theora_fix_bitrate); - theora_bitrate = GET_DEFAULT("THEORA_BITRATE", theora_bitrate); - theora_quality = GET_DEFAULT("THEORA_QUALITY", theora_quality); - theora_sharpness = GET_DEFAULT("THEORA_SHARPNESS", theora_sharpness); - theora_keyframe_frequency = GET_DEFAULT("THEORA_KEYFRAME_FREQUENCY", theora_keyframe_frequency); - theora_keyframe_force_frequency = GET_DEFAULT("THEORA_FORCE_KEYFRAME_FEQUENCY", theora_keyframe_force_frequency); - - ac3_bitrate = GET_DEFAULT("AC3_BITRATE", ac3_bitrate); png_use_alpha = GET_DEFAULT("PNG_USE_ALPHA", png_use_alpha); @@ -889,11 +835,6 @@ void Asset::save_defaults(BC_Hash *defaults, UPDATE_DEFAULT("AMPEG_BITRATE", ampeg_bitrate); UPDATE_DEFAULT("AMPEG_DERIVATIVE", ampeg_derivative); - UPDATE_DEFAULT("VORBIS_VBR", vorbis_vbr); - UPDATE_DEFAULT("VORBIS_MIN_BITRATE", vorbis_min_bitrate); - UPDATE_DEFAULT("VORBIS_BITRATE", vorbis_bitrate); - UPDATE_DEFAULT("VORBIS_MAX_BITRATE", vorbis_max_bitrate); - UPDATE_DEFAULT("FF_AUDIO_OPTIONS", ff_audio_options); UPDATE_DEFAULT("FF_SAMPLE_FORMAT", ff_sample_format); UPDATE_DEFAULT("FF_AUDIO_BITRATE", ff_audio_bitrate); @@ -903,15 +844,6 @@ void Asset::save_defaults(BC_Hash *defaults, UPDATE_DEFAULT("FF_VIDEO_BITRATE", ff_video_bitrate); UPDATE_DEFAULT("FF_VIDEO_QUALITY", ff_video_quality); - UPDATE_DEFAULT("THEORA_FIX_BITRATE", theora_fix_bitrate); - UPDATE_DEFAULT("THEORA_BITRATE", theora_bitrate); - UPDATE_DEFAULT("THEORA_QUALITY", theora_quality); - UPDATE_DEFAULT("THEORA_SHARPNESS", theora_sharpness); - UPDATE_DEFAULT("THEORA_KEYFRAME_FREQUENCY", theora_keyframe_frequency); - UPDATE_DEFAULT("THEORA_FORCE_KEYFRAME_FREQUENCY", theora_keyframe_force_frequency); - - - UPDATE_DEFAULT("MP3_BITRATE", mp3_bitrate); UPDATE_DEFAULT("JPEG_QUALITY", jpeg_quality); diff --git a/cinelerra-5.1/cinelerra/asset.h b/cinelerra-5.1/cinelerra/asset.h index b877c47d..c853d7ad 100644 --- a/cinelerra-5.1/cinelerra/asset.h +++ b/cinelerra-5.1/cinelerra/asset.h @@ -163,21 +163,6 @@ public: // 2 - 3 int ampeg_derivative; -// Vorbis compression - int vorbis_min_bitrate; - int vorbis_bitrate; - int vorbis_max_bitrate; - int vorbis_vbr; - -// Theora compression - int theora_fix_bitrate; - int theora_bitrate; - int theora_quality; - int theora_sharpness; - int theora_keyframe_frequency; - int theora_keyframe_force_frequency; - - // Set by package render during file creation. -1 means square pixels. double aspect_ratio; diff --git a/cinelerra-5.1/cinelerra/file.C b/cinelerra-5.1/cinelerra/file.C index 13e1b457..c5384284 100644 --- a/cinelerra-5.1/cinelerra/file.C +++ b/cinelerra-5.1/cinelerra/file.C @@ -52,7 +52,6 @@ #include "filejpeg.h" #include "filempeg.h" #undef HAVE_STDLIB_H // automake conflict -#include "fileogg.h" #include "filepng.h" #include "fileppm.h" #include "filescene.h" @@ -60,7 +59,6 @@ #include "filetga.h" #include "filethread.h" #include "filetiff.h" -#include "filevorbis.h" #include "filexml.h" #include "formatwindow.h" #include "formattools.h" @@ -76,13 +74,6 @@ #include "samples.h" #include "vframe.h" -//static int temp_debug = 0; -//suppress noref warning -void *vorbis0_ov_callbacks[] = { - &OV_CALLBACKS_DEFAULT, &OV_CALLBACKS_NOCLOSE, - &OV_CALLBACKS_STREAMONLY, &OV_CALLBACKS_STREAMONLY_NOCLOSE, -}; - File::File() { cpus = 1; @@ -237,10 +228,6 @@ int File::get_options(FormatTools *format, FileTIFF::get_parameters(parent_window, asset, format_window, audio_options, video_options, edl); break; - case FILE_OGG: - FileOGG::get_parameters(parent_window, asset, format_window, - audio_options, video_options, edl); - break; default: break; } @@ -362,8 +349,6 @@ const char *File::default_probes[] = { "CR2", "TGA", "TIFF", - "OGG", - "Vorbis", "MPEG", "EDL", "FFMPEG_Late", @@ -461,16 +446,6 @@ int File::probe() file = new FileTIFF(this->asset, this); return FILE_OK; } - if( !strcmp(pref->name,"OGG") ) { // OGG file - if( !FileOGG::check_sig(this->asset) ) continue; - file = new FileOGG(this->asset, this); - return FILE_OK; - } - if( !strcmp(pref->name,"Vorbis") ) { // VorbisFile file - if( !FileVorbis::check_sig(this->asset) ) continue; - file = new FileVorbis(this->asset, this); - return FILE_OK; - } #ifdef HAVE_LIBZMPEG if( !strcmp(pref->name,"MPEG") ) { // MPEG file if( !FileMPEG::check_sig(this->asset) ) continue; @@ -591,13 +566,6 @@ int File::open_file(Preferences *preferences, file = new FileMPEG(this->asset, this); break; #endif - case FILE_OGG: - file = new FileOGG(this->asset, this); - break; - - case FILE_VORBIS: - file = new FileVorbis(this->asset, this); - break; #ifdef HAVE_DV case FILE_RAWDV: file = new FileDV(this->asset, this); @@ -1254,8 +1222,6 @@ int File::strtoformat(const char *format) if( !strcasecmp(format, _(VMPEG_NAME)) ) return FILE_VMPEG; if( !strcasecmp(format, _(TGA_NAME)) ) return FILE_TGA; if( !strcasecmp(format, _(TGA_LIST_NAME)) ) return FILE_TGA_LIST; - if( !strcasecmp(format, _(OGG_NAME)) ) return FILE_OGG; - if( !strcasecmp(format, _(VORBIS_NAME)) ) return FILE_VORBIS; if( !strcasecmp(format, _(RAWDV_NAME)) ) return FILE_RAWDV; if( !strcasecmp(format, _(FFMPEG_NAME)) ) return FILE_FFMPEG; if( !strcasecmp(format, _(DBASE_NAME)) ) return FILE_DB; @@ -1294,8 +1260,6 @@ const char* File::formattostr(int format) case FILE_TGA_LIST: return _(TGA_LIST_NAME); case FILE_TIFF: return _(TIFF_NAME); case FILE_TIFF_LIST: return _(TIFF_LIST_NAME); - case FILE_OGG: return _(OGG_NAME); - case FILE_VORBIS: return _(VORBIS_NAME); case FILE_RAWDV: return _(RAWDV_NAME); case FILE_FFMPEG: return _(FFMPEG_NAME); case FILE_DB: return _(DBASE_NAME); @@ -1427,7 +1391,6 @@ int64_t File::get_memory_usage() int File::renders_video(int format) { switch( format ) { - case FILE_OGG: case FILE_JPEG: case FILE_JPEG_LIST: case FILE_CR2: @@ -1463,8 +1426,6 @@ int File::renders_audio(int format) case FILE_FLAC: case FILE_PCM: case FILE_WAV: - case FILE_OGG: - case FILE_VORBIS: case FILE_AMPEG: case FILE_AU: case FILE_AIFF: @@ -1511,7 +1472,6 @@ const char* File::get_tag(int format) case FILE_FLAC: return "flac"; case FILE_JPEG: return "jpg"; case FILE_JPEG_LIST: return "jpg"; - case FILE_OGG: return "ogg"; case FILE_PCM: return "pcm"; case FILE_PNG: return "png"; case FILE_PNG_LIST: return "png"; @@ -1522,7 +1482,6 @@ const char* File::get_tag(int format) case FILE_TIFF: return "tif"; case FILE_TIFF_LIST: return "tif"; case FILE_VMPEG: return "m2v"; - case FILE_VORBIS: return "ogg"; case FILE_WAV: return "wav"; case FILE_FFMPEG: return "ffmpg"; } @@ -1556,8 +1515,6 @@ const char* File::get_prefix(int format) case FILE_EXR: return "EXR"; case FILE_EXR_LIST: return "EXR_LIST"; case FILE_CR2: return "CR2"; - case FILE_OGG: return "OGG"; - case FILE_VORBIS: return "VORBIS"; case FILE_FLAC: return "FLAC"; case FILE_FFMPEG: return "FFMPEG"; case FILE_SCENE: return "SCENE"; @@ -1571,16 +1528,7 @@ const char* File::get_prefix(int format) PackagingEngine *File::new_packaging_engine(Asset *asset) { - PackagingEngine *result; - switch( asset->format ) { - case FILE_OGG: - result = (PackagingEngine*)new PackagingEngineOGG(); - break; - default: - result = (PackagingEngine*) new PackagingEngineDefault(); - break; - } - + PackagingEngine *result = (PackagingEngine*) new PackagingEngineDefault(); return result; } diff --git a/cinelerra-5.1/cinelerra/file.inc b/cinelerra-5.1/cinelerra/file.inc index 8bcda4eb..856c4d53 100644 --- a/cinelerra-5.1/cinelerra/file.inc +++ b/cinelerra-5.1/cinelerra/file.inc @@ -81,8 +81,6 @@ #define FILE_EXR 26 #define FILE_EXR_LIST 27 #define FILE_CR2 28 -#define FILE_OGG 30 -#define FILE_VORBIS 31 #define FILE_FLAC 32 #define FILE_FFMPEG 33 #define FILE_SCENE 34 @@ -112,8 +110,6 @@ N_("Microsoft WAV") N_("MPEG Audio") // For encoding only N_("MPEG") // For decoding only N_("MPEG Video") // For encoding only -N_("OGG Theora/Vorbis") -N_("OGG Vorbis") // For decoding only N_("PNG") N_("PNG Sequence") N_("PPM") @@ -146,7 +142,6 @@ N_("Unknown sound") #define JPEG_LIST_NAME "JPEG Sequence" #define JPEG_NAME "JPEG" #define MPEG_NAME "MPEG Stream" // For capture only -#define OGG_NAME "OGG Theora/Vorbis" #define PCM_NAME "Raw PCM" #define PNG_LIST_NAME "PNG Sequence" #define PNG_NAME "PNG" @@ -160,7 +155,6 @@ N_("Unknown sound") #define TIFF_LIST_NAME "TIFF Sequence" #define TIFF_NAME "TIFF" #define VMPEG_NAME "MPEG Video" // For encoding only -#define VORBIS_NAME "OGG Vorbis" #define WAV_NAME "Microsoft WAV" #define BITSLINEAR8 8 diff --git a/cinelerra-5.1/cinelerra/fileogg.C b/cinelerra-5.1/cinelerra/fileogg.C deleted file mode 100644 index 99995fe9..00000000 --- a/cinelerra-5.1/cinelerra/fileogg.C +++ /dev/null @@ -1,2638 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "asset.h" -#include "bcsignals.h" -#include "byteorder.h" -#include "clip.h" -#include "edit.h" -#include "file.h" -#include "fileogg.h" -#include "guicast.h" -#include "interlacemodes.h" -#include "language.h" -#include "mainerror.h" -#include "mutex.h" -#include "mwindow.inc" -#include "preferences.h" -#include "render.h" -#include "vframe.h" -#include "versioninfo.h" -#include "videodevice.inc" - -#include -#include -#include -#include -#include -#include - -#define READ_SIZE 3*66000 - -/* This code was aspired by ffmpeg2theora */ -/* Special thanks for help on this code goes out to j@v2v.cc */ - -int ogg_ret0, ogg_ret1, ogg_ret2; - -FileOGG::FileOGG(Asset *asset, File *file) - : FileBase(asset, file) -{ - if(asset->format == FILE_UNKNOWN) - asset->format = FILE_OGG; - asset->byte_order = 0; - reset_parameters(); - final_write = 1; -} - -FileOGG::~FileOGG() -{ - if (tf) - { - - if (tf->videosync) - { - ogg_sync_clear(&tf->videosync->sync); - delete tf->videosync; - theora_info_clear(&tf->ti); - theora_comment_clear(&tf->tc); - } - if (tf->audiosync) - { - ogg_sync_clear(&tf->audiosync->sync); - delete tf->audiosync; - vorbis_info_clear(&tf->vi); - vorbis_comment_clear(&tf->vc); - } - if (tf->vpage) - free(tf->vpage); - if (tf->apage) - free(tf->apage); - delete tf; - } - if (temp_frame) delete temp_frame; - if (stream) close_file(); - if(pcm_history) - { - for(int i = 0; i < asset->channels; i++) - delete [] pcm_history[i]; - delete [] pcm_history; - } - - if (flush_lock) delete flush_lock; -} - -void FileOGG::get_parameters(BC_WindowBase *parent_window, - Asset *asset, BC_WindowBase* &format_window, - int audio_options, int video_options, EDL *edl) -{ - if(audio_options) - { - OGGConfigAudio *window = new OGGConfigAudio(parent_window, asset); - format_window = window; - window->create_objects(); - window->run_window(); - delete window; - } - else - if(video_options) - { - OGGConfigVideo *window = new OGGConfigVideo(parent_window, asset); - format_window = window; - window->create_objects(); - window->run_window(); - delete window; - } -} - -int FileOGG::reset_parameters_derived() -{ - tf = 0; - temp_frame = 0; - stream = 0; - flush_lock = 0; - pcm_history = 0; - start_frame = 0; - return 0; -} - -static int read_buffer(FILE *in, sync_window_t *sw, int buflen) -{ - char *buffer = ogg_sync_buffer(&sw->sync, buflen); -// printf("reading range: %lli - %lli\n", sw->file_bufpos, sw->file_bufpos + buflen); - sw->wlen = fread(buffer, 1, buflen, in); - ogg_sync_wrote(&sw->sync, sw->wlen); -// printf("XX data: %c %c %c %c\n", sw->sync.data[0], sw->sync.data[1], sw->sync.data[2], sw->sync.data[3]); - sw->file_bufpos += sw->wlen; -// printf("sb: %i\n",buffer); - return (sw->wlen); -} - -static int read_buffer_at(FILE *in, sync_window_t *sw, int buflen, off_t filepos) -{ -// printf("seeking to %lli %lli\n", filepos, sw->file_bufpos); - fseeko(in, filepos, SEEK_SET); -// if (sw->file_bufpos != filepos) -// { - sw->file_bufpos = filepos; - sw->file_pagepos = filepos; // this one is not valid until sync_pageseek! - ogg_sync_reset(&sw->sync); - -// } - return read_buffer(in, sw, buflen); -} - -static int take_page_out_autoadvance(FILE *in, sync_window_t *sw, ogg_page *og) -{ - while (1) - { - int ret = ogg_sync_pageout(&sw->sync, og); - if (ret > 0) - { -// printf("fpa: %lli\n", sw->file_pagepos); -// advance 'virtual' position - sw->file_pagepos += og->header_len + og->body_len; -// printf("ret2: %i %i\n",ret, og->header_len + og->body_len); - return ret; - } - else if (ret < 0) - { - eprintf(_("FileOGG: Taking page out on nonsynced stream!\n")); - return ret; - - } else - { - // need more data for page - if ((ret = read_buffer(in, sw, READ_SIZE)) == 0) - { - printf(_("FileOGG: There is no more data in the file we are reading from\n")); - return 0; // No more data - } - } - } - return 1; -} - - -// we never need to autoadvance when syncing, since our read chunks are larger than -// maximum page size -static int sync_and_take_page_out(sync_window_t *sw, ogg_page *page) -{ - page->header_len = 0; - page->body_len = 0; - page->header = 0; - page->body = 0; - int ret = ogg_sync_pageseek(&sw->sync, page); - if (ret < 0) - { - sw->file_pagepos -= ret; - } - else if (ret > 0) - { - sw->file_pagepos += ret; -// printf("ret: %i %i\n",ret, page->header_len + page->body_len); - } - return ret; -} - -int FileOGG::open_file(int rd, int wr) -{ - if (!tf) - { - tf = new theoraframes_info_t; - memset(tf, 0, sizeof(*tf)); - } - - - if(wr) - { - - - if((stream = fopen(asset->path, "w+b")) == 0) - { - eprintf(_("Error while opening \"%s\" for writing. %m\n"), asset->path); - return 1; - } - - tf->audio_bytesout = 0; - tf->video_bytesout = 0; - tf->videotime = 0; - tf->audiotime = 0; - - tf->vpage_valid = 0; - tf->apage_valid = 0; - tf->apage_buffer_length = 0; - tf->vpage_buffer_length = 0; - tf->apage = NULL; - tf->vpage = NULL; - tf->v_pkg=0; - tf->a_pkg=0; - - - /* yayness. Set up Ogg output stream */ - srand (time (NULL)); - - if(asset->video_data) - { - ogg_stream_init (&tf->to, rand ()); /* oops, add one ot the above */ - - theora_info_init (&tf->ti); - - tf->ti.frame_width = asset->width; - tf->ti.frame_height = asset->height; - - tf->ti.width = ((asset->width + 15) >>4)<<4; // round up to the nearest multiple of 16 - tf->ti.height = ((asset->height + 15) >>4)<<4; // round up to the nearest multiple of 16 - if (tf->ti.width != tf->ti.frame_width || tf->ti.height != tf->ti.frame_height) - { - eprintf(_("WARNING: Encoding theora when width or height are not dividable by 16 is suboptimal\n")); - } - - tf->ti.offset_x = 0; - tf->ti.offset_y = tf->ti.height - tf->ti.frame_height; - tf->ti.fps_numerator = (unsigned int)(asset->frame_rate * 1000000); - tf->ti.fps_denominator = 1000000; - - if (asset->aspect_ratio > 0) - { - // Cinelerra uses frame aspect ratio, theora uses pixel aspect ratio - float pixel_aspect = asset->aspect_ratio / asset->width * asset->height; - tf->ti.aspect_numerator = (unsigned int)(pixel_aspect * 1000000); - tf->ti.aspect_denominator = 1000000; - } else - { - tf->ti.aspect_numerator = 1000000; - tf->ti.aspect_denominator = 1000000; - } - if(EQUIV(asset->frame_rate, 25) || EQUIV(asset->frame_rate, 50)) - tf->ti.colorspace = OC_CS_ITU_REC_470BG; - else if((asset->frame_rate > 29 && asset->frame_rate < 31) || (asset->frame_rate > 59 && asset->frame_rate < 61) ) - tf->ti.colorspace = OC_CS_ITU_REC_470M; - else - tf->ti.colorspace = OC_CS_UNSPECIFIED; - - if (asset->theora_fix_bitrate) - { - tf->ti.target_bitrate = asset->theora_bitrate; - tf->ti.quality = 0; - } else - { - tf->ti.target_bitrate = 0; - tf->ti.quality = asset->theora_quality; // video quality 0-63 - } - tf->ti.dropframes_p = 0; - tf->ti.quick_p = 1; - tf->ti.keyframe_auto_p = 1; - tf->ti.keyframe_frequency = asset->theora_keyframe_frequency; - tf->ti.keyframe_frequency_force = asset->theora_keyframe_force_frequency; - tf->ti.keyframe_data_target_bitrate = (unsigned int) (tf->ti.target_bitrate * 1.5) ; - tf->ti.keyframe_auto_threshold = 80; - tf->ti.keyframe_mindistance = 8; - tf->ti.noise_sensitivity = 1; - tf->ti.sharpness = 2; - - - if (theora_encode_init (&tf->td, &tf->ti)) - { - eprintf(_("(FileOGG:file_open) initialization of theora codec failed\n")); - } - } - /* init theora done */ - - /* initialize Vorbis too, if we have audio. */ - if(asset->audio_data) - { - ogg_stream_init (&tf->vo, rand ()); - vorbis_info_init (&tf->vi); - /* Encoding using a VBR quality mode. */ - int ret; - if(!asset->vorbis_vbr) - { - ret = vorbis_encode_init(&tf->vi, - asset->channels, - asset->sample_rate, - asset->vorbis_max_bitrate, - asset->vorbis_bitrate, - asset->vorbis_min_bitrate); - } else - { - // Set true VBR as demonstrated by http://svn.xiph.org/trunk/vorbis/doc/vorbisenc/examples.html - ret = vorbis_encode_setup_managed(&tf->vi, - asset->channels, - asset->sample_rate, - -1, - asset->vorbis_bitrate, - -1); - ret |= vorbis_encode_ctl(&tf->vi, OV_ECTL_RATEMANAGE_AVG, NULL); - ret |= vorbis_encode_setup_init(&tf->vi); - } - - if (ret) - { - eprintf(_("The Vorbis encoder could not set up a mode according to\n" - "the requested quality or bitrate.\n\n")); - fclose (stream); - stream = 0; - return 1; - } - - vorbis_comment_init (&tf->vc); // comment is cleared lateron - vorbis_comment_add_tag (&tf->vc, (char*)"ENCODER", (char*)PROGRAM_NAME " " CINELERRA_VERSION); - /* set up the analysis state and auxiliary encoding storage */ - vorbis_analysis_init (&tf->vd, &tf->vi); - vorbis_block_init (&tf->vd, &tf->vb); - - } - /* audio init done */ - - /* write the bitstream header packets with proper page interleave */ - - /* first packet will get its own page automatically */ - if(asset->video_data) - { - theora_encode_header (&tf->td, &tf->op); - ogg_stream_packetin (&tf->to, &tf->op); - if (ogg_stream_pageout (&tf->to, &tf->og) != 1) - { - eprintf(_("Internal Ogg library error.\n")); - return 1; - } - fwrite (tf->og.header, 1, tf->og.header_len, stream); - fwrite (tf->og.body, 1, tf->og.body_len, stream); - - /* create the remaining theora headers */ - theora_comment_init (&tf->tc); - theora_comment_add_tag (&tf->tc, (char*)"ENCODER", - (char*)PROGRAM_NAME " " CINELERRA_VERSION); - theora_encode_comment (&tf->tc, &tf->op); - ogg_stream_packetin (&tf->to, &tf->op); - theora_comment_clear(&tf->tc); - theora_encode_tables (&tf->td, &tf->op); - ogg_stream_packetin (&tf->to, &tf->op); - } - if(asset->audio_data) - { - ogg_packet header; - ogg_packet header_comm; - ogg_packet header_code; - - vorbis_analysis_headerout (&tf->vd, &tf->vc, &header, - &header_comm, &header_code); - ogg_stream_packetin (&tf->vo, &header); /* automatically placed in its own page */ - vorbis_comment_clear(&tf->vc); - if (ogg_stream_pageout (&tf->vo, &tf->og) != 1) - { - eprintf(_("Internal Ogg library error.\n")); - return 1; - } - fwrite (tf->og.header, 1, tf->og.header_len, stream); - fwrite (tf->og.body, 1, tf->og.body_len, stream); - - /* remaining vorbis header packets */ - ogg_stream_packetin (&tf->vo, &header_comm); - ogg_stream_packetin (&tf->vo, &header_code); - } - - /* Flush the rest of our headers. This ensures - * the actual data in each stream will start - * on a new page, as per spec. */ - while (1 && asset->video_data) - { - int result = ogg_stream_flush (&tf->to, &tf->og); - if (result < 0) - { - /* can't get here */ - eprintf(_("Internal Ogg library error.\n")); - return 1; - } - if (result == 0) - break; - fwrite (tf->og.header, 1, tf->og.header_len, stream); - fwrite (tf->og.body, 1, tf->og.body_len, stream); - } - while (1 && asset->audio_data) - { - int result = ogg_stream_flush (&tf->vo, &tf->og); - if (result < 0) - { - /* can't get here */ - eprintf(_("Internal Ogg library error.\n")); - return 1; - } - if (result == 0) - break; - fwrite (tf->og.header, 1, tf->og.header_len, stream); - fwrite (tf->og.body, 1, tf->og.body_len, stream); - } - flush_lock = new Mutex("OGGFile::Flush lock"); -// printf("End of headers at position: %lli\n", ftello(stream)); - } else - if (rd) - { - - if((stream = fopen(asset->path, "rb")) == 0) - { - eprintf(_("Error while opening %s for reading. %m\n"), asset->path); - return 1; - } - - /* get file length */ - struct stat file_stat; - stat(asset->path, &file_stat); - file_length = file_stat.st_size; - - /* start up Ogg stream synchronization layer */ - /* oy is used just here to parse header, we use separate syncs for video and audio*/ - sync_window_t oy; - ogg_sync_init(&oy.sync); - // make sure we init the position structures to zero - read_buffer_at(stream, &oy, READ_SIZE, 0); - - - /* init supporting Vorbis structures needed in header parsing */ - vorbis_info_init(&tf->vi); - vorbis_comment_init(&tf->vc); - - - /* init supporting Theora structures needed in header parsing */ - theora_comment_init(&tf->tc); - theora_info_init(&tf->ti); - - - - /* Ogg file open; parse the headers */ - /* Only interested in Vorbis/Theora streams */ - int stateflag = 0; - int theora_p = 0; - int vorbis_p = 0; - while(!stateflag) - { - - -// int ret = read_buffer(stream, &oy, 4096); - TRACE("FileOGG::open_file 60") -// if(ret == 0) -// break; - - while(take_page_out_autoadvance(stream, &oy, &tf->og) > 0) - { - ogg_stream_state test; - - /* is this a mandated initial header? If not, stop parsing */ - if(!ogg_page_bos(&tf->og)) - { - /* don't leak the page; get it into the appropriate stream */ - // queue_page(&tf->og); - if(theora_p)ogg_stream_pagein(&tf->to, &tf->og); - if(vorbis_p)ogg_stream_pagein(&tf->vo, &tf->og); - - stateflag = 1; - break; - } - - ogg_stream_init(&test, ogg_page_serialno(&tf->og)); - ogg_stream_pagein(&test, &tf->og); - ogg_stream_packetout(&test, &tf->op); - - /* identify the codec: try theora */ - if(!theora_p && theora_decode_header(&tf->ti, &tf->tc, &tf->op)>=0) - { - /* it is theora */ - memcpy(&tf->to, &test, sizeof(test)); - theora_p = 1; - // find out granule shift - from liboggz's oggz_auto.c - unsigned char * header = tf->op.packet; - theora_keyframe_granule_shift = (char) ((header[40] & 0x03) << 3); - theora_keyframe_granule_shift |= (header[41] & 0xe0) >> 5; - - } else if(!vorbis_p && vorbis_synthesis_headerin(&tf->vi, &tf->vc, &tf->op)>=0) - { - /* it is vorbis */ - memcpy(&tf->vo, &test, sizeof(test)); - vorbis_p = 1; - } else - { - /* whatever it is, we don't care about it */ - ogg_stream_clear(&test); - } - } - /* fall through to non-bos page parsing */ - } - - - /* we're expecting more header packets. */ - while((theora_p && theora_p < 3) || (vorbis_p && vorbis_p < 3)) - { - int ret; - - /* look for further theora headers */ - while(theora_p && (theora_p < 3) && (ret = ogg_stream_packetout(&tf->to, &tf->op))) - { - if(ret < 0) - { - eprintf(_("FileOGG: Error parsing Theora stream headers; corrupt stream?\n")); - return 1; - } - if(theora_decode_header(&tf->ti, &tf->tc, &tf->op)) - { - eprintf(_("FileOGG: Error parsing Theora stream headers; corrupt stream?\n")); - return 1; - } - theora_p++; - if(theora_p == 3) - break; - } - - /* look for more vorbis header packets */ - while(vorbis_p && (vorbis_p < 3) && (ret = ogg_stream_packetout(&tf->vo, &tf->op))) - { - if(ret<0) - { - eprintf(_("FileOGG: Error parsing Vorbis stream headers; corrupt stream?\n")); - return 1; - } - if (vorbis_synthesis_headerin(&tf->vi, &tf->vc, &tf->op)) - { - eprintf(_("FileOGG: Error parsing Vorbis stream headers; corrupt stream?\n")); - return 1; - } - vorbis_p++; - if (vorbis_p == 3) - break; - } - - if ((!vorbis_p || vorbis_p == 3) && (!theora_p || theora_p == 3)) - break; - /* The header pages/packets will arrive before anything else we - care about, or the stream is not obeying spec */ - - if(take_page_out_autoadvance(stream, &oy, &tf->og) > 0) - { -// queue_page(&tf->og); /* demux into the appropriate stream */ - if(theora_p) ogg_stream_pagein(&tf->to, &tf->og); - if(vorbis_p) ogg_stream_pagein(&tf->vo, &tf->og); - - } else - { - eprintf(_("FileOGG: End of file while searching for codec headers.\n")); - return 1; - } - } - // Remember where the real data begins for later seeking purposes - filedata_begin = oy.file_pagepos; - - - - /* and now we have it all. initialize decoders */ - if(theora_p) - { - int ret; - -// WORKAROUND for bug in alpha4 version of theora: - tf->td.internal_encode = 0; - - ret = theora_decode_init(&tf->td, &tf->ti); - if( ret ) printf("theora_decode_init ret=%d\n", ret); - double fps = (double)tf->ti.fps_numerator/tf->ti.fps_denominator; -/* printf("FileOGG: Ogg logical stream %x is Theora %dx%d %.02f fps\n", - (unsigned int)tf->to.serialno, tf->ti.width, tf->ti.height, - fps); -*/ -/* -Not yet available in alpha4, we assume 420 for now - - switch(tf->ti.pixelformat) - { - case OC_PF_420: printf(" 4:2:0 video\n"); break; - case OC_PF_422: printf(" 4:2:2 video\n"); break; - case OC_PF_444: printf(" 4:4:4 video\n"); break; - case OC_PF_RSVD: - default: - printf(" video\n (UNKNOWN Chroma sampling!)\n"); - break; - } -*/ - - theora_cmodel = BC_YUV420P; - - if(tf->ti.width!=tf->ti.frame_width || tf->ti.height!=tf->ti.frame_height) - { - eprintf(_("Frame content is %dx%d with offset (%d,%d), We do not support this yet. You will get black border.\n"), - tf->ti.frame_width, tf->ti.frame_height, tf->ti.offset_x, tf->ti.offset_y); - } - tf->videosync = new sync_window_t; - ogg_sync_init(&tf->videosync->sync); - tf->videosync->wlen = 0; - - ret = ogg_get_first_page(tf->videosync, tf->to.serialno, &tf->videopage); - if( !ret ) printf("ogg_get_first_page ret=%d\n", ret); - ogg_packet op; - - // we have headers already decoded, so just skip them - ogg_stream_reset(&tf->to); - ogg_stream_pagein(&tf->to, &tf->videopage); - while (1) - { - while (ogg_stream_packetpeek(&tf->to, NULL) != 1) - { - if (!ogg_get_next_page(tf->videosync, tf->to.serialno, &tf->videopage)) - { - printf(_("FileOGG: Cannot find next page while looking for first non-header packet\n")); - return 1; - } - ogg_stream_pagein(&tf->to, &tf->videopage); - } - ogg_stream_packetout(&tf->to, &op); - if (!theora_packet_isheader(&op)) - break; - } - // now get to the page of the finish of the first packet - while (ogg_page_packets(&tf->videopage) == 0) - { - if (ogg_page_granulepos(&tf->videopage) != -1) - { - printf(_("FileOGG: Broken ogg file - broken page: ogg_page_packets == 0 and granulepos != -1\n")); - return 1; - } - ogg_get_next_page(tf->videosync, tf->to.serialno, &tf->videopage); - } - // FIXME - LOW PRIORITY - start counting at first decodable keyframe! - // but then we have to fix a/v sync somehow - start_frame = (int64_t) (theora_granule_frame (&tf->td, ogg_page_granulepos(&tf->videopage)) - ogg_page_packets(&tf->videopage)) + 1; - - ret = ogg_get_last_page(tf->videosync, tf->to.serialno, &tf->videopage); - last_frame = (int64_t) (theora_granule_frame (&tf->td, ogg_page_granulepos(&tf->videopage))); - asset->video_length = last_frame - start_frame + 1; -// printf("FileOGG:: first frame: %lli, last frame: %lli, video length: %lli\n", start_frame, last_frame, asset->video_length); - - asset->layers = 1; - // FIXME - LOW PRIORITY Cinelerra does not honor the frame_width and frame_height - asset->width = tf->ti.width; - asset->height = tf->ti.height; -// Don't want a user configured frame rate to get destroyed - if(!asset->frame_rate) - asset->frame_rate = fps; -// All theora material is noninterlaced by definition - if(!asset->interlace_mode) - asset->interlace_mode = ILACE_MODE_NOTINTERLACED; - - /* ogg_get_page_of_frame(tf->videosync, tf->to.serialno, &og, 0 +start_frame); - ogg_get_page_of_frame(tf->videosync, tf->to.serialno, &og, 1 +start_frame); - ogg_get_page_of_frame(tf->videosync, tf->to.serialno, &og, 5 +start_frame); - ogg_get_page_of_frame(tf->videosync, tf->to.serialno, &og, 206 +start_frame); - ogg_get_page_of_frame(tf->videosync, tf->to.serialno, &og, 207 +start_frame); - ogg_get_page_of_frame(tf->videosync, tf->to.serialno, &og, 208 +start_frame); - - int64_t kf; - ogg_seek_to_keyframe(tf->videosync, tf->to.serialno, 0 + start_frame, &kf); - ogg_seek_to_keyframe(tf->videosync, tf->to.serialno, 1 + start_frame, &kf); - ogg_seek_to_keyframe(tf->videosync, tf->to.serialno, 5 + start_frame, &kf); - ogg_seek_to_keyframe(tf->videosync, tf->to.serialno, 66 + start_frame, &kf); - //printf("Keyframe: %lli\n", kf); - ogg_seek_to_keyframe(tf->videosync, tf->to.serialno, 1274 + start_frame, &kf); -*/ - - set_video_position(0); // make sure seeking is done to the first sample - ogg_frame_position = -10; - asset->video_data = 1; - strncpy(asset->vcodec, "theo", 4); - - -// report_colorspace(&ti); -// dump_comments(&tc); - } else - { - /* tear down the partial theora setup */ - theora_info_clear(&tf->ti); - theora_comment_clear(&tf->tc); - } - - - if(vorbis_p) - { - vorbis_synthesis_init(&tf->vd, &tf->vi); - vorbis_block_init(&tf->vd, &tf->vb); -/* eprintf(_("FileOGG: Ogg logical stream %x is Vorbis %d channel %d Hz audio.\n"), - (unsigned int)tf->vo.serialno, tf->vi.channels, (int)tf->vi.rate); -*/ - /* init audio_sync structure */ - tf->audiosync = new sync_window_t; - ogg_sync_init(&tf->audiosync->sync); - tf->audiosync->wlen = 0; - - ogg_get_first_page(tf->audiosync, tf->vo.serialno, &tf->audiopage); - ogg_packet op; - ogg_stream_reset(&tf->vo); - // FIXME - LOW PRIORITY should be getting pages until one has granulepos, - // probably never happens in pracitce - ogg_ret2 = ogg_stream_pagein(&tf->vo, &tf->audiopage); - ogg_int64_t accumulated = 0; - long lastblock = -1; - int result; - while((result = ogg_stream_packetout(&tf->vo, &op))) - { - if(result > 0) - { // ignore holes - long thisblock = vorbis_packet_blocksize(&tf->vi, &op); - if(lastblock != -1) - accumulated += (lastblock + thisblock) >> 2; - lastblock = thisblock; - } - } - start_sample = ogg_page_granulepos(&tf->audiopage) - accumulated; -/* - printf("Begin: %lli, To byte: %lli, granule: %lli, serialno: %x\n", - tf->audiosync->file_pagepos_found, - tf->audiosync->file_pagepos_found + tf->audiopage.body_len + tf->audiopage.header_len, - ogg_page_granulepos(&tf->audiopage), - ogg_page_serialno(&tf->audiopage)); - while (ogg_get_next_page(tf->audiosync, tf->vo.serialno, &tf->audiopage)) - printf("At byte: %lli, To byte: %lli, granule: %lli, serialno: %x\n", - tf->audiosync->file_pagepos_found, - tf->audiosync->file_pagepos_found + tf->audiopage.body_len + tf->audiopage.header_len, - ogg_page_granulepos(&tf->audiopage), - ogg_page_serialno(&tf->audiopage)); -*/ - - ogg_ret1 = ogg_get_last_page(tf->audiosync, tf->vo.serialno, &tf->audiopage); - last_sample = ogg_page_granulepos(&tf->audiopage); - asset->audio_length = last_sample - start_sample; - -/* printf("FileOGG:: First sample: %lli, last_sample: %lli\n", start_sample, last_sample); - printf("FileOGG:: audio length: samples: %lli, playing time: %f\n", asset->audio_length, 1.0 * asset->audio_length / tf->vi.rate); -*/ -/* printf("End: %lli, To byte: %lli, granule: %lli, serialno: %x\n", - tf->audiosync->file_pagepos_found, - tf->audiosync->file_pagepos_found + tf->audiopage.body_len + tf->audiopage.header_len, - ogg_page_granulepos(&tf->audiopage), - ogg_page_serialno(&tf->audiopage)); - while (ogg_get_prev_page(tf->audiosync, tf->vo.serialno, &tf->audiopage)) - printf("At byte: %lli, To byte: %lli, granule: %lli, serialno: %x\n", - tf->audiosync->file_pagepos_found, - tf->audiosync->file_pagepos_found + tf->audiopage.body_len + tf->audiopage.header_len, - ogg_page_granulepos(&tf->audiopage), - ogg_page_serialno(&tf->audiopage)); -*/ - -/* ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 0); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 1); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 50); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 5000); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 30000); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 50000); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 90000); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 95999); - ogg_get_page_of_sample(tf->audiosync, tf->vo.serialno, &tf->audiopage, 96000); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 0); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 1); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 5000); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 30000); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 50000); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 90000); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 95999); - ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, 96000); -*/ - asset->channels = tf->vi.channels; - if(!asset->sample_rate) - asset->sample_rate = tf->vi.rate; - asset->audio_data = 1; - - - ogg_sample_position = -10; - set_audio_position(0); // make sure seeking is done to the first sample - strncpy(asset->acodec, "vorb", 4); - - - } else - { - /* tear down the partial vorbis setup */ - vorbis_info_clear(&tf->vi); - vorbis_comment_clear(&tf->vc); - } - - ogg_sync_clear(&oy.sync); - - } - return 0; -} - -int FileOGG::ogg_get_prev_page(sync_window_t *sw, long serialno, ogg_page *og) -{ - ogg_page page; - off_t filepos = sw->file_pagepos_found - READ_SIZE; - int first_page_offset = 0; - int done = 0; - int read_len = READ_SIZE; - -// printf("fp: %lli pagepos found: %lli\n", filepos, sw->file_pagepos_found); - while (!done) - { - if (filepos < 0) - { -// read_len = read_len - (filedata_begin - filepos); - read_len = read_len + filepos; - filepos = 0; - } - if (read_len <= 0) - return 0; - int have_read = read_buffer_at(stream, sw, read_len, filepos); - -// printf("reading at %lli, len: %i, read: %i, pagepos: %lli, pageposfound: %lli\n", filepos, read_len, have_read, sw->file_pagepos, sw->file_pagepos_found); -// printf("Buffer position: %lli\n", sw->file_bufpos); -// printf("SS: storage: %i, fill: %i, returned: %i\n", sw->sync.storage, sw->sync.fill, sw->sync.returned); -// printf("US: unsynced%i, headrebytes: %i, bodybyes: %i\n", sw->sync.unsynced, sw->sync.headerbytes, sw->sync.bodybytes); -// printf("data: %c %c %c %c\n", sw->sync.data[0], sw->sync.data[1], sw->sync.data[2], sw->sync.data[3]); - if (!have_read) - return 0; - -// read all pages in the buffer - int page_offset = 0; - int page_length = 0; - int first_page = 1; - while (first_page || page_length) - { - // if negative, skip bytes - while ((page_length = sync_and_take_page_out(sw, &page)) < 0) - { - page_offset -= page_length; - -// if (filepos == 0) -// printf("BBBb page_len: %i\n", page_length); - } -// if (filepos == 0 && page_length) -// { -// printf("AAAAAAAAAAAAAAAAAAAAAAAAAaaa\n"); -// printf("pp: %lli %x\n", sw->file_pagepos, ogg_page_serialno(&page)); -// } - if (first_page) - first_page_offset = page_offset; - first_page = 0; -// printf("pl: %i, serial: %x iscem: %x\n", page_length, ogg_page_serialno(&page), serialno); - if (page_length && ogg_page_serialno(&page) == serialno) - { - // we will copy every page until last page in this buffer - done = 1; - - sw->file_pagepos_found = sw->file_pagepos - page.header_len - page.body_len; -// printf("got it : %lli %i %i\n", sw->file_pagepos, page.header_len, page.body_len); - memcpy(og, &page, sizeof(page)); - } - } -// printf("fpo: %i\n", first_page_offset); - filepos += first_page_offset - READ_SIZE; - } - -// printf("finished\n"); - if (done) - return 1; - else - return 0; -} - -int FileOGG::ogg_get_last_page(sync_window_t *sw, long serialno, ogg_page *og) -{ - ogg_page page; - off_t filepos = file_length - READ_SIZE; - if (filepos < 0) - filepos = 0; - - int first_page_offset = 0; - int done = 0; - while (!done && filepos >= 0) - { - //int readlen = - read_buffer_at(stream, sw, READ_SIZE, filepos); - -// read all pages in the buffer - int page_offset = 0; - int page_length = 0; - int first_page = 1; - while (first_page || page_length) - { - // if negative, skip bytes - while ((page_length = sync_and_take_page_out(sw, &page)) < 0) - page_offset -= page_length; - if (first_page) - first_page_offset = page_offset; - first_page = 0; - if (page_length && ogg_page_serialno(&page) == serialno) - { - // we will copy every page until last page in this buffer - done = 1; - sw->file_pagepos_found = sw->file_pagepos - page.header_len - page.body_len; - memcpy(og, &page, sizeof(page)); - } - } - filepos = filepos + first_page_offset - READ_SIZE; - } - - if (done) - return 1; - else - return 0; -} - -int FileOGG::ogg_get_first_page(sync_window_t *sw, long serialno, ogg_page *og) -{ -// printf("FileOGG:: Seeking to first page at %lli\n", filedata_begin); - read_buffer_at(stream, sw, READ_SIZE, 0); -// we don't even need to sync since we _know_ it is right - return (ogg_get_next_page(sw, serialno, og)); -} - -int FileOGG::ogg_seek_to_databegin(sync_window_t *sw, long serialno) -{ - -// printf("FileOGG:: Seeking to first page at %lli\n", filedata_begin); - read_buffer_at(stream, sw, READ_SIZE, filedata_begin); -// we don't even need to sync since we _know_ it is right - return (0); -} - -int FileOGG::ogg_get_next_page(sync_window_t *sw, long serialno, ogg_page *og) -{ - while (take_page_out_autoadvance(stream, sw, og) > 0) - { - if (ogg_page_serialno(og) == serialno) - { - sw->file_pagepos_found = sw->file_pagepos - og->header_len - og->body_len; - return 1; - } - } - return 0; -} - -int FileOGG::ogg_sync_and_get_next_page(sync_window_t *sw, long serialno, ogg_page *og) -{ -// TODO: Put better error reporting inhere - int ret; - while ((ret = sync_and_take_page_out(sw, og)) < 0) - { - // do nothing; - } - if (ret == 0) - return 0; - if (ogg_page_serialno(og) == serialno) - { - sw->file_pagepos_found = sw->file_pagepos - og->header_len - og->body_len; - return 1; - } - while (ogg_get_next_page(sw, serialno, og)) - if (ogg_page_serialno(og) == serialno) - { - sw->file_pagepos_found = sw->file_pagepos - og->header_len - og->body_len; - return 1; - } - - return 0; -} -// Returns: -// >= 0, number of sample within a page -// < 0 error -int FileOGG::ogg_get_page_of_sample(sync_window_t *sw, long serialno, ogg_page *og, int64_t sample) -{ -// First make an educated guess about position - if (sample >= asset->audio_length + start_sample) - { - printf(_("FileOGG: Illegal seek beyond end of samples\n")); - return 0; - } - off_t educated_guess = filedata_begin + (file_length - filedata_begin) * (sample - start_sample) / asset->audio_length - READ_SIZE; - if (educated_guess < 0) - educated_guess = 0; -// printf("My educated guess: %lli\n", educated_guess); -// now see if we won - read_buffer_at(stream, sw, READ_SIZE, educated_guess); - ogg_sync_and_get_next_page(sw, serialno, og); - int64_t end_sample = ogg_page_granulepos(og); - // linear seek to the sample - int64_t start_sample = 0; -// TODO: Use bisection also -// printf("Next page granulepos: %lli, pagepos: %lli\n", end_sample, sw->file_pagepos_found); - if (end_sample <= sample) - { - // scan forward - while (end_sample <= sample) - { - ogg_get_next_page(sw, serialno, og); - start_sample = end_sample; - end_sample = ogg_page_granulepos(og); - } - ogg_get_prev_page(sw, serialno, og); - while (ogg_page_continued(og) && ogg_page_packets(og) == 1) - ogg_get_prev_page(sw, serialno, og); - } else - { - // scan backward - start_sample = end_sample; - while (start_sample > sample || (ogg_page_continued(og) && - ogg_page_packets(og) == 1)) - { -// printf("get prev page: %lli pagepos:%lli\n", ogg_page_granulepos(og), sw->file_pagepos_found); - ogg_get_prev_page(sw, serialno, og); - end_sample = start_sample; - start_sample = ogg_page_granulepos(og); - } - // go forward one page at the end - - } - -// printf("For sample %lli we need to start decoding on page with granulepos: %lli\n", sample, ogg_page_granulepos(og)); - return 1; -} - -// seeks, so next sample returned will be the correct one -// sample here is still the vorbis sample number (= cinelerra sample number + start_sample) -// reinits the decoding engine - -int FileOGG::ogg_seek_to_sample(sync_window_t *sw, long serialno, int64_t sample) -{ - // MAYBE FIXME - find out if we really are decoding previous two packets or not - // get to the sample - ogg_page og; - ogg_packet op; -// printf("Calling get page of sample\n"); - if (!ogg_get_page_of_sample(sw, serialno, &og, sample)) - { - eprintf(_("FileOGG: Seeking to sample's page failed\n")); - return 0; - } -// printf("Pagepos: %lli\n", sw->file_pagepos); - vorbis_synthesis_restart(&tf->vd); - ogg_stream_reset(&tf->vo); - ogg_stream_pagein(&tf->vo, &og); - int sync = 0; -// printf("seeking to sample : %lli , starting at page with gpos: %lli\n", sample, ogg_page_granulepos(&og)); - - int64_t current_comming_sample = -1; - while (1) - { - - // make sure we have a packet ready - while (ogg_stream_packetpeek(&tf->vo, NULL) != 1) - { - if (!ogg_get_next_page(sw, serialno, &og)) - { - eprintf(_("FileOGG: Cannot find next page while seeking\n")); - return 0; - } - ogg_stream_pagein(&tf->vo, &og); - } - ogg_stream_packetout(&tf->vo, &op); - if (sync) - { - - if(!vorbis_synthesis(&tf->vb, &op)) - { - ogg_ret0 = vorbis_synthesis_blockin(&tf->vd, &tf->vb); - int64_t previous_comming_sample = current_comming_sample; - current_comming_sample += vorbis_synthesis_pcmout(&tf->vd, NULL); - if (current_comming_sample > sample) - { - if (previous_comming_sample > sample) - { - eprintf(_("Ogg decoding error while seeking sample\n")); - } - vorbis_synthesis_read(&tf->vd, (sample - previous_comming_sample)); -// printf("WE GOT IT, samples already decoded: %jd\n", vorbis_synthesis_pcmout(&tf->vd,NULL)); - return 1; // YAY next sample read is going to be ours, sexy! - } else - { - // discard decoded data before current sample - vorbis_synthesis_read(&tf->vd, (current_comming_sample - previous_comming_sample)); - - } - } - } - if (!sync && op.granulepos >= 0) - { - sync = 1; - current_comming_sample = op.granulepos; - if(!vorbis_synthesis(&tf->vb, &op)) - { - vorbis_synthesis_blockin(&tf->vd, &tf->vb); - if (vorbis_synthesis_pcmout(&tf->vd, NULL) != 0) - { - eprintf(_("FileOGG: Something wrong while trying to seek\n")); - return 0; - } - - } - - } - } - - - return 0; -} - -int FileOGG::ogg_get_page_of_frame(sync_window_t *sw, long serialno, ogg_page *og, int64_t frame) -{ - if (frame >= asset->video_length + start_frame) - { - eprintf(_("FileOGG: Illegal seek beyond end of frames\n")); - return 0; - } -// printf("frame: %lli start frame: %lli\n", frame, start_frame); -// printf("file_length: %lli filedata_begin: %lli\n", file_length, filedata_begin); - off_t educated_guess = filedata_begin + (file_length - filedata_begin) * (frame - start_frame) / asset->video_length - READ_SIZE/2; -// educated_guess += 100000; - if (educated_guess > file_length - READ_SIZE) - educated_guess = file_length - READ_SIZE; - if (educated_guess < filedata_begin) - educated_guess = filedata_begin; -// printf("My educated guess: %lli\n", educated_guess); -// now see if we won - read_buffer_at(stream, sw, READ_SIZE, educated_guess); - if( !ogg_sync_and_get_next_page(sw, serialno, og) ) { - printf(_("FileOGG: ogg_sync_and_get_next_page failed\n")); - return 0; - } - int64_t pageend_frame; - //int read_back = 0; - // find the page with "real" ending - while ((pageend_frame = ogg_page_granulepos(og)) == -1) - { - if (ogg_get_next_page(sw, serialno, og) == 0) - { - //read_back = 1; - break; - } - } - pageend_frame = theora_granule_frame(&tf->td, ogg_page_granulepos(og)); - - // FIXME - MEDIUM PRIORITY: read back if we've gone too far and no page of our serialno at all can be found - - - // linear seek to the sample -// TODO: Use bisection also -// printf("Next page granulepos: %lli, pagepos: %lli\n", end_sample, sw->file_pagepos_found); - //int discard_packets = 0; - int missp = 0; - int missm = 0; - if (pageend_frame <= frame) - { - // scan forward - while (pageend_frame < frame) - { - do { - ogg_get_next_page(sw, serialno, og); - } while (ogg_page_packets(og) == 0); - pageend_frame = theora_granule_frame(&tf->td, ogg_page_granulepos(og)); - missp++; - } - // go back if this frame starts on previous page - if (ogg_page_continued(og) && pageend_frame - ogg_page_packets(og) == frame - 1) - { - do { - ogg_get_prev_page(sw, serialno, og); - } while (ogg_page_packets(og) == 0 && ogg_page_continued(og)); - } - pageend_frame = theora_granule_frame(&tf->td, ogg_page_granulepos(og)); - } else - { - // scan backward - int64_t first_frame_on_page = theora_granule_frame(&tf->td, ogg_page_granulepos(og)) - ogg_page_packets(og) + 2; - if (!ogg_page_continued(og)) - first_frame_on_page--; - while (first_frame_on_page > frame) - { -// printf("get prev page: %lli pagepos:%lli\n", ogg_page_granulepos(og), sw->file_pagepos_found); - do { - ogg_get_prev_page(sw, serialno, og); - } while (ogg_page_packets(og) == 0 && ogg_page_continued(og)); - missm++; -// pageend_frame = theora_granule_frame(&tf->td, ogg_page_granulepos(og)); - first_frame_on_page = theora_granule_frame(&tf->td, ogg_page_granulepos(og)) - ogg_page_packets(og) + 2; - if (!ogg_page_continued(og)) - first_frame_on_page--; - } - } -// printf("Miss plus: %i, miss minus: %i\n", missp, missm); -// printf("last frame of page with frame : %lli\n", pageend_frame); - return 1; -} - - -int FileOGG::ogg_seek_to_keyframe(sync_window_t *sw, long serialno, int64_t frame, int64_t *position) -{ -//printf("seek %jd\n", frame); - ogg_page og; - ogg_packet op; - - if( !ogg_get_page_of_frame(sw, serialno, &og, frame) ) { - eprintf(_("FileOGG: seek to frame failed\n")); - return 0; - } - // find a page with packets - while( ogg_page_packets(&og) == 0 ) { - ogg_get_prev_page(sw, serialno, &og); - } - int64_t granulepos = ogg_page_granulepos(&og); - granulepos &= ~((1<td, granulepos); - // iframe based on granulepos - if( frame < iframe || !ogg_get_page_of_frame(sw, serialno, &og, iframe) ) { - eprintf(_("FileOGG: seek to iframe failed\n")); - return 0; - } - while( ogg_page_packets(&og) == 0 ) { - ogg_get_prev_page(sw, serialno, &og); - } - int64_t pageend_frame = theora_granule_frame(&tf->td, ogg_page_granulepos(&og)); - int64_t frames_on_page = ogg_page_packets(&og); - if( ogg_page_continued(&og) ) --frames_on_page; - // get frame before page with with iframe - int64_t page_frame = pageend_frame - frames_on_page; - if( page_frame < 0 ) page_frame = 0; -//printf("iframe %jd, page_frame %jd, frames_on_page %jd\n", iframe, page_frame, frames_on_page); - ogg_stream_reset(&tf->to); - ogg_stream_pagein(&tf->to, &og); - - while( ++page_frame < iframe ) { - while( ogg_stream_packetpeek(&tf->to, NULL) != 1 ) { - if( !ogg_get_next_page(sw, serialno, &og) ) { - eprintf(_("FileOGG: Cannot find next page while seeking\n")); - return 0; - } - ogg_stream_pagein(&tf->to, &og); - } - ogg_stream_packetout(&tf->to, &op); - } - - *position = iframe - 1; - return 1; -} - - -int FileOGG::check_sig(Asset *asset) -{ - - FILE *fd = fopen(asset->path, "rb"); - -// Test for "OggS" - fseek(fd, 0, SEEK_SET); - char data[4]; - - (void)fread(data, 4, 1, fd); - - if(data[0] == 'O' && - data[1] == 'g' && - data[2] == 'g' && - data[3] == 'S') - { - - fclose(fd); -// printf("Yay, we have an ogg file\n"); - return 1; - } - - fclose(fd); - - return 0; - -} - -int FileOGG::close_file() -{ - - if (file->wr) - { - if (final_write) - { - if (asset->audio_data) - write_samples_vorbis(0, 0, 1); // set eos - if (asset->video_data) - write_frames_theora(0, 1, 1); // set eos - } - flush_ogg(1); // flush all - - if (asset->audio_data) - { - vorbis_block_clear (&tf->vb); - vorbis_dsp_clear (&tf->vd); - vorbis_info_clear (&tf->vi); - ogg_stream_clear (&tf->vo); - } - if (asset->video_data) - { - theora_info_clear (&tf->ti); - ogg_stream_clear (&tf->to); - theora_clear (&tf->td); - } - - if (stream) fclose(stream); - stream = 0; - } - else - if (file->rd) - { - if (asset->audio_data) - { - vorbis_block_clear (&tf->vb); - vorbis_dsp_clear (&tf->vd); - vorbis_comment_clear (&tf->vc); - vorbis_info_clear (&tf->vi); - ogg_stream_clear (&tf->vo); - } - theora_comment_clear(&tf->tc); - if (asset->video_data) - { - theora_info_clear (&tf->ti); - theora_comment_clear (&tf->tc); - theora_clear (&tf->td); - ogg_stream_clear (&tf->to); - } - - - if (stream) fclose(stream); - stream = 0; - - } - return 0; -} - -int FileOGG::close_file_derived() -{ -//printf("FileOGG::close_file_derived(): 1\n"); - if (stream) fclose(stream); - stream = 0; - return 0; -} - -int64_t FileOGG::get_video_position() -{ -// printf("GVP\n"); - return next_frame_position - start_frame; -} - -int64_t FileOGG::get_audio_position() -{ - return next_sample_position - start_sample; -} - -int FileOGG::set_video_position(int64_t x) -{ -// x=0; -// printf("SVP: %lli\n", x); - - next_frame_position = x + start_frame; - return 1; -} - - -int FileOGG::colormodel_supported(int colormodel) -{ -// printf("CMS\n"); - - if (colormodel == BC_YUV420P) - return BC_YUV420P; - else - return colormodel; -} -int FileOGG::get_best_colormodel(Asset *asset, int driver) -{ - - return BC_YUV420P; -} - - -int FileOGG::read_frame(VFrame *frame) -{ - - if(!stream) return 1; - - - // skip is cheaper than seek, do it... - int decode_frames = 0; - int expect_keyframe = 0; - if (ogg_frame_position >= 0 && - next_frame_position >= ogg_frame_position && - next_frame_position - ogg_frame_position < 32) - { - decode_frames = next_frame_position - ogg_frame_position; - } else - if (next_frame_position != ogg_frame_position) - { - if (!ogg_seek_to_keyframe(tf->videosync, tf->to.serialno, - next_frame_position, &ogg_frame_position)) { - eprintf(_("FileOGG:: Error while seeking to frame's keyframe" - " (frame: %jd, keyframe: %jd)\n"), - next_frame_position, ogg_frame_position); - return 1; - } -// printf("For frame: %lli, keyframe is: %lli\n", next_frame_position,ogg_frame_position); - // skip frames must be > 0 here - decode_frames = next_frame_position - ogg_frame_position; - if (decode_frames <= 0) - { - eprintf(_("FileOGG:: Error while seeking to keyframe," - " wrong keyframe number (frame: %jd, keyframe: %jd)\n"), - next_frame_position, ogg_frame_position); - return 1; - - } - expect_keyframe = 1; - } - -// printf("Frames to decode: %i\n", decode_frames); - -// THIS IS WHAT CAUSES SLOWNESS OF SEEKING, but we can do nothing about it. - int ret = -1; - while (decode_frames > 0) - { - ogg_page og; - ogg_packet op; - while (ogg_stream_packetpeek(&tf->to, NULL) != 1) - { - if (!ogg_get_next_page(tf->videosync, tf->to.serialno, &og)) - { - eprintf(_("FileOGG: Cannot find next page while seeking\n")); - return 1; - } - ogg_stream_pagein(&tf->to, &og); - } - ogg_stream_packetout(&tf->to, &op); - if( theora_packet_isheader(&op) ) continue; -//printf("frame %jd, key %d\n", ogg_frame_position, theora_packet_iskeyframe(&op)); - if (expect_keyframe && !theora_packet_iskeyframe(&op)) - { - eprintf(_("FileOGG: Expecting keyframe, but didn't get it\n")); - // return 1; this is generally not a fatal error - } - expect_keyframe = 0; - - // decode - ret = theora_decode_packetin(&tf->td, &op); -//if(ret < 0 )printf("ret = %d\n", ret); - decode_frames --; - ogg_frame_position ++; - } - if( ret >= 0 ) { - yuv_buffer yuv; - int ret = theora_decode_YUVout (&tf->td, &yuv); - if (ret) - { - eprintf(_("FileOGG: theora_decode_YUVout failed with code %i\n"), ret); - } - -// Dirty magic -/* yuv.y += yuv.y_stride * (yuv.y_height - 1); - yuv.u += yuv.uv_stride * (yuv.uv_height - 1); - yuv.v += yuv.uv_stride * (yuv.uv_height - 1); - yuv.y_stride = - yuv.y_stride; - yuv.uv_stride = - yuv.uv_stride;*/ - VFrame *temp_frame = new VFrame(yuv.y, -1, 0, - yuv.u - yuv.y, yuv.v - yuv.y, - yuv.y_stride, - yuv.y_height, BC_YUV420P, - yuv.y_stride); - // copy into temp frame... - - BC_CModels::transfer(frame->get_rows(), - temp_frame->get_rows(), - frame->get_y(), - frame->get_u(), - frame->get_v(), - temp_frame->get_y(), - temp_frame->get_u(), - temp_frame->get_v(), - 0, - 0, - yuv.y_width, - yuv.y_height, - 0, - 0, - yuv.y_width, // temp_frame can be larger than frame if width not dividable by 16 - yuv.y_height, - BC_YUV420P, - frame->get_color_model(), - 0, - -temp_frame->get_w(), - frame->get_w()); - delete temp_frame; - } - - next_frame_position ++; - - return 0; -} - - - -int FileOGG::ogg_decode_more_samples(sync_window_t *sw, long serialno) -{ - ogg_page og; - ogg_packet op; - int done = 0; - while (!done) - { - while (ogg_stream_packetpeek(&tf->vo, NULL) != 1) - { - if (!ogg_get_next_page(sw, serialno, &og)) - { - eprintf(_("FileOGG: Cannot find next page while trying to decode more samples\n")); - return 0; - } - ogg_stream_pagein(&tf->vo, &og); - } - ogg_stream_packetout(&tf->vo, &op); - if(!vorbis_synthesis(&tf->vb, &op)) - { - done = 1; - vorbis_synthesis_blockin(&tf->vd, &tf->vb); - } - } - return 1; -} - -int FileOGG::set_audio_position(int64_t x) -{ - next_sample_position = x + start_sample; - return 0; -} - -int FileOGG::move_history(int from, int to, int len) -{ - if( len > 0 ) { - for(int i = 0; i < asset->channels; i++) - memmove(pcm_history[i] + to, pcm_history[i] + from, sizeof(float) * len); - } - history_start = history_start + from - to; - if( history_start < 0 ) history_start = 0; - return 0; -} - -int FileOGG::read_samples(double *buffer, int64_t len) -{ - float **vorbis_buffer; - if (len <= 0) - return 0; -// printf("Reading samples: Channel: %i, number of samples: %lli, reading at :%lli\n", file->current_channel, len, next_sample_position); -// printf("\tnext_sample_position: %lli, length: %i\n", next_sample_position, len); -// printf("\thistory_start: %lli, length: %i\n", history_start, history_size); - - if(len > HISTORY_MAX) - { - eprintf(_("max samples=%d\n"), HISTORY_MAX); - return 1; - } - - if(!pcm_history) - { - pcm_history = new float*[asset->channels]; - for(int i = 0; i < asset->channels; i++) - pcm_history[i] = new float[HISTORY_MAX]; - history_start = -100000000; // insane value to trigger reload - history_size = 0; - } - - int64_t hole_start = -1; - int64_t hole_len = -1; - int64_t hole_absstart = -1; - int64_t hole_fill = 0; - - if (history_start < next_sample_position && history_start + history_size > next_sample_position && history_start + history_size < next_sample_position + len) - { -// printf("a\n"); - hole_fill = 1; - hole_start = history_start + history_size - next_sample_position; - hole_len = history_size - hole_start; - hole_absstart = next_sample_position + hole_start; - move_history(next_sample_position - history_start, - 0, - hole_start); // - - } else - if (next_sample_position < history_start && history_start < next_sample_position + len) - { -// printf("b\n"); - hole_fill = 1; - hole_start = 0; - hole_len = history_start - next_sample_position; - hole_absstart = next_sample_position; -// printf("hs: %lli, histstart: %lli, next_sample_position: %lli\n", history_size, history_start, next_sample_position); -// printf("to: 0, from: %lli, size: %lli\n", - // history_start - next_sample_position, -// history_size - history_start + next_sample_position); - move_history(0, - history_start - next_sample_position, - history_size - history_start + next_sample_position); - - } else - if (next_sample_position >= history_start + history_size || next_sample_position + len <= history_start) - { -// printf("c\n"); - hole_fill = 1; - hole_start = 0; - hole_len = HISTORY_MAX; - hole_absstart = next_sample_position; - history_start = hole_absstart; - history_size = hole_len; - } - - if (hole_fill) - { - if (hole_start < 0 || hole_len <= 0 || hole_absstart < 0) - { - eprintf(_("FileOGG: Error at finding out what to read from file\n")); - return 1; - } - - if (hole_absstart + hole_len > asset->audio_length + start_sample) - { - hole_len = asset->audio_length + start_sample - hole_absstart; - history_size = asset->audio_length + start_sample - history_start; - } else - { - history_size = HISTORY_MAX; - } - - -// printf("Decode samples at position: %lli, samples to read: %lli\n", hole_absstart, hole_len); - - int64_t samples_read = 0; - if (ogg_sample_position != hole_absstart) - { - ogg_sample_position = hole_absstart; - if (!ogg_seek_to_sample(tf->audiosync, tf->vo.serialno, ogg_sample_position)) - { - eprintf(_("Error while seeking to sample\n")); - return 1; - } - } - // now we have ogg_sample_positon aligned - int64_t samples_to_read = hole_len; - while (samples_read < hole_len) - { - int64_t waiting_samples = vorbis_synthesis_pcmout(&tf->vd, &vorbis_buffer); - int64_t takeout_samples; - if (waiting_samples > samples_to_read - samples_read) - takeout_samples = samples_to_read - samples_read; - else - takeout_samples = waiting_samples; - -// printf("takeout samples: %lli, samples_read: %lli\n", takeout_samples, samples_read); - - if(waiting_samples) - { - for(int i = 0; i < asset->channels; i++) - { - float *input = vorbis_buffer[i]; - float *output = pcm_history[i] + hole_start; - // TODO: use memcpy - for(int j = 0; j < takeout_samples ; j++) - { - output[j] = input[j]; - } - } - } - - vorbis_synthesis_read(&tf->vd, takeout_samples); - samples_read += takeout_samples; - ogg_sample_position += takeout_samples; - hole_start += takeout_samples; - - if (samples_read < hole_len) - if (!ogg_decode_more_samples(tf->audiosync, tf->vo.serialno)) - { - ogg_sample_position = -1; - return 1; - } - - - } - } - - // now we can be sure our history is correct, just copy it out - if (next_sample_position < history_start || next_sample_position + len > history_start + history_size) - { - printf(_("FileOGG:: History not aligned properly \n")); - printf(_("\tnext_sample_position: %jd, length: %jd\n"), next_sample_position, len); - printf(_("\thistory_start: %jd, length: %jd\n"), history_start, history_size); - return 1; - } - float *input = pcm_history[file->current_channel] + next_sample_position - history_start; - for (int i = 0; i < len; i++) - buffer[i] = input[i]; - - next_sample_position += len; - return 0; -} - - -int FileOGG::write_audio_page() -{ - int ret; - - ret = fwrite(tf->apage, 1, tf->apage_len, stream); - if(ret < tf->apage_len) - { - eprintf(_("error writing audio page\n")); - } - tf->apage_valid = 0; - tf->a_pkg -= ogg_page_packets((ogg_page *)&tf->apage); - return ret; -} - -int FileOGG::write_video_page() -{ - int ret; - - ret = fwrite(tf->vpage, 1, tf->vpage_len, stream); - if(ret < tf->vpage_len) - { - eprintf(_("error writing video page\n")); - } - tf->vpage_valid = 0; - tf->v_pkg -= ogg_page_packets((ogg_page *)&tf->vpage); - return ret; -} - -void FileOGG::flush_ogg (int e_o_s) -{ - int len; - ogg_page og; - - flush_lock->lock(); - /* flush out the ogg pages */ - while(1) { - /* Get pages for both streams, if not already present, and if available.*/ - if(asset->video_data && !tf->vpage_valid) { - // this way seeking is much better, - // not sure if 23 packets is a good value. it works though - int v_next=0; - if(tf->v_pkg>22 && ogg_stream_flush(&tf->to, &og) > 0) { - v_next=1; - } - else if(ogg_stream_pageout(&tf->to, &og) > 0) { - v_next=1; - } - if(v_next) { - len = og.header_len + og.body_len; - if(tf->vpage_buffer_length < len) { - tf->vpage = (unsigned char *)realloc(tf->vpage, len); - tf->vpage_buffer_length = len; - } - tf->vpage_len = len; - memcpy(tf->vpage, og.header, og.header_len); - memcpy(tf->vpage+og.header_len , og.body, og.body_len); - - tf->vpage_valid = 1; - tf->videotime = theora_granule_time (&tf->td, - ogg_page_granulepos(&og)); - } - } - if(asset->audio_data && !tf->apage_valid) { - // this way seeking is much better, - // not sure if 23 packets is a good value. it works though - int a_next=0; - if(tf->a_pkg>22 && ogg_stream_flush(&tf->vo, &og) > 0) { - a_next=1; - } - else if(ogg_stream_pageout(&tf->vo, &og) > 0) { - a_next=1; - } - if(a_next) { - len = og.header_len + og.body_len; - if(tf->apage_buffer_length < len) { - tf->apage = (unsigned char *)realloc(tf->apage, len); - tf->apage_buffer_length = len; - } - tf->apage_len = len; - memcpy(tf->apage, og.header, og.header_len); - memcpy(tf->apage+og.header_len , og.body, og.body_len); - - tf->apage_valid = 1; - tf->audiotime= vorbis_granule_time (&tf->vd, - ogg_page_granulepos(&og)); - } - } - - if(!asset->audio_data && tf->vpage_valid) { - write_video_page(); - } - else if(!asset->video_data && tf->apage_valid) { - write_audio_page(); - } - /* We're using both. We can output only: - * a) If we have valid pages for both - * b) At EOS, for the remaining stream. - */ - else if(tf->vpage_valid && tf->apage_valid) { - /* Make sure they're in the right order. */ - if(tf->videotime <= tf->audiotime) - write_video_page(); - else - write_audio_page(); - } - else if(e_o_s && tf->vpage_valid) { - write_video_page(); - } - else if(e_o_s && tf->apage_valid) { - write_audio_page(); - } - else { - break; /* Nothing more writable at the moment */ - } - } - flush_lock->unlock(); -} - - -int FileOGG::write_samples_vorbis(double **buffer, int64_t len, int e_o_s) -{ - float **vorbis_buffer; - static int samples = 0; - samples += len; - if(e_o_s) - { - vorbis_analysis_wrote (&tf->vd, 0); - } else - { - vorbis_buffer = vorbis_analysis_buffer (&tf->vd, len); - /* double to float conversion */ - for(int i = 0; ichannels; i++) - { - for (int j = 0; j < len; j++) - { - vorbis_buffer[i][j] = buffer[i][j]; - } - } - vorbis_analysis_wrote (&tf->vd, len); - } - while(vorbis_analysis_blockout (&tf->vd, &tf->vb) == 1) - { - /* analysis, assume we want to use bitrate management */ - vorbis_analysis (&tf->vb, NULL); - vorbis_bitrate_addblock (&tf->vb); - - /* weld packets into the bitstream */ - while (vorbis_bitrate_flushpacket (&tf->vd, &tf->op)) - { - flush_lock->lock(); - ogg_stream_packetin (&tf->vo, &tf->op); - tf->a_pkg++; - flush_lock->unlock(); - } - - } - flush_ogg(0); - return 0; - - -} - -int FileOGG::write_samples(double **buffer, int64_t len) -{ - if (len > 0) - return write_samples_vorbis(buffer, len, 0); - return 0; -} - -int FileOGG::write_frames_theora(VFrame ***frames, int len, int e_o_s) -{ - // due to clumsy theora's design we need to delay writing out by one frame - // always stay one frame behind, so we can correctly encode e_o_s - int result = 0; - if(!stream) return 0; - - for(int j = 0; j < len && !result; j++) - { - if (temp_frame) // encode previous frame if available - { - yuv_buffer yuv; - yuv.y_width = tf->ti.width; - yuv.y_height = tf->ti.height; - yuv.y_stride = temp_frame->get_bytes_per_line(); - - yuv.uv_width = tf->ti.width / 2; - yuv.uv_height = tf->ti.height / 2; - yuv.uv_stride = temp_frame->get_bytes_per_line() /2; - - yuv.y = temp_frame->get_y(); - yuv.u = temp_frame->get_u(); - yuv.v = temp_frame->get_v(); - int ret = theora_encode_YUVin (&tf->td, &yuv); - if (ret) - { - printf(_("FileOGG: theora_encode_YUVin failed with code %i\n"), ret); - printf("yuv_buffer: y_width: %i, y_height: %i, y_stride: %i," - " uv_width: %i, uv_height: %i, uv_stride: %i\n", - yuv.y_width, yuv.y_height, yuv.y_stride, - yuv.uv_width, yuv.uv_height, yuv.uv_stride); - } - while(theora_encode_packetout (&tf->td, e_o_s, &tf->op)) { - flush_lock->lock(); - ogg_stream_packetin (&tf->to, &tf->op); - tf->v_pkg++; - flush_lock->unlock(); - } - flush_ogg(0); // eos flush is done later at close_file - } -// If we have e_o_s, don't encode any new frames - if (e_o_s) - break; - - if (!temp_frame) - { - temp_frame = new VFrame ( tf->ti.width, tf->ti.height, BC_YUV420P, 0); - } - VFrame *frame = frames[0][j]; - int in_color_model = frame->get_color_model(); - if (in_color_model == BC_YUV422P && - temp_frame->get_w() == frame->get_w() && - temp_frame->get_h() == frame->get_h() && - temp_frame->get_bytes_per_line() == frame->get_bytes_per_line()) - { - temp_frame->copy_from(frame); - } else - { - - BC_CModels::transfer(temp_frame->get_rows(), - frame->get_rows(), - temp_frame->get_y(), - temp_frame->get_u(), - temp_frame->get_v(), - frame->get_y(), - frame->get_u(), - frame->get_v(), - 0, - 0, - frame->get_w(), - frame->get_h(), - 0, - 0, - frame->get_w(), // temp_frame can be larger than frame if width not dividable by 16 - frame->get_h(), - frame->get_color_model(), - BC_YUV420P, - 0, - frame->get_w(), - temp_frame->get_w()); - - } - } - - return 0; -} - - -int FileOGG::write_frames(VFrame ***frames, int len) -{ - - return write_frames_theora(frames, len, 0); -} - -OGGConfigAudio::OGGConfigAudio(BC_WindowBase *parent_window, Asset *asset) - : BC_Window(_(PROGRAM_NAME ": Audio Compression"), - parent_window->get_abs_cursor_x(1), - parent_window->get_abs_cursor_y(1), - 350, 250) -{ - this->parent_window = parent_window; - this->asset = asset; -} - -OGGConfigAudio::~OGGConfigAudio() -{ - -} - -void OGGConfigAudio::create_objects() -{ -// add_tool(new BC_Title(10, 10, _("There are no audio options for this format"))); - - int x = 10, y = 10; - int x1 = 150; - char string[BCTEXTLEN]; - - lock_window("OGGConfigAudio::create_objects"); - add_tool(fixed_bitrate = new OGGVorbisFixedBitrate(x, y, this)); - add_tool(variable_bitrate = new OGGVorbisVariableBitrate(x1, y, this)); - - y += 30; - sprintf(string, "%d", asset->vorbis_min_bitrate); - add_tool(new BC_Title(x, y, _("Min bitrate:"))); - add_tool(new OGGVorbisMinBitrate(x1, y, this, string)); - - y += 30; - add_tool(new BC_Title(x, y, _("Avg bitrate:"))); - sprintf(string, "%d", asset->vorbis_bitrate); - add_tool(new OGGVorbisAvgBitrate(x1, y, this, string)); - - y += 30; - add_tool(new BC_Title(x, y, _("Max bitrate:"))); - sprintf(string, "%d", asset->vorbis_max_bitrate); - add_tool(new OGGVorbisMaxBitrate(x1, y, this, string)); - - - add_subwindow(new BC_OKButton(this)); - show_window(1); - unlock_window(); -} - -int OGGConfigAudio::close_event() -{ - set_done(0); - return 1; -} - -OGGVorbisFixedBitrate::OGGVorbisFixedBitrate(int x, int y, OGGConfigAudio *gui) - : BC_Radial(x, y, !gui->asset->vorbis_vbr, _("Average bitrate")) -{ - this->gui = gui; -} -int OGGVorbisFixedBitrate::handle_event() -{ - gui->asset->vorbis_vbr = 0; - gui->variable_bitrate->update(0); - return 1; -} - -OGGVorbisVariableBitrate::OGGVorbisVariableBitrate(int x, int y, OGGConfigAudio *gui) - : BC_Radial(x, y, gui->asset->vorbis_vbr, _("Variable bitrate")) -{ - this->gui = gui; -} -int OGGVorbisVariableBitrate::handle_event() -{ - gui->asset->vorbis_vbr = 1; - gui->fixed_bitrate->update(0); - return 1; -} - - -OGGVorbisMinBitrate::OGGVorbisMinBitrate(int x, - int y, - OGGConfigAudio *gui, - char *text) - : BC_TextBox(x, y, 180, 1, text) -{ - this->gui = gui; -} -int OGGVorbisMinBitrate::handle_event() -{ - gui->asset->vorbis_min_bitrate = atol(get_text()); - return 1; -} - - - -OGGVorbisMaxBitrate::OGGVorbisMaxBitrate(int x, - int y, - OGGConfigAudio *gui, - char *text) - : BC_TextBox(x, y, 180, 1, text) -{ - this->gui = gui; -} -int OGGVorbisMaxBitrate::handle_event() -{ - gui->asset->vorbis_max_bitrate = atol(get_text()); - return 1; -} - - - -OGGVorbisAvgBitrate::OGGVorbisAvgBitrate(int x, int y, OGGConfigAudio *gui, char *text) - : BC_TextBox(x, y, 180, 1, text) -{ - this->gui = gui; -} -int OGGVorbisAvgBitrate::handle_event() -{ - gui->asset->vorbis_bitrate = atol(get_text()); - return 1; -} - - - - - -OGGConfigVideo::OGGConfigVideo(BC_WindowBase *parent_window, Asset *asset) - : BC_Window(_(PROGRAM_NAME ": Video Compression"), - parent_window->get_abs_cursor_x(1), - parent_window->get_abs_cursor_y(1), - 450, 220) -{ - this->parent_window = parent_window; - this->asset = asset; -} - -OGGConfigVideo::~OGGConfigVideo() -{ - -} - -void OGGConfigVideo::create_objects() -{ -// add_tool(new BC_Title(10, 10, _("There are no video options for this format"))); - int x = 10, y = 10; - int x1 = x + 150; - int x2 = x + 300; - - lock_window("OGGConfigVideo::create_objects"); - add_subwindow(new BC_Title(x, y + 5, _("Bitrate:"))); - add_subwindow(new OGGTheoraBitrate(x1, y, this)); - add_subwindow(fixed_bitrate = new OGGTheoraFixedBitrate(x2, y, this)); - y += 30; - - add_subwindow(new BC_Title(x, y, _("Quality:"))); - add_subwindow(new BC_ISlider(x + 80, y, 0, - 200, 200, 0, 63, - asset->theora_quality, 0, - 0, &asset->theora_quality)); - - add_subwindow(fixed_quality = new OGGTheoraFixedQuality(x2, y, this)); - y += 30; - - add_subwindow(new BC_Title(x, y, _("Keyframe frequency:"))); - OGGTheoraKeyframeFrequency *keyframe_frequency = - new OGGTheoraKeyframeFrequency(x1 + 60, y, this); - keyframe_frequency->create_objects(); - y += 30; - - add_subwindow(new BC_Title(x, y, _("Keyframe force frequency:"))); - OGGTheoraKeyframeForceFrequency *keyframe_force_frequency = - new OGGTheoraKeyframeForceFrequency(x1 + 60, y, this); - keyframe_force_frequency->create_objects(); - y += 30; - - add_subwindow(new BC_Title(x, y, _("Sharpness:"))); - OGGTheoraSharpness *sharpness = - new OGGTheoraSharpness(x1 + 60, y, this); - sharpness->create_objects(); - y += 30; - - - add_subwindow(new BC_OKButton(this)); - show_window(1); - unlock_window(); -} - - -int OGGConfigVideo::close_event() -{ - set_done(0); - return 1; -} - -OGGTheoraBitrate::OGGTheoraBitrate(int x, int y, OGGConfigVideo *gui) - : BC_TextBox(x, y, 100, 1, gui->asset->theora_bitrate) -{ - this->gui = gui; -} - - -int OGGTheoraBitrate::handle_event() -{ - // TODO: MIN / MAX check - gui->asset->theora_bitrate = atol(get_text()); - return 1; -}; - - - - -OGGTheoraFixedBitrate::OGGTheoraFixedBitrate(int x, int y, OGGConfigVideo *gui) - : BC_Radial(x, y, gui->asset->theora_fix_bitrate, _("Fixed bitrate")) -{ - this->gui = gui; -} - -int OGGTheoraFixedBitrate::handle_event() -{ - update(1); - gui->asset->theora_fix_bitrate = 1; - gui->fixed_quality->update(0); - return 1; -}; - -OGGTheoraFixedQuality::OGGTheoraFixedQuality(int x, int y, OGGConfigVideo *gui) - : BC_Radial(x, y, !gui->asset->theora_fix_bitrate, _("Fixed quality")) -{ - this->gui = gui; -} - -int OGGTheoraFixedQuality::handle_event() -{ - update(1); - gui->asset->theora_fix_bitrate = 0; - gui->fixed_bitrate->update(0); - return 1; -}; - -OGGTheoraKeyframeFrequency::OGGTheoraKeyframeFrequency(int x, int y, OGGConfigVideo *gui) - : BC_TumbleTextBox(gui, - (int64_t)gui->asset->theora_keyframe_frequency, - (int64_t)1, - (int64_t)500, - x, - y, - 40) -{ - this->gui = gui; -} - -int OGGTheoraKeyframeFrequency::handle_event() -{ - gui->asset->theora_keyframe_frequency = atol(get_text()); - return 1; -} - -OGGTheoraKeyframeForceFrequency::OGGTheoraKeyframeForceFrequency(int x, int y, OGGConfigVideo *gui) - : BC_TumbleTextBox(gui, - (int64_t)gui->asset->theora_keyframe_frequency, - (int64_t)1, - (int64_t)500, - x, - y, - 40) -{ - this->gui = gui; -} - -int OGGTheoraKeyframeForceFrequency::handle_event() -{ - gui->asset->theora_keyframe_frequency = atol(get_text()); - return 1; -} - - -OGGTheoraSharpness::OGGTheoraSharpness(int x, int y, OGGConfigVideo *gui) - : BC_TumbleTextBox(gui, - (int64_t)gui->asset->theora_sharpness, - (int64_t)0, - (int64_t)2, - x, - y, - 40) -{ - this->gui = gui; -} - -int OGGTheoraSharpness::handle_event() -{ - gui->asset->theora_sharpness = atol(get_text()); - return 1; -} - - -PackagingEngineOGG::PackagingEngineOGG() -{ - packages = 0; - default_asset = 0; -} - -PackagingEngineOGG::~PackagingEngineOGG() -{ - if(packages) - { - for(int i = 0; i < total_packages; i++) - delete packages[i]; - delete [] packages; - } - if (default_asset) - default_asset->remove_user(); -} - - - -int PackagingEngineOGG::create_packages_single_farm( - EDL *edl, - Preferences *preferences, - Asset *default_asset, - double total_start, - double total_end) -{ - this->total_start = total_start; - this->total_end = total_end; - this->edl = edl; - - this->preferences = preferences; - -// We make A COPY of the asset, because we set audio_data = 0 on local asset which is the same copy as default_asset... -// Should be taken care of somewhere else actually - this->default_asset = new Asset(*default_asset); - - audio_start = Units::to_int64(total_start * default_asset->sample_rate); - video_start = Units::to_int64(total_start * default_asset->frame_rate); - audio_position = audio_start; - video_position = video_start; - audio_end = Units::to_int64(total_end * default_asset->sample_rate); - video_end = Units::to_int64(total_end * default_asset->frame_rate); - current_package = 0; - - double total_len = total_end - total_start; -//printf("PackageDispatcher::create_packages: %f / %d = %f\n", total_len, total_packages, package_len); - - total_packages = 0; - if (default_asset->audio_data) - total_packages++; - if (default_asset->video_data) - total_packages += preferences->renderfarm_job_count; - - packages = new RenderPackage*[total_packages]; - - int local_current_package = 0; - if (default_asset->audio_data) - { - packages[local_current_package] = new RenderPackage; - snprintf(packages[current_package]->path, - sizeof(packages[current_package]->path), - "%s.audio", default_asset->path); - local_current_package++; - } - - if (default_asset->video_data) - { - video_package_len = (total_len) / preferences->renderfarm_job_count; - int current_number; // The number being injected into the filename. - int number_start; // Character in the filename path at which the number begins - int total_digits; // Total number of digits including padding the user specified. - - Render::get_starting_number(default_asset->path, - current_number, - number_start, - total_digits, - 3); - - for(int i = 0; i < preferences->renderfarm_job_count; i++) - { - RenderPackage *package = packages[local_current_package] = new RenderPackage; - Render::create_filename(package->path, - default_asset->path, - current_number, - total_digits, - number_start); - current_number++; - local_current_package++; - } - } - return 0; -} - -RenderPackage* PackagingEngineOGG::get_package_single_farm(double frames_per_second, - int client_number, - int use_local_rate) -{ - -//printf("PackageDispatcher::get_package %ld %ld %ld %ld\n", audio_position, video_position, audio_end, video_end); - if (current_package == total_packages) - return 0; - - RenderPackage *result = 0; - if (current_package == 0 && default_asset->audio_data) - { - result = packages[0]; - result->audio_start = audio_start; - result->video_start = video_start; - result->audio_end = audio_end; - result->video_end = video_end; - result->audio_do = 1; - result->video_do = 0; - } else if (default_asset->video_data) - { - // Do not do any scaling according to node speed, so we know we can get evenly distributed 'forced' keyframes - result = packages[current_package]; - result->audio_do = 0; - result->video_do = 1; - - result->audio_start = audio_position; - result->video_start = video_position; - result->audio_end = audio_position + - Units::round(video_package_len * default_asset->sample_rate); - result->video_end = video_position + - Units::round(video_package_len * default_asset->frame_rate); - -// Last package... take it all! - if (current_package == total_packages -1 ) - { - result->audio_end = audio_end; - result->video_end = video_end; - } - - audio_position = result->audio_end; - video_position = result->video_end; - - } - - current_package ++; - return result; - -} - -void PackagingEngineOGG::get_package_paths(ArrayList *path_list) -{ - for(int i = 0; i < total_packages; i++) - { - path_list->append(strdup(packages[i]->path)); - } -// We will mux to the the final file at the end! - path_list->append(strdup(default_asset->path)); - path_list->set_free(); -} - -int64_t PackagingEngineOGG::get_progress_max() -{ - return Units::to_int64(default_asset->sample_rate * - (total_end - total_start)) * 2+ - Units::to_int64(preferences->render_preroll * - total_packages * - default_asset->sample_rate); -} - -int PackagingEngineOGG::packages_are_done() -{ - - -// Mux audio and video into one file - -// First fix our asset... have to workaround the bug of corruption of local asset -// Render::check_asset(edl, *default_asset); - - Asset *video_asset = 0, *audio_asset = 0; - File *audio_file_gen = 0, *video_file_gen = 0; - FileOGG *video_file = 0, *audio_file = 0; - ogg_stream_state audio_in_stream, video_in_stream; - - int local_current_package = 0; - if (default_asset->audio_data) - { - audio_asset = new Asset(packages[local_current_package]->path); - audio_asset->format = FILE_OGG; - local_current_package++; - - audio_file_gen = new File(); - audio_file_gen->open_file(preferences, audio_asset, 1, 0); - audio_file = (FileOGG*) audio_file_gen->file; - ogg_stream_init(&audio_in_stream, audio_file->tf->vo.serialno); - audio_file->ogg_seek_to_databegin(audio_file->tf->audiosync, audio_file->tf->vo.serialno); - } - - if (default_asset->video_data) - { - video_asset = new Asset(packages[local_current_package]->path); - video_asset->format = FILE_OGG; - local_current_package++; - - video_file_gen = new File(); - video_file_gen->open_file(preferences, video_asset, 1, 0); - video_file = (FileOGG*) video_file_gen->file; - ogg_stream_init(&video_in_stream, video_file->tf->to.serialno); - video_file->ogg_seek_to_databegin(video_file->tf->videosync, video_file->tf->to.serialno); - } - -// Output file - File *output_file_gen = new File(); - output_file_gen->open_file(preferences, default_asset, 0, 1); - FileOGG *output_file = (FileOGG*) output_file_gen->file; - - //ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ - ogg_packet op; /* one raw packet of data for decode */ - - - int audio_ready = default_asset->audio_data; - int video_ready = default_asset->video_data; - int64_t video_packetno = 1; - int64_t audio_packetno = 1; - int64_t frame_offset = 0; - int64_t current_frame = 0; - while ((default_asset->audio_data && audio_ready) || (default_asset->video_data && video_ready)) - { - if (video_ready) - { - while (ogg_stream_packetpeek(&video_in_stream, NULL) != 1) // get as many pages as needed for one package - { - if (!video_file->ogg_get_next_page(video_file->tf->videosync, video_file->tf->to.serialno, &video_file->tf->videopage)) - { - // We are at the end of our file, see if it is more and open more if there is - if (local_current_package < total_packages) - { - frame_offset = current_frame +1; - ogg_stream_clear(&video_in_stream); - video_file_gen->close_file(); - delete video_file_gen; - if( video_asset ) video_asset->remove_user(); - video_asset = new Asset(packages[local_current_package]->path); - video_asset->format = FILE_OGG; - local_current_package++; - - video_file_gen = new File(); - video_file_gen->open_file(preferences, video_asset, 1, 0); - video_file = (FileOGG*) video_file_gen->file; - ogg_stream_init(&video_in_stream, video_file->tf->to.serialno); - video_file->ogg_seek_to_databegin(video_file->tf->videosync, video_file->tf->to.serialno); - - } else - video_ready = 0; - break; - } - ogg_stream_pagein(&video_in_stream, &video_file->tf->videopage); - } - while (ogg_stream_packetpeek(&video_in_stream, NULL) == 1) // get all packets out of the page - { - ogg_stream_packetout(&video_in_stream, &op); - if (local_current_package != total_packages) // keep it from closing the stream - op.e_o_s = 0; - if (video_packetno != 1) // if this is not the first video package do not start with b_o_s - op.b_o_s = 0; - else - op.b_o_s = 1; - op.packetno = video_packetno; - video_packetno ++; - int64_t granulepos = op.granulepos; - if (granulepos != -1) - { - // Fix granulepos! - int64_t rel_iframe = granulepos >> video_file->theora_keyframe_granule_shift; - int64_t rel_pframe = granulepos - (rel_iframe << video_file->theora_keyframe_granule_shift); - int64_t rel_current_frame = rel_iframe + rel_pframe; - current_frame = frame_offset + rel_current_frame; - int64_t abs_iframe = current_frame - rel_pframe; - - op.granulepos = (abs_iframe << video_file->theora_keyframe_granule_shift) + rel_pframe; - -// printf("iframe: %i, pframe: %i, granulepos: %i, op.packetno %lli, abs_iframe: %i\n", rel_iframe, rel_pframe, granulepos, op.packetno, abs_iframe); - - } - ogg_stream_packetin (&output_file->tf->to, &op); - output_file->tf->v_pkg++; - } - } - if (audio_ready) - { - while (ogg_stream_packetpeek(&audio_in_stream, NULL) != 1) // get as many pages as needed for one package - { - if (!audio_file->ogg_get_next_page(audio_file->tf->audiosync, audio_file->tf->vo.serialno, &audio_file->tf->audiopage)) - { - audio_ready = 0; - break; - } - ogg_stream_pagein(&audio_in_stream, &audio_file->tf->audiopage); - } - while (ogg_stream_packetpeek(&audio_in_stream, NULL) == 1) // get all packets out of the page - { - ogg_stream_packetout(&audio_in_stream, &op); - ogg_stream_packetin (&output_file->tf->vo, &op); - audio_packetno++; - output_file->tf->a_pkg++; - } - } - - output_file->flush_ogg(0); - - - } - -// flush_ogg(1) is called on file closing time... -// output_file->flush_ogg(1); - -// Just prevent thet write_samples and write_frames are called - output_file->final_write = 0; - - if (default_asset->audio_data) - { - ogg_stream_clear(&audio_in_stream); - audio_file_gen->close_file(); - delete audio_file_gen; - if( audio_asset ) - audio_asset->remove_user(); - } - if (default_asset->video_data) - { - ogg_stream_clear(&video_in_stream); - video_file_gen->close_file(); - delete video_file_gen; - if( video_asset ) - video_asset->remove_user(); - } - - output_file_gen->close_file(); - delete output_file_gen; - -// don't delete the temp files, for now -// for(int i = 0; i < total_packages; i++) -// unlink(packages[i]->path); - - return 0; -} - - - diff --git a/cinelerra-5.1/cinelerra/fileogg.h b/cinelerra-5.1/cinelerra/fileogg.h deleted file mode 100644 index 26a68022..00000000 --- a/cinelerra-5.1/cinelerra/fileogg.h +++ /dev/null @@ -1,358 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef FILEOGG_H -#define FILEOGG_H - -#include "edl.inc" -#include "filebase.h" -#include "file.inc" -#include "packagingengine.h" - -#include -#include -#include - - -#include - -/* This code was aspired by ffmpeg2theora */ -/* Special thanks for help on this code goes out to j@v2v.cc */ - -typedef struct -{ - ogg_sync_state sync; - off_t file_bufpos; // position of the start of the buffer inside the file - off_t file_pagepos; // position of the page that will be next read - off_t file_pagepos_found; // position of last page that was returned (in seeking operations) - int wlen; -} sync_window_t; - -typedef struct -{ - ogg_page audiopage; - ogg_page videopage; - - double audiotime; - double videotime; - ogg_int64_t audio_bytesout; - ogg_int64_t video_bytesout; - - ogg_page og; /* one Ogg bitstream page. Vorbis packets are inside */ - ogg_packet op; /* one raw packet of data for decode */ - - theora_info ti; - theora_comment tc; - theora_state td; - - vorbis_info vi; /* struct that stores all the static vorbis bitstream settings */ - vorbis_comment vc; /* struct that stores all the user comments */ - vorbis_dsp_state vd; /* central working state for the packet<->PCM encoder/decoder */ - vorbis_block vb; /* local working space for packet<->PCM encode/decode */ - - /* used for muxing */ - ogg_stream_state to; /* take physical pages, weld into a logical - * stream of packets */ - ogg_stream_state vo; /* take physical pages, weld into a logical - * stream of packets */ - - int apage_valid; - int vpage_valid; - unsigned char *apage; - unsigned char *vpage; - int vpage_len; - int apage_len; - int vpage_buffer_length; - int apage_buffer_length; - - -// stuff needed for reading only - sync_window_t *audiosync; - sync_window_t *videosync; - - //to do some manual page flusing - int v_pkg; - int a_pkg; - -} -theoraframes_info_t; - -class FileOGG : public FileBase -{ -friend class PackagingEngineOGG; -public: - FileOGG(Asset *asset, File *file); - ~FileOGG(); - - static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, BC_WindowBase* &format_window, - int audio_options, int video_options, EDL *edl); - - int reset_parameters_derived(); - int open_file(int rd, int wr); - static int check_sig(Asset *asset); - int close_file(); - int close_file_derived(); - int64_t get_video_position(); - int64_t get_audio_position(); - int set_video_position(int64_t x); - int set_audio_position(int64_t x); - int colormodel_supported(int colormodel); - int get_best_colormodel(Asset *asset, int driver); - int write_samples(double **buffer, int64_t len); - int write_frames(VFrame ***frames, int len); - int read_samples(double *buffer, int64_t len); - int read_frame(VFrame *frame); - -private: - int write_samples_vorbis(double **buffer, int64_t len, int e_o_s); - int write_frames_theora(VFrame ***frames, int len, int e_o_s); - void flush_ogg(int e_o_s); - int write_audio_page(); - int write_video_page(); - - FILE *stream; - off_t file_length; - - theoraframes_info_t *tf; - VFrame *temp_frame; - Mutex *flush_lock; - - off_t filedata_begin; - - int ogg_get_last_page(sync_window_t *sw, long serialno, ogg_page *og); - int ogg_get_prev_page(sync_window_t *sw, long serialno, ogg_page *og); - int ogg_get_first_page(sync_window_t *sw, long serialno, ogg_page *og); - int ogg_get_next_page(sync_window_t *sw, long serialno, ogg_page *og); - int ogg_sync_and_get_next_page(sync_window_t *sw, long serialno, ogg_page *og); - - int ogg_get_page_of_sample(sync_window_t *sw, long serialno, ogg_page *og, int64_t sample); - int ogg_seek_to_sample(sync_window_t *sw, long serialno, int64_t sample); - int ogg_decode_more_samples(sync_window_t *sw, long serialno); - - int ogg_get_page_of_frame(sync_window_t *sw, long serialno, ogg_page *og, int64_t frame); - int ogg_seek_to_keyframe(sync_window_t *sw, long serialno, int64_t frame, int64_t *position); - int ogg_seek_to_databegin(sync_window_t *sw, long serialno); - - - int64_t start_sample; // first and last sample inside this file - int64_t last_sample; - int64_t start_frame; // first and last frame inside this file - int64_t last_frame; - - - int64_t ogg_sample_position; // what will be the next sample taken from vorbis decoder - int64_t next_sample_position; // what is the next sample read_samples must deliver - - int move_history(int from, int to, int len); - - float **pcm_history; -#ifndef HISTORY_MAX -#define HISTORY_MAX 0x100000 -#endif - int64_t history_start; - int64_t history_size; - - int theora_cmodel; - int64_t ogg_frame_position; // LAST decoded frame position - int64_t next_frame_position; // what is the next sample read_frames must deliver - char theora_keyframe_granule_shift; - int final_write; -}; - -class OGGConfigAudio; -class OGGConfigVideo; - -class OGGVorbisFixedBitrate : public BC_Radial -{ -public: - OGGVorbisFixedBitrate(int x, int y, OGGConfigAudio *gui); - int handle_event(); - OGGConfigAudio *gui; -}; - -class OGGVorbisVariableBitrate : public BC_Radial -{ -public: - OGGVorbisVariableBitrate(int x, int y, OGGConfigAudio *gui); - int handle_event(); - OGGConfigAudio *gui; -}; - -class OGGVorbisMinBitrate : public BC_TextBox -{ -public: - OGGVorbisMinBitrate(int x, - int y, - OGGConfigAudio *gui, - char *text); - int handle_event(); - OGGConfigAudio *gui; -}; - -class OGGVorbisMaxBitrate : public BC_TextBox -{ -public: - OGGVorbisMaxBitrate(int x, - int y, - OGGConfigAudio *gui, - char *text); - int handle_event(); - OGGConfigAudio *gui; -}; - -class OGGVorbisAvgBitrate : public BC_TextBox -{ -public: - OGGVorbisAvgBitrate(int x, - int y, - OGGConfigAudio *gui, - char *text); - int handle_event(); - OGGConfigAudio *gui; -}; - - -class OGGConfigAudio: public BC_Window -{ -public: - OGGConfigAudio(BC_WindowBase *parent_window, Asset *asset); - ~OGGConfigAudio(); - - void create_objects(); - int close_event(); - - Asset *asset; - OGGVorbisFixedBitrate *fixed_bitrate; - OGGVorbisVariableBitrate *variable_bitrate; -private: - BC_WindowBase *parent_window; - char string[BCTEXTLEN]; -}; - - -class OGGTheoraBitrate : public BC_TextBox -{ -public: - OGGTheoraBitrate(int x, int y, OGGConfigVideo *gui); - int handle_event(); - OGGConfigVideo *gui; -}; - -class OGGTheoraKeyframeFrequency : public BC_TumbleTextBox -{ -public: - OGGTheoraKeyframeFrequency(int x, int y, OGGConfigVideo *gui); - int handle_event(); - OGGConfigVideo *gui; -}; - -class OGGTheoraKeyframeForceFrequency : public BC_TumbleTextBox -{ -public: - OGGTheoraKeyframeForceFrequency(int x, int y, OGGConfigVideo *gui); - int handle_event(); - OGGConfigVideo *gui; -}; - -class OGGTheoraSharpness : public BC_TumbleTextBox -{ -public: - OGGTheoraSharpness(int x, int y, OGGConfigVideo *gui); - int handle_event(); - OGGConfigVideo *gui; -}; - -class OGGTheoraFixedBitrate : public BC_Radial -{ -public: - OGGTheoraFixedBitrate(int x, int y, OGGConfigVideo *gui); - int handle_event(); - OGGConfigVideo *gui; -}; - -class OGGTheoraFixedQuality : public BC_Radial -{ -public: - OGGTheoraFixedQuality(int x, int y, OGGConfigVideo *gui); - int handle_event(); - OGGConfigVideo *gui; -}; - - - -class OGGConfigVideo: public BC_Window -{ -public: - OGGConfigVideo(BC_WindowBase *parent_window, Asset *asset); - ~OGGConfigVideo(); - - void create_objects(); - int close_event(); - - OGGTheoraFixedBitrate *fixed_bitrate; - OGGTheoraFixedQuality *fixed_quality; - Asset *asset; -private: - BC_WindowBase *parent_window; -}; - -class PackagingEngineOGG : public PackagingEngine -{ -public: - PackagingEngineOGG(); - ~PackagingEngineOGG(); - int create_packages_single_farm( - EDL *edl, - Preferences *preferences, - Asset *default_asset, - double total_start, - double total_end); - RenderPackage* get_package_single_farm(double frames_per_second, - int client_number, - int use_local_rate); - int64_t get_progress_max(); - void get_package_paths(ArrayList *path_list); - int packages_are_done(); - -private: - EDL *edl; - - RenderPackage **packages; - int total_packages; - double video_package_len; // Target length of a single package - - Asset *default_asset; - Preferences *preferences; - int current_package; - double total_start; - double total_end; - int64_t audio_position; - int64_t video_position; - int64_t audio_start; - int64_t video_start; - int64_t audio_end; - int64_t video_end; - -}; - - -#endif diff --git a/cinelerra-5.1/cinelerra/filevorbis.C b/cinelerra-5.1/cinelerra/filevorbis.C deleted file mode 100644 index 65eedf71..00000000 --- a/cinelerra-5.1/cinelerra/filevorbis.C +++ /dev/null @@ -1,491 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#include "asset.h" -#include "bcsignals.h" -#include "byteorder.h" -#include "clip.h" -#include "file.h" -#include "filevorbis.h" -#include "guicast.h" -#include "language.h" -#include "mainerror.h" -#include "mwindow.inc" -#include "mainerror.h" - -#include -#include -#include -#include - -//suppress noref warning -void *vorbis1_ov_callbacks[] = { - &OV_CALLBACKS_DEFAULT, &OV_CALLBACKS_NOCLOSE, - &OV_CALLBACKS_STREAMONLY, &OV_CALLBACKS_STREAMONLY_NOCLOSE, -}; - -FileVorbis::FileVorbis(Asset *asset, File *file) - : FileBase(asset, file) -{ - reset_parameters(); - if(asset->format == FILE_UNKNOWN) asset->format = FILE_VORBIS; - asset->byte_order = 0; -} - -FileVorbis::~FileVorbis() -{ - close_file(); -} - -void FileVorbis::get_parameters(BC_WindowBase *parent_window, - Asset *asset, BC_WindowBase* &format_window, - int audio_options, int video_options, EDL *edl) -{ - if(audio_options) - { - VorbisConfigAudio *window = new VorbisConfigAudio(parent_window, asset); - format_window = window; - window->create_objects(); - window->run_window(); - delete window; - } -} - -int FileVorbis::check_sig(Asset *asset) -{ - FILE *fd = fopen(asset->path, "rb"); - OggVorbis_File vf; - -// Test for Quicktime since OGG misinterprets it - if(fd) - { - fseek(fd, 4, SEEK_SET); - char data[4]; - (void)fread(data, 4, 1, fd); - if(data[0] == 'm' && - data[1] == 'd' && - data[2] == 'a' && - data[3] == 't') - { - fclose(fd); - return 0; - } - - fseek(fd, 0, SEEK_SET); - - if(ov_open(fd, &vf, NULL, 0) < 0) - { - // OGG failed. Close file handle manually. - ov_clear(&vf); - if(fd) fclose(fd); - return 0; - } - else - { - ov_clear(&vf); - return 1; - } - } - - return 0; -} - -int FileVorbis::reset_parameters_derived() -{ - fd = 0; - bzero(&vf, sizeof(vf)); - return 0; -} - - -int FileVorbis::open_file(int rd, int wr) -{ - - int result = 0; - -//printf("FileVorbis::open_file 1\n"); - if(rd) - { -//printf("FileVorbis::open_file 1\n"); - if(!(fd = fopen(asset->path, "rb"))) - { - eprintf("Error while opening \"%s\" for reading. \n%m\n", asset->path); - result = 1; - } - else - { -//printf("FileVorbis::open_file 2 %p %p\n", fd, vf); - if(ov_open(fd, &vf, NULL, 0) < 0) - { - eprintf(_("FileVorbis::open_file %s: invalid bitstream.\n"), asset->path); - result = 1; - } - else - { -//printf("FileVorbis::open_file 1\n"); - vorbis_info *vi = ov_info(&vf, -1); - asset->channels = vi->channels; - if(!asset->sample_rate) - asset->sample_rate = vi->rate; -//printf("FileVorbis::open_file 1\n"); - asset->audio_length = ov_pcm_total(&vf,-1); -//printf("FileVorbis::open_file 1\n"); - asset->audio_data = 1; -// printf("FileVorbis::open_file 1 %d %d %d\n", -// asset->channels, -// asset->sample_rate, -// asset->audio_length); - } - } - } - - if(wr) - { - if(!(fd = fopen(asset->path, "wb"))) - { - eprintf(_("Error while opening \"%s\" for writing. \n%m\n"), asset->path); - result = 1; - } - else - { - vorbis_info_init(&vi); - if(!asset->vorbis_vbr) - result = vorbis_encode_init(&vi, - asset->channels, - asset->sample_rate, - asset->vorbis_max_bitrate, - asset->vorbis_bitrate, - asset->vorbis_min_bitrate); - else - { - result = vorbis_encode_setup_managed(&vi, - asset->channels, - asset->sample_rate, - asset->vorbis_max_bitrate, - asset->vorbis_bitrate, - asset->vorbis_min_bitrate); - result |= vorbis_encode_ctl(&vi, OV_ECTL_RATEMANAGE_AVG, NULL); - result |= vorbis_encode_setup_init(&vi); - } - - if(!result) - { - vorbis_analysis_init(&vd, &vi); - vorbis_block_init(&vd, &vb); - vorbis_comment_init(&vc); - srand(time(NULL)); - ogg_stream_init(&os, rand()); - - ogg_packet header; - ogg_packet header_comm; - ogg_packet header_code; - vorbis_analysis_headerout(&vd, - &vc, - &header, - &header_comm, - &header_code); - ogg_stream_packetin(&os, - &header); - ogg_stream_packetin(&os, - &header_comm); - ogg_stream_packetin(&os, - &header_code); - - while(1) - { - int result = ogg_stream_flush(&os, &og); - if(result == 0) break; - fwrite(og.header, 1, og.header_len, fd); - fwrite(og.body, 1, og.body_len, fd); - } - } - } - } - -//printf("FileVorbis::open_file 2\n"); - return result; -} - -#define FLUSH_VORBIS \ -while(vorbis_analysis_blockout(&vd, &vb) == 1) \ -{ \ - vorbis_analysis(&vb, NULL); \ - vorbis_bitrate_addblock(&vb); \ - while(vorbis_bitrate_flushpacket(&vd, &op)) \ - { \ - ogg_stream_packetin(&os, &op); \ - while(1) \ - { \ - int result = ogg_stream_pageout(&os, &og); \ - if(!result) break; \ - fwrite(og.header, 1, og.header_len, fd); \ - fwrite(og.body, 1, og.body_len, fd); \ - if(ogg_page_eos(&og)) break; \ - } \ - } \ -} - - -int FileVorbis::close_file_derived() -{ - if(fd) - { - if(file->wr) - { - vorbis_analysis_wrote(&vd, 0); - FLUSH_VORBIS - - ogg_stream_clear(&os); - vorbis_block_clear(&vb); - vorbis_dsp_clear(&vd); - vorbis_comment_clear(&vc); - vorbis_info_clear(&vi); - fclose(fd); - } - - if(file->rd) - { -// This also closes the file handle. - ov_clear(&vf); - } - fd = 0; - } - - return 0; -} - - -int FileVorbis::write_samples(double **buffer, int64_t len) -{ - if(!fd) return 0; - - float **vorbis_buffer = vorbis_analysis_buffer(&vd, len); - for(int i = 0; i < asset->channels; i++) - { - float *output = vorbis_buffer[i]; - double *input = buffer[i]; - for(int j = 0; j < len; j++) - { - output[j] = input[j]; - } - } - - vorbis_analysis_wrote(&vd, len); - FLUSH_VORBIS - - return 0; -} - -int FileVorbis::read_samples(double *buffer, int64_t len) -{ - if(!fd) return 0; - -// printf("FileVorbis::read_samples 1 %d %d %d %d\n", -// history_start, -// history_size, -// file->current_sample, -// len); - float **vorbis_output; - int bitstream; - int accumulation = 0; - - - update_pcm_history(len); - - -// Fill history buffer - if(decode_start != decode_end) - { - ov_pcm_seek(&vf, decode_start); - decode_end = decode_start; - } - - while(accumulation < decode_len) - { - int result = ov_read_float(&vf, - &vorbis_output, - decode_len - accumulation, - &bitstream); -//printf("FileVorbis::read_samples 1 %d %d %d\n", result, len, accumulation); - if(!result) break; - - append_history(vorbis_output, result); - accumulation += result; - } - - - read_history(buffer, - file->current_sample, - file->current_channel, - len); - -// printf("FileVorbis::read_samples 2 %d %d %d %d\n", -// history_start, -// history_size, -// file->current_sample, -// len); - - return 0; -} - - - - - - - - - - -VorbisConfigAudio::VorbisConfigAudio(BC_WindowBase *parent_window, - Asset *asset) - : BC_Window(_(PROGRAM_NAME ": Audio Compression"), - parent_window->get_abs_cursor_x(1), - parent_window->get_abs_cursor_y(1), - 350, - 170, - -1, - -1, - 0, - 0, - 1) -{ - this->parent_window = parent_window; - this->asset = asset; -} - -VorbisConfigAudio::~VorbisConfigAudio() -{ -} - -void VorbisConfigAudio::create_objects() -{ - int x = 10, y = 10; - int x1 = 150; - char string[BCTEXTLEN]; - - lock_window("VorbisConfigAudio::create_objects"); - add_tool(fixed_bitrate = new VorbisFixedBitrate(x, y, this)); - add_tool(variable_bitrate = new VorbisVariableBitrate(x1, y, this)); - - y += 30; - sprintf(string, "%d", asset->vorbis_min_bitrate); - add_tool(new BC_Title(x, y, _("Min bitrate:"))); - add_tool(new VorbisMinBitrate(x1, y, this, string)); - - y += 30; - add_tool(new BC_Title(x, y, _("Avg bitrate:"))); - sprintf(string, "%d", asset->vorbis_bitrate); - add_tool(new VorbisAvgBitrate(x1, y, this, string)); - - y += 30; - add_tool(new BC_Title(x, y, _("Max bitrate:"))); - sprintf(string, "%d", asset->vorbis_max_bitrate); - add_tool(new VorbisMaxBitrate(x1, y, this, string)); - - - add_subwindow(new BC_OKButton(this)); - show_window(); - flush(); - unlock_window(); -} - -int VorbisConfigAudio::close_event() -{ - set_done(0); - return 1; -} - - - - - -VorbisFixedBitrate::VorbisFixedBitrate(int x, int y, VorbisConfigAudio *gui) - : BC_Radial(x, y, !gui->asset->vorbis_vbr, _("Fixed bitrate")) -{ - this->gui = gui; -} -int VorbisFixedBitrate::handle_event() -{ - gui->asset->vorbis_vbr = 0; - gui->variable_bitrate->update(0); - return 1; -} - -VorbisVariableBitrate::VorbisVariableBitrate(int x, int y, VorbisConfigAudio *gui) - : BC_Radial(x, y, gui->asset->vorbis_vbr, _("Variable bitrate")) -{ - this->gui = gui; -} -int VorbisVariableBitrate::handle_event() -{ - gui->asset->vorbis_vbr = 1; - gui->fixed_bitrate->update(0); - return 1; -} - - -VorbisMinBitrate::VorbisMinBitrate(int x, - int y, - VorbisConfigAudio *gui, - char *text) - : BC_TextBox(x, y, 180, 1, text) -{ - this->gui = gui; -} -int VorbisMinBitrate::handle_event() -{ - gui->asset->vorbis_min_bitrate = atol(get_text()); - return 1; -} - - - -VorbisMaxBitrate::VorbisMaxBitrate(int x, - int y, - VorbisConfigAudio *gui, - char *text) - : BC_TextBox(x, y, 180, 1, text) -{ - this->gui = gui; -} -int VorbisMaxBitrate::handle_event() -{ - gui->asset->vorbis_max_bitrate = atol(get_text()); - return 1; -} - - - -VorbisAvgBitrate::VorbisAvgBitrate(int x, int y, VorbisConfigAudio *gui, char *text) - : BC_TextBox(x, y, 180, 1, text) -{ - this->gui = gui; -} -int VorbisAvgBitrate::handle_event() -{ - gui->asset->vorbis_bitrate = atol(get_text()); - return 1; -} - - - - diff --git a/cinelerra-5.1/cinelerra/filevorbis.h b/cinelerra-5.1/cinelerra/filevorbis.h deleted file mode 100644 index 0e6c92cb..00000000 --- a/cinelerra-5.1/cinelerra/filevorbis.h +++ /dev/null @@ -1,140 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef FILEVORBIS_H -#define FILEVORBIS_H - -#include "edl.inc" -#include "file.inc" -#include "filebase.h" -#include "vorbis/vorbisenc.h" -#include "vorbis/vorbisfile.h" - - - - - - -class FileVorbis : public FileBase -{ -public: - FileVorbis(Asset *asset, File *file); - ~FileVorbis(); - - static void get_parameters(BC_WindowBase *parent_window, - Asset *asset, BC_WindowBase* &format_window, - int audio_options, int video_options, EDL *edl); - int reset_parameters_derived(); - - static int check_sig(Asset *asset); - int open_file(int rd, int wr); - int close_file_derived(); - int write_samples(double **buffer, - int64_t len); - - int read_samples(double *buffer, int64_t len); - -// Decoding - OggVorbis_File vf; - FILE *fd; - -// Encoding - vorbis_info vi; - vorbis_comment vc; - vorbis_dsp_state vd; - vorbis_block vb; - ogg_stream_state os; - ogg_page og; - ogg_packet op; -}; - - -class VorbisConfigAudio; - - -class VorbisFixedBitrate : public BC_Radial -{ -public: - VorbisFixedBitrate(int x, int y, VorbisConfigAudio *gui); - int handle_event(); - VorbisConfigAudio *gui; -}; - -class VorbisVariableBitrate : public BC_Radial -{ -public: - VorbisVariableBitrate(int x, int y, VorbisConfigAudio *gui); - int handle_event(); - VorbisConfigAudio *gui; -}; - -class VorbisMinBitrate : public BC_TextBox -{ -public: - VorbisMinBitrate(int x, - int y, - VorbisConfigAudio *gui, - char *text); - int handle_event(); - VorbisConfigAudio *gui; -}; - -class VorbisMaxBitrate : public BC_TextBox -{ -public: - VorbisMaxBitrate(int x, - int y, - VorbisConfigAudio *gui, - char *text); - int handle_event(); - VorbisConfigAudio *gui; -}; - -class VorbisAvgBitrate : public BC_TextBox -{ -public: - VorbisAvgBitrate(int x, - int y, - VorbisConfigAudio *gui, - char *text); - int handle_event(); - VorbisConfigAudio *gui; -}; - -class VorbisConfigAudio : public BC_Window -{ -public: - VorbisConfigAudio(BC_WindowBase *parent_window, Asset *asset); - ~VorbisConfigAudio(); - - void create_objects(); - int close_event(); - - VorbisFixedBitrate *fixed_bitrate; - VorbisVariableBitrate *variable_bitrate; - BC_WindowBase *parent_window; - char string[BCTEXTLEN]; - Asset *asset; -}; - - - -#endif diff --git a/cinelerra-5.1/cinelerra/filevorbis.inc b/cinelerra-5.1/cinelerra/filevorbis.inc deleted file mode 100644 index bf38c445..00000000 --- a/cinelerra-5.1/cinelerra/filevorbis.inc +++ /dev/null @@ -1,29 +0,0 @@ - -/* - * CINELERRA - * Copyright (C) 2008 Adam Williams - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - */ - -#ifndef FILEVORBIS_INC -#define FILEVORBIS_INC - -class FileVorbis; - - - -#endif diff --git a/cinelerra-5.1/cinelerra/formatpopup.C b/cinelerra-5.1/cinelerra/formatpopup.C index 55ffcefa..66f1e72f 100644 --- a/cinelerra-5.1/cinelerra/formatpopup.C +++ b/cinelerra-5.1/cinelerra/formatpopup.C @@ -70,8 +70,6 @@ void FormatPopup::create_objects() post_item(FILE_AMPEG); post_item(FILE_VMPEG); #endif - post_item(FILE_VORBIS); - post_item(FILE_OGG); post_item(FILE_PCM); } diff --git a/cinelerra-5.1/cinelerra/shuttle.C b/cinelerra-5.1/cinelerra/shuttle.C index 4c440dbc..d32456f7 100644 --- a/cinelerra-5.1/cinelerra/shuttle.C +++ b/cinelerra-5.1/cinelerra/shuttle.C @@ -556,6 +556,7 @@ const char *Shuttle::probe() static const char *shuttle_devs[] = { "/dev/input/by-id/usb-Contour_Design_ShuttleXpress-event-if00", "/dev/input/by-id/usb-Contour_Design_ShuttlePRO_v2-event-if00", + "/dev/input/by-id/usb-Contour_Design_ShuttlePro-event-if00", }; int ret = sizeof(shuttle_devs) / sizeof(shuttle_devs[0]); while( --ret >= 0 && stat(shuttle_devs[ret] , &st) ); @@ -579,6 +580,14 @@ void Shuttle::stop() } } +BC_WindowBase *Shuttle::owns(BC_WindowBase *wdw, Window win) +{ + if( wdw->win == win ) return wdw; + if( (wdw=wdw->top_level)->win == win ) return wdw; + for( int i=wdw->popups.size(); --i>=0; ) + if( wdw->popups[i]->win == win ) return wdw; + return 0; +} int Shuttle::get_focused_window_translation() { @@ -620,13 +629,16 @@ int Shuttle::get_focused_window_translation() this->msk = 0; BC_WindowBase *wdw = 0; int cin = -1; - if( (wdw=mwindow->gui) && wdw->win == focus ) + if( (wdw=owns(mwindow->gui, focus)) != 0 ) cin = FOCUS_MWINDOW; - else if( (wdw=mwindow->awindow->gui) && wdw->win == focus ) + else if( (wdw=owns(mwindow->awindow->gui, focus)) != 0 ) cin = FOCUS_AWINDOW; - else if( (wdw=mwindow->cwindow->gui) && wdw->win == focus ) + else if( (wdw=owns(mwindow->cwindow->gui, focus)) != 0 ) { + if( mwindow->cwindow->gui->canvas->get_fullscreen() ) + wdw = mwindow->cwindow->gui->canvas->get_canvas(); cin = FOCUS_CWINDOW; - else if( (wdw=mwindow->gui->mainmenu->load_file->thread->window) && + } + else if( (wdw=mwindow->gui->mainmenu->load_file->thread->window) != 0 && wdw->win == focus ) cin = FOCUS_LOAD; else { @@ -634,7 +646,9 @@ int Shuttle::get_focused_window_translation() while( --i >= 0 ) { VWindow *vwdw = mwindow->vwindows[i]; if( !vwdw->is_running() ) continue; - if( (wdw=vwdw->gui) && wdw->win == focus ) { + if( (wdw=owns(vwdw->gui, focus)) != 0 ) { + if( vwdw->gui->canvas->get_fullscreen() ) + wdw = vwdw->gui->canvas->get_canvas(); cin = FOCUS_VIEWER; break; } } @@ -644,7 +658,7 @@ int Shuttle::get_focused_window_translation() int root_x = 0, root_y = 0, win_x = 0, win_y = 0, x = 0, y = 0; unsigned int mask = 0, width = 0, height = 0, border_width = 0, depth = 0; wdw->lock_window("Shuttle::get_focused_window_translation 1"); - if( XQueryPointer(wdw->display, focus, &root, &child, + if( XQueryPointer(wdw->top_level->display, focus, &root, &child, &root_x, &root_y, &win_x, &win_y, &mask) ) { if( !child ) { if( wdw->active_menubar ) @@ -653,9 +667,11 @@ int Shuttle::get_focused_window_translation() child = wdw->active_popup_menu->win; else if( wdw->active_subwindow ) child = wdw->active_subwindow->win; + else + child = wdw->win; } - if( child ) - XGetGeometry(wdw->display, child, &root, &x, &y, + else + XGetGeometry(wdw->top_level->display, child, &root, &x, &y, &width, &height, &border_width, &depth); } wdw->unlock_window(); diff --git a/cinelerra-5.1/cinelerra/shuttle.h b/cinelerra-5.1/cinelerra/shuttle.h index b02a945b..e3bd2c91 100644 --- a/cinelerra-5.1/cinelerra/shuttle.h +++ b/cinelerra-5.1/cinelerra/shuttle.h @@ -208,6 +208,7 @@ public: static const char *probe(); void run(); int read_config_file(); + static BC_WindowBase *owns(BC_WindowBase *wdw, Window win); int done; int failed; diff --git a/cinelerra-5.1/cinelerra/ydiff.C b/cinelerra-5.1/cinelerra/ydiff.C index ebf1e755..5b8f548c 100644 --- a/cinelerra-5.1/cinelerra/ydiff.C +++ b/cinelerra-5.1/cinelerra/ydiff.C @@ -31,6 +31,13 @@ extern "C" { #include "libswscale/swscale.h" } +#ifdef FFMPEG3 +#define url filename +#else +#define av_register_all(s) +#define avfilter_register_all(s) +#endif + int done = 0; int64_t tm = 0, tn = 0; diff --git a/cinelerra-5.1/configure.ac b/cinelerra-5.1/configure.ac index 84081a03..c2211b32 100644 --- a/cinelerra-5.1/configure.ac +++ b/cinelerra-5.1/configure.ac @@ -196,7 +196,7 @@ if test "x$WANT_GIT_FFMPEG" != "xno" ; then fi PKG_3RD([fftw],[auto], - [fftw-3.3.7], + [fftw-3.3.8], [ .libs/libfftw3.a \ libbench2/libbench2.a \ rdft/scalar/r2cb/.libs/librdft_scalar_r2cb.a \ @@ -277,7 +277,7 @@ PKG_3RD([libjpeg],[auto], [ . ]) PKG_3RD([opus],[auto], - [opus-1.2.1], + [opus-1.3], [ .libs/libopus.a ], [ include ]) @@ -287,7 +287,7 @@ PKG_3RD([openjpeg],[auto], [ src/lib/openjp2 ]) PKG_3RD([libogg],[auto], - [libogg-1.3.2], + [libogg-1.3.3], [ src/.libs/libogg.a ], [ include ]) @@ -312,7 +312,7 @@ PKG_3RD([libuuid],[yes], [ . ]) PKG_3RD([libvorbis],[auto], - [libvorbis-1.3.5], + [libvorbis-1.3.6], [ lib/.libs/libvorbis.a \ lib/.libs/libvorbisenc.a \ lib/.libs/libvorbisfile.a ], @@ -345,7 +345,7 @@ PKG_3RD([openexr],[auto], # []) # PKG_3RD([tiff],[auto], - [tiff-4.0.9], + [tiff-4.0.10], [ libtiff/.libs/libtiff.a \ libtiff/.libs/libtiffxx.a \ port/.libs/libport.a ],[ @@ -362,7 +362,7 @@ PKG_3RD([x264],[auto], [ . ]) PKG_3RD([x265],[auto], - [x265_2.9], + [x265_3.0], [ libx265.a ], [ . source ]) @@ -401,6 +401,16 @@ PKG_3RD([suil],[auto], [ usr/local/lib/libsuil-0.a ], [ usr/local/include ]) +PKG_3RD([libaom],[auto], + [libaom-v1.0.0], + [ usr/local/lib*/libaom*.a ], + [ usr/local/include ]) + +PKG_3RD([libwebp],[auto], + [libwebp-1.0.2], + [ usr/local/lib*/libwebp*.a ], + [ usr/local/include ]) + AC_SUBST(STATIC_PKGS) AC_DEFUN([CHECK_ENABLE], [ @@ -473,7 +483,7 @@ fi AC_DEFUN([CHECK_LIB], [ if test "x$HAVE_$1" != "xno"; then - if test "x$PKG_$1" = "x" -o "x$WANT_STATIC_BUILD" = "xno"; then + if test "x$PKG_$1" = "x" -o "x$WANT_STATIC_BUILD" = "xno" -a "x$PKG_$1" = "xauto"; then AC_CHECK_LIB([$2], [$3], [HAVE_$1=yes], [HAVE_$1=no], [$4]) AC_SUBST([HAVE_$1]) if test "x$HAVE_$1" = "xyes"; then @@ -544,6 +554,12 @@ CHECK_LIB([x264], [x264], [x264_encoder_encode]) CHECK_HEADERS([x264], [x264 headers], [stdint.h x264.h]) CHECK_LIB([x265], [x265], [x265_encoder_encode]) CHECK_HEADERS([x265], [x265 headers], [x265.h]) +CHECK_LIB([opus], [opus], [opus_multistream_decoder_create]) +CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h]) +CHECK_LIB([libaom], [aom], [aom_codec_version]) +CHECK_HEADERS([libaom], [libaom headers], [aom/aom.h]) +CHECK_LIB([libwebp], [webp], [WebPGetEncoderVersion]) +CHECK_HEADERS([libwebp], [libwebp headers], [webp/encode.h]) CHECK_LIB([a52dec], [a52], [a52_init]) CHECK_HEADERS([a52dec], [a52 headers], [a52.h]) CHECK_LIB([encore], [encore], [encore]) @@ -621,10 +637,6 @@ CHECK_WANT([ESOUND], [no], [use esd], [ CHECK_LIB([audiofile], [audiofile], [afOpenFile]) CHECK_HEADERS([audiofile], [audiofile headers], [audiofile.h])]) -CHECK_WANT([OPUS], [auto], [use libopus], [ - CHECK_LIB([opus], [opus], [opus_multistream_decoder_create]) - CHECK_HEADERS([opus], [libopus headers], [opus/opus_multistream.h])]) - CHECK_WANT([LV2], [auto], [use lv2], [ saved_CFLAGS="$CFLAGS" CHECK_LIB([lilv], [lilv-0], [lilv_world_new]) @@ -702,7 +714,6 @@ AC_DEFUN([PKG_SHARED],[ BUILD_$1=0 AC_SUBST(BUILD_$1) SHARED_LIBS+="$SHARED_$1" - echo "AC_HELP_STRING([shared],[$1])" ]) AC_DEFUN([PKG_STATIC],[ @@ -772,6 +783,8 @@ PKG_PROVIDE([libtheora]) PKG_PROVIDE([libuuid]) PKG_PROVIDE([libvorbis]) PKG_PROVIDE([mjpegtools]) +PKG_PROVIDE([libaom]) +PKG_PROVIDE([libwebp]) PKG_PROVIDE([openexr], [$WANT_OPENEXR]) PKG_PROVIDE([openjpeg]) PKG_PROVIDE([tiff]) @@ -779,7 +792,7 @@ PKG_PROVIDE([twolame]) PKG_PROVIDE([x264]) PKG_PROVIDE([x265]) PKG_PROVIDE([libvpx]) -PKG_PROVIDE([opus], [$WANT_OPUS]) +PKG_PROVIDE([opus]) PKG_PROVIDE([lv2], [$WANT_LV2]) PKG_PROVIDE([lilv], [$WANT_LV2]) PKG_PROVIDE([sratom], [$WANT_LV2]) @@ -795,8 +808,10 @@ if test "x$WANT_LV2" = "xyes"; then fi AC_SUBST(STATIC_BLDS) +for f in $SHARED_LIBS; do + echo "AC_HELP_STRING([shared],[$f])" +done AC_SUBST(SHARED_LIBS) - for f in $SYSTEM_LIBS; do echo "AC_HELP_STRING([system],[$f])" done @@ -855,13 +870,6 @@ if test "x$HAVE_DL" = "xyes"; then EXTRA_LIBS+=' -ldl' FFMPEG_EXTRA_CFG+=' --extra-ldflags="-ldl"' fi -if test "x$WANT_OPUS" = "xyes"; then - FFMPEG_EXTRA_CFG+=' --enable-libopus' - if test "x$HAVE_opus" = "xyes" -a "x$BUILD_opus" = "x0"; then - EXTRA_LIBS+=' -lopus' - CFG_CFLAGS+=' -I/usr/include/opus -I/usr/local/include/opus' - fi -fi if test "x$WANT_BOOBY" != "xno"; then CFG_CFLAGS+=" -DBOOBY" fi @@ -1025,9 +1033,6 @@ fi if test "x$WANT_GIT_FFMPEG" != "xno"; then echo "ffmpeg.git := $WANT_GIT_FFMPEG" fi -if test "x$WANT_OPUS" = "xyes" -a "x$BUILD_opus" = "x0"; then - echo 'ffmpeg.cflags+=" -I/usr/include/opus -I/usr/local/include/opus"' -fi if test "x$X264_CFG_PARAMS" != "x" ; then echo "x264.cfg_params :=$X264_CFG_PARAMS --enable-static --enable-pic" fi diff --git a/cinelerra-5.1/doc/99-ShuttlePRO.rules b/cinelerra-5.1/doc/99-ShuttlePRO.rules index 2c7776cf..90584f4b 100644 --- a/cinelerra-5.1/doc/99-ShuttlePRO.rules +++ b/cinelerra-5.1/doc/99-ShuttlePRO.rules @@ -5,3 +5,4 @@ ATTRS{name}=="Contour Design ShuttlePRO v2" MODE="0644" ATTRS{name}=="Contour Design ShuttleXpress" MODE="0644" +ATTRS{name}=="Contour Design ShuttlePro" MODE="0644" diff --git a/cinelerra-5.1/doc/Makefile b/cinelerra-5.1/doc/Makefile index 85367091..6cee721e 100644 --- a/cinelerra-5.1/doc/Makefile +++ b/cinelerra-5.1/doc/Makefile @@ -58,6 +58,7 @@ install: all cp -a Features5.pdf $(TARGET_DIR)/. cp -a shortcuts.html $(TARGET_DIR)/. cp -a RenderMux.sh $(TARGET_DIR)/. + cp -a 99-ShuttlePRO.rules $(TARGET_DIR)/. clean: rm -f $(OUTPUT) $(IMAGES) diff --git a/cinelerra-5.1/ffmpeg/video/av1.webm b/cinelerra-5.1/ffmpeg/video/av1.webm new file mode 100644 index 00000000..d5e642bb --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/av1.webm @@ -0,0 +1,6 @@ +webm libaom-av1 +# this codec codes less than one frame per sec +# and so even a few seconds of video can take +# a very long time to encode +strict -2 +threads 8 diff --git a/cinelerra-5.1/ffmpeg/video/bmp.bmp b/cinelerra-5.1/ffmpeg/video/bmp.bmp index 50884162..f05d5667 100644 --- a/cinelerra-5.1/ffmpeg/video/bmp.bmp +++ b/cinelerra-5.1/ffmpeg/video/bmp.bmp @@ -1 +1,3 @@ image2 bmp +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/b%05d.bmp diff --git a/cinelerra-5.1/ffmpeg/video/jp2.jp2 b/cinelerra-5.1/ffmpeg/video/jp2.jp2 new file mode 100644 index 00000000..5a48c6ba --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/jp2.jp2 @@ -0,0 +1,3 @@ +image2 libopenjpeg +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/j%05d.jp2 diff --git a/cinelerra-5.1/ffmpeg/video/pam.pam b/cinelerra-5.1/ffmpeg/video/pam.pam index 92737ae1..5d0c5e1d 100644 --- a/cinelerra-5.1/ffmpeg/video/pam.pam +++ b/cinelerra-5.1/ffmpeg/video/pam.pam @@ -1 +1,3 @@ image2 pam +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/p%05d.pam diff --git a/cinelerra-5.1/ffmpeg/video/pbm.pbm b/cinelerra-5.1/ffmpeg/video/pbm.pbm index 126ee417..051817a4 100644 --- a/cinelerra-5.1/ffmpeg/video/pbm.pbm +++ b/cinelerra-5.1/ffmpeg/video/pbm.pbm @@ -1 +1,3 @@ image2 pbm +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/p%05d.pbm diff --git a/cinelerra-5.1/ffmpeg/video/pcx.pcx b/cinelerra-5.1/ffmpeg/video/pcx.pcx index d6eeda93..3a11548f 100644 --- a/cinelerra-5.1/ffmpeg/video/pcx.pcx +++ b/cinelerra-5.1/ffmpeg/video/pcx.pcx @@ -1 +1,3 @@ image2 pcx +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/p%05d.pcx diff --git a/cinelerra-5.1/ffmpeg/video/pgm.pgm b/cinelerra-5.1/ffmpeg/video/pgm.pgm index 8befa28b..574457c3 100644 --- a/cinelerra-5.1/ffmpeg/video/pgm.pgm +++ b/cinelerra-5.1/ffmpeg/video/pgm.pgm @@ -1 +1,3 @@ image2 pgm +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/p%05d.pgm diff --git a/cinelerra-5.1/ffmpeg/video/pgmyuv.pgmyuv b/cinelerra-5.1/ffmpeg/video/pgmyuv.pgmyuv index c93204be..9b090369 100644 --- a/cinelerra-5.1/ffmpeg/video/pgmyuv.pgmyuv +++ b/cinelerra-5.1/ffmpeg/video/pgmyuv.pgmyuv @@ -1 +1,3 @@ image2 pgmyuv +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/p%05d.pgmyuv diff --git a/cinelerra-5.1/ffmpeg/video/png.png b/cinelerra-5.1/ffmpeg/video/png.png index aeaef1e9..bb590c3f 100644 --- a/cinelerra-5.1/ffmpeg/video/png.png +++ b/cinelerra-5.1/ffmpeg/video/png.png @@ -1 +1,3 @@ image2 png +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/p%05d.png diff --git a/cinelerra-5.1/ffmpeg/video/ppm.ppm b/cinelerra-5.1/ffmpeg/video/ppm.ppm index 33b99c0e..872bba22 100644 --- a/cinelerra-5.1/ffmpeg/video/ppm.ppm +++ b/cinelerra-5.1/ffmpeg/video/ppm.ppm @@ -1 +1,3 @@ image2 ppm +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/p%05d.ppm diff --git a/cinelerra-5.1/ffmpeg/video/sgi.sgi b/cinelerra-5.1/ffmpeg/video/sgi.sgi index 543d1a12..530ba489 100644 --- a/cinelerra-5.1/ffmpeg/video/sgi.sgi +++ b/cinelerra-5.1/ffmpeg/video/sgi.sgi @@ -1 +1,3 @@ image2 sgi +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/s%05d.sgi diff --git a/cinelerra-5.1/ffmpeg/video/tiff.tiff b/cinelerra-5.1/ffmpeg/video/tiff.tiff index 09927d96..4c2ebd2c 100644 --- a/cinelerra-5.1/ffmpeg/video/tiff.tiff +++ b/cinelerra-5.1/ffmpeg/video/tiff.tiff @@ -1 +1,3 @@ image2 tiff +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/t%05d.tiff diff --git a/cinelerra-5.1/ffmpeg/video/tiff48.tiff b/cinelerra-5.1/ffmpeg/video/tiff48.tiff index 8af40d7b..a1c59270 100644 --- a/cinelerra-5.1/ffmpeg/video/tiff48.tiff +++ b/cinelerra-5.1/ffmpeg/video/tiff48.tiff @@ -1,2 +1,4 @@ image2 tiff +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/t%05d.tiff pixel_format=rgb48 diff --git a/cinelerra-5.1/ffmpeg/video/webp.dfl b/cinelerra-5.1/ffmpeg/video/webp.dfl new file mode 100644 index 00000000..5c61c8b3 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/webp.dfl @@ -0,0 +1 @@ +webp.webp diff --git a/cinelerra-5.1/ffmpeg/video/webp.webp b/cinelerra-5.1/ffmpeg/video/webp.webp new file mode 100644 index 00000000..656f5b03 --- /dev/null +++ b/cinelerra-5.1/ffmpeg/video/webp.webp @@ -0,0 +1,3 @@ +image2 libwebp +# this codec creates a set of image files in a directory +# use an image2 file name like /dir/w%05d.webp diff --git a/cinelerra-5.1/thirdparty/Makefile b/cinelerra-5.1/thirdparty/Makefile index 36101b97..a5f15492 100644 --- a/cinelerra-5.1/thirdparty/Makefile +++ b/cinelerra-5.1/thirdparty/Makefile @@ -114,6 +114,9 @@ ffmpeg.cfg_params= \ $(call if_pkg,twolame,--enable-libtwolame) \ $(call if_pkg,openjpeg,--enable-libopenjpeg) \ $(call if_pkg,lame,--enable-libmp3lame) \ + $(call if_pkg,libaom,--enable-libaom) \ + $(call if_pkg,libwebp,--enable-libwebp) \ + $(call if_pkg,opus,--enable-libopus) \ $(call if_pkg,libvorbis,--enable-libvorbis) \ $(call if_pkg,libtheora,--enable-libtheora) \ $(call if_pkg,libvpx,--enable-libvpx) \ @@ -122,6 +125,8 @@ ffmpeg.cfg_params= \ --extra-cflags="\ $(call inc_path,twolame,libtwolame) \ $(call inc_path,lame,include) \ + $(call inc_path,libaom,usr/local/include) \ + $(call inc_path,libwebp,usr/local/include) \ $(call inc_path,openjpeg,src/lib/openjp2) \ $(call inc_path,libogg,include) \ $(call inc_path,opus,include) \ @@ -136,6 +141,8 @@ ffmpeg.cfg_params= \ --extra-libs="-Wl,--start-group \ $(call ld_path,twolame,libtwolame/.libs) \ $(call ld_path,lame,libmp3lame/.libs) \ + $(call ld_path,libaom,usr/local/lib) \ + $(call ld_path,libwebp,usr/local/lib) \ $(call ld_path,openjpeg,bin) \ $(call ld_path,opus,.libs) \ $(call ld_path,libogg,lib/.libs) \ @@ -166,6 +173,13 @@ ilmbase.mak_params?=; $(MAKE) -C ilmbase* install; cd $(call bld_path,ilmbase); lame.cfg_vars?= CFLAGS+=" -O" lame.cfg_params?=--enable-shared=no lame.mak_params?= ; cd $(call bld_path,lame,include); ln -sf . lame +libaom.cfg_vars?=$(call cmake_config,aom-master) +libaom.cfg_params?= -DENABLE_SHARED=no -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_INSTALL_PREFIX=$(call bld_path,libaom)/usr/local +libaom.mak_params?= ; $(MAKE) -C libaom* install +libwebp.cfg_vars?= ./autogen.sh ; +libwebp.cfg_params?=--enable-shared=no +libwebp.mak_params?=; $(MAKE) -C libwebp* install DESTDIR=$(call bld_path,libwebp) mjpegtools.cflags?="$(call inc_path,libjpeg) $(call ld_path,libjpeg,.libs)" mjpegtools.mak_params?=; ln -s . $(call bld_path,mjpegtools,utils)/mjpegtools mjpegtools.cfg_params?= --enable-shared=no --without-libsdl --without-v4l @@ -272,13 +286,15 @@ $(call rules,$(call std-build,djbfft)) $(call rules,$(call std-build,audiofile)) $(call rules,$(call std-build,encore)) $(call rules,$(call std-build,esound,audiofile)) -$(call rules,$(call std-build,ffmpeg, twolame lame openjpeg opus libtheora x264 x265 libvpx)) +$(call rules,$(call std-build,ffmpeg, twolame lame openjpeg opus libtheora x264 x265 libvpx libaom libwebp)) $(call rules,$(call std-build,fftw)) $(call rules,$(call std-build,flac,libogg)) $(call rules,$(call std-build,giflib)) $(call rules,$(call std-build,ilmbase)) $(call rules,$(call std-build,ladspa)) $(call rules,$(call std-build,lame)) +$(call rules,$(call std-build,libaom)) +$(call rules,$(call std-build,libwebp)) $(call rules,$(call std-build,libavc1394,libraw1394)) $(call rules,$(call std-build,libdv)) $(call rules,$(call std-build,libiec61883,libraw1394)) diff --git a/cinelerra-5.1/thirdparty/downloads.txt b/cinelerra-5.1/thirdparty/downloads.txt index fbf1e83a..a3643e68 100644 --- a/cinelerra-5.1/thirdparty/downloads.txt +++ b/cinelerra-5.1/thirdparty/downloads.txt @@ -1,36 +1,36 @@ https://www.cybercom.net/~dcoffin/dcraw/dcraw.c -http://download-mirror.savannah.gnu.org/releases//openexr/ilmbase-2.2.0.tar.gz -http://gnu.mirrors.pair.com/savannah/savannah//openexr/openexr-2.2.0.tar.gz +http://download-mirror.savannah.gnu.org/releases//openexr/ilmbase-2.2.1.tar.gz +http://gnu.mirrors.pair.com/savannah/savannah//openexr/openexr-2.2.1.tar.gz https://sourceforge.net/projects/opencvlibrary/files/latest/download?source=directory = 3.2.0 -https://sourceforge.net/projects/opencore-amr/files/fdk-aac/fdk-aac-0.1.5.tar.gz/download +#https://sourceforge.net/projects/opencore-amr/files/fdk-aac/fdk-aac-2.2.0.tar.gz/download http://www.mega-nerd.com/libsndfile/files/libsndfile-1.0.28.tar.gz https://ieee1394.wiki.kernel.org/index.php/Libraries https://www.kernel.org/pub/linux/libs/ieee1394/libraw1394-2.1.2.tar.xz https://www.kernel.org/pub/linux/libs/ieee1394/libiec61883-1.2.0.tar.xz https://sourceforge.net/projects/libavc1394/files/latest/download?source=directory = 0.5.4 -https://sourceforge.net/projects/libdv/files/latest/download?source=directory -https://sourceforge.net/projects/giflib/files/latest/download -https://sourceforge.net/projects/flac/files/latest/download?source=directory -https://github.com/uclouvain/openjpeg/archive/master.zip = openjpeg-2.1.0-20160221.tar.xz +https://sourceforge.net/projects/libdv/files/latest/download?source=directory = 0.104 +https://sourceforge.net/projects/giflib/files/latest/download = 5.1.4 +https://sourceforge.net/projects/flac/files/latest/download?source=directory = 1.3.2 +https://github.com/uclouvain/openjpeg/archive/master.zip = openjpeg-2.3.0-20171004.tar.xz ?? https://sourceforge.net/projects/libjpeg-turbo/files/1.5.1/libjpeg-turbo-1.5.1.tar.gz/download -http://www.fftw.org/fftw-3.3.6-pl2.tar.gz +http://www.fftw.org/fftw-3.3.8.tar.gz http://festvox.org/packed/festival/2.4/festival-2.4-release.tar.gz http://festvox.org/packed/festival/2.4/speech_tools-2.4-release.tar.gz http://festvox.org/packed/festival/2.4/voices/festvox_cmu_us_ahw_cg.tar.gz -http://downloads.sourceforge.net/faac/faac-1.28.tar.bz2 -http://downloads.sourceforge.net/faac/faad2-2.7.tar.bz2 -http://ftp.gnome.org/pub/gnome/sources/esound/0.2/esound-0.2.41.tar.bz2 +#http://downloads.sourceforge.net/faac/faac-1.29.9.2.tar.gz +#http://downloads.sourceforge.net/faac/faad2-2.8.8.tar.gz +#http://ftp.gnome.org/pub/gnome/sources/esound/0.2/esound-0.2.41.tar.bz2 http://audiofile.68k.org/audiofile-0.3.6.tar.gz https://sourceforge.net/projects/twolame/files/latest/download?source=directory = 0.3.13 -http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.5.tar.xz -http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz +http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.6.tar.xz +http://downloads.xiph.org/releases/ogg/libogg-1.3.3.tar.gz http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.bz2 -https://sourceforge.net/projects/lame/files/latest/download?source=directory = 3.99.5 -http://dl.maptools.org/dl/libtiff/libtiff-cvsroot, untar, cd libtiff, cvs init, cd /tmp/x, cvs co -d path/libtiff = 4.0.6 +https://sourceforge.net/projects/lame/files/latest/download?source=directory = 3.100 +https://download.osgeo.org/libtiff/tiff-4.0.10.tar.gz https://sourceforge.net/projects/libuuid/files/latest/download?source=directory - 1.0.3 -ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20170426-2245-stable.tar.bz2 -https://bitbucket.org/multicoreware/x265/downloads/x265_2.4.tar.gz -http://ffmpeg.org/releases/ffmpeg-4.0.tar.bz2 +ftp://ftp.videolan.org/pub/x264/snapshots/x264-snapshot-20190131-2245-stable.tar.bz2 +https://bitbucket.org/multicoreware/x265/downloads/x265_3.0.tar.gz +http://ffmpeg.org/releases/ffmpeg-4.1.tar.gz https://github.com/webmproject/libvpx/releases/tag/v1.7.0 https://github.com/swh/ladspa/releases/tag/v0.4.17, plugin.org.uk -https://archive.mozilla.org/pub/opus/opus-1.2.1.tar.gz +https://archive.mozilla.org/pub/opus/opus-1.3.tar.gz diff --git a/cinelerra-5.1/thirdparty/src/fftw-3.3.7.tar.xz b/cinelerra-5.1/thirdparty/src/fftw-3.3.7.tar.xz deleted file mode 100644 index 7cb22173..00000000 Binary files a/cinelerra-5.1/thirdparty/src/fftw-3.3.7.tar.xz and /dev/null differ diff --git a/cinelerra-5.1/thirdparty/src/fftw-3.3.8.tar.xz b/cinelerra-5.1/thirdparty/src/fftw-3.3.8.tar.xz new file mode 100644 index 00000000..f7dcbe0d Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/fftw-3.3.8.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/libaom-v1.0.0.tar.xz b/cinelerra-5.1/thirdparty/src/libaom-v1.0.0.tar.xz new file mode 100644 index 00000000..f5d4fee9 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/libaom-v1.0.0.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/libogg-1.3.2.tar.xz b/cinelerra-5.1/thirdparty/src/libogg-1.3.2.tar.xz deleted file mode 100644 index a100a0ce..00000000 Binary files a/cinelerra-5.1/thirdparty/src/libogg-1.3.2.tar.xz and /dev/null differ diff --git a/cinelerra-5.1/thirdparty/src/libogg-1.3.3.tar.xz b/cinelerra-5.1/thirdparty/src/libogg-1.3.3.tar.xz new file mode 100644 index 00000000..bfd8dec1 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/libogg-1.3.3.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/libvorbis-1.3.5.tar.xz b/cinelerra-5.1/thirdparty/src/libvorbis-1.3.5.tar.xz deleted file mode 100644 index 1928c224..00000000 Binary files a/cinelerra-5.1/thirdparty/src/libvorbis-1.3.5.tar.xz and /dev/null differ diff --git a/cinelerra-5.1/thirdparty/src/libvorbis-1.3.6.tar.xz b/cinelerra-5.1/thirdparty/src/libvorbis-1.3.6.tar.xz new file mode 100644 index 00000000..fb018e31 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/libvorbis-1.3.6.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/libwebp-1.0.2.tar.xz b/cinelerra-5.1/thirdparty/src/libwebp-1.0.2.tar.xz new file mode 100644 index 00000000..aea7ec96 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/libwebp-1.0.2.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/openjpeg-2.3.0.tar.xz b/cinelerra-5.1/thirdparty/src/openjpeg-2.3.0.tar.xz index 79603ded..79d437f3 100644 Binary files a/cinelerra-5.1/thirdparty/src/openjpeg-2.3.0.tar.xz and b/cinelerra-5.1/thirdparty/src/openjpeg-2.3.0.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/opus-1.2.1.tar.xz b/cinelerra-5.1/thirdparty/src/opus-1.2.1.tar.xz deleted file mode 100644 index c2f3c813..00000000 Binary files a/cinelerra-5.1/thirdparty/src/opus-1.2.1.tar.xz and /dev/null differ diff --git a/cinelerra-5.1/thirdparty/src/opus-1.3.tar.xz b/cinelerra-5.1/thirdparty/src/opus-1.3.tar.xz new file mode 100644 index 00000000..9e7e2469 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/opus-1.3.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/tiff-4.0.10.tar.xz b/cinelerra-5.1/thirdparty/src/tiff-4.0.10.tar.xz new file mode 100644 index 00000000..dafaeb25 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/tiff-4.0.10.tar.xz differ diff --git a/cinelerra-5.1/thirdparty/src/tiff-4.0.9.tar.xz b/cinelerra-5.1/thirdparty/src/tiff-4.0.9.tar.xz deleted file mode 100644 index 529bf8e1..00000000 Binary files a/cinelerra-5.1/thirdparty/src/tiff-4.0.9.tar.xz and /dev/null differ diff --git a/cinelerra-5.1/thirdparty/src/x265_2.9.tar.xz b/cinelerra-5.1/thirdparty/src/x265_2.9.tar.xz deleted file mode 100644 index d8e2937a..00000000 Binary files a/cinelerra-5.1/thirdparty/src/x265_2.9.tar.xz and /dev/null differ diff --git a/cinelerra-5.1/thirdparty/src/x265_3.0.tar.xz b/cinelerra-5.1/thirdparty/src/x265_3.0.tar.xz new file mode 100644 index 00000000..cc68b106 Binary files /dev/null and b/cinelerra-5.1/thirdparty/src/x265_3.0.tar.xz differ