Commit Graph

42 Commits

Author SHA1 Message Date
Jonathan Thomas
60ffebe1fe Replaced avcodec_encode_audio with avcodec_encode_audio2, and completely redid the way PTS values are calculated and set. Another nice improvement! 2012-10-27 21:36:08 -05:00
Jonathan Thomas
a0b24c61f0 Fixed a huge memory leak related to cache objects, and incorrect frame sizes. It was caching way too many frames, and creating all sorts of issues. 2012-10-26 00:27:44 -05:00
Jonathan Thomas
b74e97c7d2 FIxed some big audio bugs, and finally got the audio reversing correctly working. Now, audio waves are reversed when a time map is moving backwards. There are still some pops and crackles, but I'll fix those later. 2012-10-21 05:29:29 -05:00
Jonathan Thomas
5e5ca2a55c Fixed a big bug on frame rate mapping, due to incorrect # of samples being copied into the new frame. Also, implemented interalacing support, and full pulldown support (in the frame mapper). 2012-10-18 02:58:09 -05:00
Jonathan Thomas
129a2fccd7 Many experimental changes, including a new FrameMapper that is based on FileReaderBase, and lots of debug code. 2012-10-17 09:57:02 -05:00
Jonathan Thomas
b647ff77c8 Fixed a regression with audio files and seeking, added a few new methods, and more accurately detect the End() of clips. 2012-10-14 02:36:05 -05:00
Jonathan Thomas
a601bcef2d Another huge refactor and lots of big fixes! Time mapping now works... mostly. The jumpy / glitchy images have been solved by copying the AVFrame into an AVPicture, which does not get clobbered on the next decode.
Also, added a new frame number overaly (in the top, left part of the image), and a new AddColor() method, to change the size and color of the frame's image...

Padded the end of the FFmpegWriter / WriteTrailer() method, to avoid having a codec ignore the last many frames.
2012-10-12 00:54:53 -05:00
Jonathan Thomas
217c54a5ae Major refactor to the cache object (again)! It now uses bytes to determine how many frames to keep. 2012-10-11 17:30:32 -05:00
Jonathan Thomas
780a702f5d Added a Rotate() method to a Frame object. Added new methods on a clip to translate frame numbers (FrameMapper and Time Curves). Now, the Timeline, Clip, and Readers are all working with animation curves. Pretty cool! 2012-10-10 02:36:53 -05:00
Jonathan Thomas
63529bd158 Added a new experimental overlay method to a frame, which composites images from multiple frames, and adds the result to the bottom right side of the image. 2012-08-29 16:07:47 -05:00
Jonathan Thomas
b3cf902f22 Added a new ImageReader class, which uses ImageMagick++ to read image files, and produce openshot::Frame objects. 2012-08-29 15:29:15 -05:00
Jonathan Thomas
ed697a9c15 Added pool of software image scalers to the FFmpegWriter / encoder, and removed OMP critical section. Also, refactored some audio and video codecs, and changed "resize" to "scale" for speed improvements. 2012-08-24 15:57:49 -05:00
Jonathan Thomas
1ec7128a09 Fixed a huge bug where the FFmpegWriter was not scaling colors to 8 bit, and that would crash on certain colors being used in an image. Also, added a new, experimental waveform visualization to the encoder. 2012-08-22 17:31:12 -05:00
Jonathan Thomas
2b5d317123 Fixed a multi-threaded encoding bug with audio-only files. 2012-08-20 22:23:31 -05:00
Jonathan Thomas
b98b8f8968 Fixed many bugs on the multi-threaded encoder, simplified the API, and removed some memory leaks. 2012-08-20 14:26:49 -05:00
Jonathan Thomas
d1af1b5fef Huge refactor, switched almost all methods to using pointers for Frames, and moved some key method calls outside the critical OMP sections. Also, refactored the sws scaler, to create a pool of 32 scalers, and give each thread it's own scaler. This refactor resulted in a 40%+ increase in speed on the FFmpegReader class.
I also added a cmake build flag for the google perftools library, to assist on profiling performance issues.
2012-08-15 17:27:14 -05:00
Jonathan Thomas
be802dafb0 Added experimental AddEffect method to the frame object, to apply image effects 2012-08-11 21:13:05 -05:00
Jonathan Thomas
72d6553f75 Added the ability to specify the image type and scale of any frame when calling the Save() method on a frame. This makes it easy to save any frame as any image type at any size image... very useful indeed. 2012-08-05 16:43:09 -05:00
Jonathan Thomas
67dba0cd67 Fixed the audio resampling by adding a new class called AudioResampler, which maintains state between calls to the JUCE resampler. Maintaining state allows JUCE to remove the discontinuities between the frames, and removes all the pops and crackles.
This is a major commit, and changes many things, including build scripts, new classes, and how the encoder works.
2012-08-05 15:17:37 -05:00
Jonathan Thomas
5d708ecfba Fixed a small rounding bug with the audio resampling 2012-08-03 00:32:56 -05:00
Jonathan Thomas
80ca5e8315 Fixed audio resampling to now use JUCE instead of FFmpeg. Removed lots of debug code. 2012-07-30 11:05:36 -05:00
Jonathan Thomas
0aac7871a3 Changed AudioBufferSource to only contain a pointer to a buffer, rather than contain it's own copy of the audio samples. 2012-07-30 10:19:35 -05:00
Jonathan Thomas
efb38cc9d8 Added in JUCE audio resampling, and have lots of resampling debug code still in place. 2012-07-30 02:37:19 -05:00
Jonathan Thomas
7125b26357 checking stuff in. 2012-07-24 12:50:17 -05:00
Jonathan Thomas
3b46aad2ef Added some new methods to access audio data: channels, samples, etc... Also, added initial unit tests for the FFmpegReader class, including waveform checking against an actual audio file. 2012-07-09 01:22:11 -05:00