summaryrefslogtreecommitdiffstats
path: root/libhb/vfr.c
Commit message (Collapse)AuthorAgeFilesLines
* vfr: fix invalid read/writeJohn Stebbins2017-02-261-3/+2
| | | | | | Probably the cause of crash seen in nightly builds fixes https://github.com/HandBrake/HandBrake/issues/597
* vfr: add cfr frame drop debugging logsJohn Stebbins2017-02-211-0/+32
| | | | | | | | | | | | | These logs can be enabled by uncommenting HB_DEBUG_CFR_DROPS at the top of the file. If you have any sources that use progressive frame upsampling that you would like to test with this new frame drop algo, enable these debug logs to get full details of what frames are dropped and passed. They show which frames are dropped and the metrics that the decision to drop is based on. They also show which frames are passed and the cadence of passed vs. dropped frames.
* vfr: simplify and improve CFR frame dropping algoJohn Stebbins2017-02-211-158/+198
| | | | | | | | | | | | | | | | The new algo caches extra frames so it can select a "best" frame to drop from a list. A metric for each buffer is calculated as it is added to the list. The metric indicates how much the frame differes from the previous frame. The one with the lowest metric is selected for dropping when a drop is required. The old algo tried to latch on to a pattern without keeping any extra frames. When "in sync" it would drop the buffer that fit the pattern. But this only worked for a few specific patterns I had tested with and did not work for all possible patterns (e.g. issue 50 where 1 in 5 needed to be dropped to convert 29.97 to 23.976). fixes https://github.com/HandBrake/HandBrake/issues/50
* Update copyright dates to 2017.Bradley Sepos2017-01-011-1/+1
|
* vfr: fix log messagesJohn Stebbins2016-09-201-4/+4
|
* filters: make job filter settings an hb_dict_tJohn Stebbins2016-03-091-13/+14
| | | | | | This simplifies accessing and changing filter parameters programatically. It also changes the custom filter string format to a ':' separated list of key/value pairs.
* libhb: Add libavfilter support and pad filterJohn Stebbins2016-01-211-15/+18
| | | | | | | | | | | | | | New filter types HB_FILTER_AVFILTER and HB_FILTER_PAD. Settings for HB_FILTER_AVFILTER are the same as you would pass to avconv from the command line -vf option, except that we do not support multi-input or multi-output filters. Settings for HB_FILTER_PAD are "width:height:color:x_offset:y_offset". width x height is the size of the output frame after padding. color may be a w3c color name or RGB value (default black). x_offset, y_offset is the position of the video within the padded area (default centered). Any of the values may be omitted or "auto".
* sync: gut and rewriteJohn Stebbins2016-01-211-1/+1
| | | | | | | | | | | sync.c was difficult to read, fragile, and prone to difficult to diagnose bugs (see https://forum.handbrake.fr/viewtopic.php?f=12&t=33147) This rewrite simplifies the code, removes signals, locking and yield that probably cause the above problem and is much more flexible. It fixes a wider variety of timestamp issues than before and is much easier to extend if other timestamp analysis is desired.
* Update copyright dates to 2016.Bradley Sepos2016-01-011-1/+1
|
* vfr: timestamps are signedJohn Stebbins2015-11-151-9/+17
|
* libhb: add hb_buffer_listJohn Stebbins2015-09-241-244/+220
| | | | | This brings together several independent implementations of a simple buffer list manager.
* libhb: Use a buffer flat to indicate EOFjstebbins2015-05-011-1/+2
| | | | | | | | | | | | ... instead of a 0 length buffer. This fixes this issue: https://forum.handbrake.fr/viewtopic.php?f=12&t=31959 Theora can create 0 length output. These 0 length frames indicate duplicate frames. So we can't use 0 length buffers to indicate the end of the stream. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7143 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update year to 2015.bradleys2015-02-011-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6852 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: add json APIsjstebbins2014-12-161-24/+16
| | | | | | | | | | There are several changes to job and title structs that break current windows interop code. The interop code should be changed such that it only uses json APIs. So if there is any missing features (or bugs) in these APIs, please let me know. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6602 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update some copyright dates to 2014.Rodeo2014-02-181-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6042 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make initialization of vfr filter work as I intended.jstebbins2013-05-281-14/+40
| | | | | | | Also fix signalling of framerate in output file when PFR is used. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5522 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix hb_vfr_info() and refactor hb_vfr_init() a bit.Rodeo2013-05-221-39/+22
| | | | | | | | | | | | | Since SVN revision 5058, hb_vfr_init didn't have access to title->rate, rate_base - which are needed to set the input framerate for CFR/PFR. It was therefore printing the output framerate in both cases, regardless of the input framerate: [22:13:04] + frame rate: 23.976 fps -> constant 30.000 fps [22:13:04] + filters [22:13:04] + Framerate Shaper (1:27000000:900000) [22:13:04] + frame rate: 30.000 fps -> constant 30.000 fps git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5499 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated all the copyright headers to 2013.sr552013-03-091-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5318 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix initialization of hb_job_t.pfr_vrate(_base).Rodeo2012-10-271-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5037 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: handle overlapping timestamps betterjstebbins2012-09-111-0/+8
| | | | | | | | | This shouldn't happen except in the case of bad sources or an hb bug. But if encountered, it provoked a feedback loop of frame dropping and duplication where there should have been a single frame drop. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4952 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: decomb and deinterlace improvementsjstebbins2012-08-271-1/+1
| | | | | | | | | | | | | | | | | | Use hb_buffer_t for reference buffers. This is what eliminates extra buffer copies. Simplified a lot of the code. This resulted in some minor speed improvements and easier to read code. Allow mcdeint+bob. Previously these could not be used together. Thread the erode-dilate-erode-check steps in decomb3. More speed improvement. Speed of default decomb went from 62fps to 76fps. Speed of fast decomb went from 90fps to 95fps. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4919 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated file copyright / GPL headerssr552012-06-151-1/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix problem with positions of burned-in subsjstebbins2012-05-051-1/+0
| | | | | | | | | | | | | | | | | When cropping and/or scaling, the position of burned-in SSA subs was broken. Also, when scaling, the position of all other burned-in subs was broken. Part of this fix is to revert a bit of filter initialization changes that were made in this commit https://trac.handbrake.fr/changeset/4605 The other part of the fix is to add cropping parameters to the initialization of the subtitle rendering filter. This filter needs the *original* title dimensions and the crop values in order to compute the positions properly. The changes that I am reverting gave it the scaled job dimensions and the crop values. This was wrong in so many ways it's embarassing :p git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4642 b64f7644-9d1e-0410-96f1-a4d463321fa5
* PGS (bluray) subtitle support \o/jstebbins2012-04-261-0/+1
| | | | | | | | | | | | Thanks to patches supplied by David Mitchell and Rob McMullen we finally have PGS support. I added a fix for libav pgs timestamp processing and detection of forced subtitles to their work, then made foreign audio search work with PGS subs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4605 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix problem with fps calculation in 2 pass encodesjstebbins2012-04-141-1/+1
| | | | | | | | | interjob was not getting initialized at the end of the 1st pass because for some unfathomable reason, I did not save the job in the filter objects private data even though I had a job variable there. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4599 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a problem with start times of frames in CFR modejstebbins2012-04-101-2/+10
| | | | | | | some errors would allow gaps between frames and overlapping start times git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4585 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Activity Log: fix some typos and make indentation a bit more consistent.Rodeo2012-03-311-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4565 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix cfr encodingjstebbins2012-03-311-3/+1
| | | | | | | | | | | | when frames are duplicated, the frame was not copied properly and resulted in divide by 0 later when the frame is processed. This fix is a bit larger than the minimum size necessary to fix the problem. I took the oportunity to clean up some buffer initialization and copy operations. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4563 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-0/+616
This patch enhances the filter objects. The 2 key improvements are: 1. A filter can change the image dimensions as frames pass through it. 2. A filter can output more than one frame. In addition, I have: Moved cropping & scalling into a filter object Added 90 degree rotation to the rotate filter Moved subtitle burn-in rendering to a filter object. Moved VFR/CFR handling into a framerate shaping filter object. Removed render.c since all it's responsibilities got moved to filters. Improves VOBSUB and SSA subtitle handling. Allows subtitle animations. SSA karaoke support. My apologies in advance if anything breaks ;) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4546 b64f7644-9d1e-0410-96f1-a4d463321fa5