summaryrefslogtreecommitdiffstats
path: root/libhb/decssasub.c
Commit message (Collapse)AuthorAgeFilesLines
* decssasub: fix p-to-p encoding with SSA importJohn Stebbins2019-07-111-2/+91
| | | | support for p-to-p with SSA import was completely omitted
* ssa: improve SSA to TX3G conversionJohn Stebbins2019-01-141-179/+3
| | | | | We were only applying SSA inline override tags. With this patch we now parse SSA style descritions in the SSA header and apply them per event.
* Add hb_getline since mingw doesn't have getline functionJohn Stebbins2019-01-141-2/+2
|
* decssasub: fix crash when filename is invalidJohn Stebbins2019-01-141-20/+21
|
* decssasub: fix subtitle start/stop time offsetJohn Stebbins2019-01-141-2/+2
|
* Add SSA subtitle importJohn Stebbins2019-01-141-9/+275
|
* Update copyright dates to 2019.Bradley Sepos2019-01-011-1/+1
|
* decssasub: Fix decoding SSA subtitlesJohn Stebbins2018-06-091-178/+8
| | | | | | | ffmpeg delivers the SSA subtitles in the matroska packet format we require, so no parsing is necessary now. Fixes https://github.com/HandBrake/HandBrake/issues/1406
* libhb: fix a leak in decssasubDamiano Galassi2018-01-101-0/+3
|
* Update copyright dates to 2018.Bradley Sepos2018-01-011-1/+1
|
* Update copyright dates to 2017.Bradley Sepos2017-01-011-1/+1
|
* decssasub: fix ssa start times when p-to-p is usedJohn Stebbins2016-06-271-6/+7
|
* sync: correct timestamp discontinuities in sync instead of reader (#192)John Stebbins2016-05-241-34/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * sync: correct timestamp discontinuities in sync instead of reader This patch passes discontinuity information through the pipeline till it reaches sync.c. The timestamps are passed through the pipeline as read and unmodified to sync.c (instead of attempting to correct discontinuities in reader). In sync, when we see a discontinuity, we know where the next timestamp should be based on the timestamp and duration of the previous buffer (before the discontinuity). So we calculate an "SCR" offset based on the timestamp after the discontinuity and what we calculate it should be. The old discontinuity handling code was broken due to the following. The MPEG STD timing model relies heavily on the decoder having an STC that is phase lock looped to the PCRs in the stream. When decoding a broadcast stream, the decoder can count on the time measure between PCRs using the STC to match to a high degree of accuracy. I.e. STC - lastSTC == PCR - lastPCR. When a discontinuity occurs, the decoder calculates a new PCR offset = PCR - STC. I.e. the offset is the new PCR value minus what it would have been if there had been no discontinuity. The above does not work without a reliable STC, which we do not have. We have been attempting to approximate one by avereraging the duration of received packets and extrapolating an "STC" based on the last PTS and the average packet duration. But this is highly variable and unreliable. * decavcodec: fix data type of next_pts It needs to be double so that partial ticks are not lost * deccc608sub: clarify comment * sync: allow queueing more audio Audio is small, and there is often a significant amount of audio in the stream before the first video frame. * sync: improve handling of damaged streams When data is missing, the audio decoder was extrapolating timestamps from the last pts before the error caused by the missing data which caused sync issues. Also, missing data can cause the video decoder to output a frame out of order with the wrong scr sequence. Drop such frames.
* libhb: remove unused hb_buffer_t sequence numberJohn Stebbins2016-05-171-4/+3
|
* Update copyright dates to 2016.Bradley Sepos2016-01-011-1/+1
|
* libhb: use LL for int64 constants to make mingw happyJohn Stebbins2015-12-261-4/+4
|
* libhb: add hb_buffer_listJohn Stebbins2015-09-241-20/+14
| | | | | This brings together several independent implementations of a simple buffer list manager.
* libhb: Use a buffer flat to indicate EOFjstebbins2015-05-011-1/+1
| | | | | | | | | | | | ... 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
* Convert all text subtitles to ASS subsjstebbins2014-04-131-264/+198
| | | | | | | | | Add support for font color to tx3g. Allow more than one style flag at time in tx3g. Add positioning support to CC subs git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6163 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
* libhb: fix problem with SSA render when muxer is avformatjstebbins2013-11-011-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5864 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add experimental avformat muxer for mkv and mp4jstebbins2013-06-301-1/+21
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5620 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decssasub, dectx3gsub: fix writing past hb_buffer_t data[size - 1].Rodeo2013-04-101-8/+9
| | | | | | | | | | This is not safe and causes subtitle corruption. Same fix as SVN revision 5346 for the remaining text-based subtitle deocders. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5390 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
* Updated file copyright / GPL headerssr552012-06-151-3/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-285/+56
| | | | | | | | | | | | | | | | | | | | 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
* Fix parsing of SSA layer fieldjstebbins2011-09-241-5/+33
| | | | | | | | | | | | SSA subtitles have an empty layer field (bare ','). The scanf format specifier "%*128[^,]" will not match on a bare ','. There must be at least one non ',' character in the match. So the format specifier is placed directly next to the 'Dialogue:' string so that the next expected ' ' after the ':' will be the character it matches on when there is no layer field. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4244 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix a warning in decssasub.c by adding new hb_valog functionjstebbins2011-06-151-10/+1
| | | | | | | | And consolidate logging code in hb_valog. hb_log and hb_deep_log call hb_valog. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4060 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix some problems with rgb2yuv and yuv2rgbjstebbins2011-05-171-2/+2
| | | | | | | | | | yuv2rgb converted incorrectly. Cb and Cr were swapped in 2 of the 3 conversion expressions. rgb2yuv was setting the color channels in the incorrect order in the output. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3981 b64f7644-9d1e-0410-96f1-a4d463321fa5
* True SSA passthru for MKV.jstebbins2011-03-311-11/+94
| | | | | | | | | We were converting SSA to UTF8 subs which looses a lot of formatting. Now we pass through the ssa unmodified and add all fonts as attachments to the mkv. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3891 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Simplify a lot of subtitle handling code.jstebbins2011-03-271-6/+4
| | | | | | | Makes it easier to read. Gets rid of some unnecessary variables. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3886 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add temporally overlapping subtitle support.davidfstr2011-02-251-0/+6
| | | | | | | | | | | | | | | | | * New subtitle sync algorithm added to sync work-object ("simultaneous"). Classic algorithm preserved but disabled. * Render work-object now supports queueing a /list/ of subtitles. * FIFOs have been extended to support pushing/popping buffer-lists as single elements. * Added SUBSYNC_VERBOSE_TIMING flag to debug timing issues related to subtitle display. Observable behaviors changed in the new subtitle sync algorithm: * Temporally overlapping subtitles are no longer trimmed to be non-overlapping. * Subtitles less than two seconds long are no longer artificially extended. Sorry, Indochine fans. * Subtitles that stop before they start will never be displayed. The old algorithm will display such subtitles if they begin in the future (relative to the current video frame being processed). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3804 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix sync of ssa subtitles when using point-to-point encodingjstebbins2010-11-221-0/+28
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3685 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a crash when ass_render_frame doesn't return a frame list.jstebbins2010-09-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3558 b64f7644-9d1e-0410-96f1-a4d463321fa5
* SSA subtitle burn injstebbins2010-09-281-40/+341
| | | | | | | | | | Anime fans rejoice! This patch adds SSA subtitle burn-in support with libass. Therefore SSA subtitles should now be rendered in full quality, with the appropriate embedded fonts and positioning information. Thanks to davidfstr git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3557 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Multi-line SSA packets handled by the SSA->UTF8 decoder.jstebbins2010-08-101-32/+64
| | | | | | | Contributed by davidfstr. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3475 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix potential buffer overrunjstebbins2010-06-021-3/+3
| | | | | | | and a few compile time warnings about sign differences git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3345 b64f7644-9d1e-0410-96f1-a4d463321fa5
* oops. forgot to commit the new file jstebbins2010-06-011-0/+269
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3343 b64f7644-9d1e-0410-96f1-a4d463321fa5