summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* libhb: fix mp4 optimizejstebbins2014-09-011-2/+3
| | | | | | | movflags were being overwritten, silly error on my part. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6386 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: don't set duration of PGS subtitlesjstebbins2014-08-301-2/+4
| | | | | | | | | | PGS subtitles are terminated by an explicit "end of sub" subtitle in the stream. The duration is not used (or known in advance). So every PGS was getting the default 10s duration assigned. This made the overall duration of the stream appear longer than it really is. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6384 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add gpl v2 copyright message do deccc608subjstebbins2014-08-292-0/+18
| | | | | | | much of this work was borrowed from ccextractor which is GPL v2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6383 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix small error in "empty" mp4 subtitle durationjstebbins2014-08-271-3/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6376 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix tx3g styles when the entire line is one stylejstebbins2014-08-271-2/+12
| | | | | | | the style was not getting flushed if there were no style changes git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6375 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix merging of ssa subtitlesjstebbins2014-08-271-6/+34
| | | | | | | | mergeSubtitle was originally written for pure text subs. But now the subtitle buffers have extra ssa formatting that needs different treatment. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6374 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: remove emptry tx3g subtitlesjstebbins2014-08-271-3/+12
| | | | | | | We don't need the empty subtitle buffers. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6373 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix stop time of subtitlesjstebbins2014-08-271-0/+4
| | | | | | | scr_offset was not accounted for in stop time git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6372 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: fix dimensions problem when both width and height are specifiedjstebbins2014-08-272-13/+12
| | | | | | | | | | | | | The GUI will precompute both width and height and specify both on the command line. But then the CLI recomputes width based on height which can result in the width being changed. So, in non-anamorphic mode, disable keep_aspect so that width and heigh are both kept. And in other anamorphic modes, use custom ana when computing dimensions so that both width and height are kept (i.e. recompute par). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6369 b64f7644-9d1e-0410-96f1-a4d463321fa5
* x265: enable 2-pass ABR encodingjstebbins2014-08-262-23/+50
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6366 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix accumulating rounding error in CoreAudio timestampsjstebbins2014-08-261-4/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6363 b64f7644-9d1e-0410-96f1-a4d463321fa5
* muxavformat: Fix muxing of AAC that is missing extradatajstebbins2014-08-201-26/+32
| | | | | | | | | Allocate extra byte so extradata pointer is not NULL. Fix logging of malloc failures so we can see what failed. Fix test for existence of extradata, check length NOT bytes. bytes is never NULL git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6327 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix potential crash in filtersjstebbins2014-08-201-1/+1
| | | | | | | If the job aborts right away, an uninitialized buffer is closed and crash! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6326 b64f7644-9d1e-0410-96f1-a4d463321fa5
* build: remove mp4v2 and libmkv dependenciesjstebbins2014-08-189-2218/+3
| | | | | | | ...and enable x265 by default git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6309 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Sanitize BD chapter durationsjstebbins2014-08-111-2/+43
| | | | | | | | | | | | | | It appears some BDs have invalid chapter durations, see https://forum.handbrake.fr/viewtopic.php?f=12&t=30479 This compares chapter start time deltas and title duration to chapter duration to make best guess corrections. Note that chapter events generated by libbluray are based on the chapter start times. So the start time should be trusted more than the duration. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6292 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix mp4 audio track titlesjstebbins2014-08-061-0/+7
| | | | | | | mp4 audio track titles were not being applied by libavformat git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6270 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix mp4 post tagging problemsjstebbins2014-08-061-0/+1
| | | | | | | | | | | A couple common mp4 taggers (mp3Tag and iTunes) fail to tag files that have the Nero chapter atom (chpl). This atom was added when we switched to libavformat for muxing. I haven't found any players yet that rely on this for chapters. If we ever find any, we can consider adding an option somewhere to enable chpl. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6269 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix comment in isIframe()jstebbins2014-07-301-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6248 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add i-frame detection for mpeg4 ts/ps streamsjstebbins2014-07-301-0/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6247 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix potential seg fault in hb_hexdumpjstebbins2014-07-301-1/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6246 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add new function for retrieving previewsjstebbins2014-07-296-36/+190
| | | | | | | | | | | | | | | | This new function has a couple advantages over the old one (which we should phase out). It does not require hb_job_t as a parameter, instead it uses hb_ui_geometry_t which is a smaller and simpler struct. The entire job struct is overkill as input to this function. It returns an hb_image_t that fully describes the returned image instead of just a uint8_t array. The caller does not have to make assumptions about image size, line stide, or pixel format since hb_image_t specifies these things. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6242 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui/CLI/libhb: add nlmeans denoise filter to linguijstebbins2014-07-212-0/+229
| | | | | | | Move nlmeans preset&tune parsing from cli to libhb git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6239 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cli: allow user cli options to override defaults for fallback audio encoderjstebbins2014-07-162-10/+66
| | | | | | | Solves: https://forum.handbrake.fr/viewtopic.php?f=10&t=28074&sid=68d8c5bfffd7081625bcd56fb7c4dad1 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6236 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Improve handling of streams with broken video timestampsjstebbins2014-07-161-4/+11
| | | | | | | Addresses https://forum.handbrake.fr/viewtopic.php?f=12&t=30307&p=140045#p139847 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6235 b64f7644-9d1e-0410-96f1-a4d463321fa5
* cli: Simplify output geometry calculationjstebbins2014-07-161-15/+13
| | | | | | | | Fix bug where non-anamorphic mode ignores modulus Change default modulus to 2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6234 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: work around libav decoder error durint p-to-p encodingjstebbins2014-07-143-23/+65
| | | | | | | | | In some cases, initial data when in p-to-p mode causes libav decoder initialization to fail. This only happens when multi-threaded encoding is enabled. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6229 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix typo in flag definitionjstebbins2014-07-011-1/+1
| | | | | | | NO_IDR and SCAN_COMPLETE values overlapped git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6226 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Improve nlmeans edgeboost prefilter.bradleys2014-06-281-11/+53
| | | | | | | | | Fixes a typo (1/27 instead of 1/127) that caused edgeboost to match on nearly everything, and tweaks this number slightly. Adds a post-processing step to handle marked pixels having too few marked neighboring pixels as false positives. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6224 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Add median prefilter to nlmeans.bradleys2014-06-271-5/+118
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6223 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bd: fix long delays caused by updated libblurayjstebbins2014-06-251-4/+4
| | | | | | | | bd_seek and the new m2ts_filter in libbluray have a bad interaction. So use bd_seek_time instead. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6221 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: New denoiser, nlmeans.bradleys2014-06-194-0/+748
| | | | | | | | Non-local means averages multiple patches of similar pixels together, preserving similarities and attenuating variance (usually noise). This is typically more effective than lowpass and more faithfully restores the appearance of structure and detail found in the original source, especially in the high frequency range. Parameters for origin patch weight tuning and pre-filtering further improve on the original algorithm. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6216 b64f7644-9d1e-0410-96f1-a4d463321fa5
* macui/cli/libhb: cleanupjstebbins2014-06-184-193/+15
| | | | | | | | | | | | macui: Simplifies code in Controller.m and fixes a few bugs macui: Fixes "Windows 8 Phone" preset aspect ratio problem macui: round up to next mod boundary when limiting to title dimensions - crop libhb: Eliminates hb_fix_aspect and hb_set_size functions. libhb: Makes hb_validate_size a passthru to hb_set_anamorphic_size cli: eliminage use of hb_validate_size git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6215 b64f7644-9d1e-0410-96f1-a4d463321fa5
* decpgssub: partial fix for "multi-object" PGS subsjstebbins2014-06-131-24/+50
| | | | | | | | | | | We were packaging multiple subtitle packets with the same pts and passing down to rendersub which would then throw away all but the last sub with a given pts. So put all AVSubtitleRects into the same hb_buffer_t. A patch to libav is also required to fix the multi-object problem. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6211 b64f7644-9d1e-0410-96f1-a4d463321fa5
* macui: fix PcitureController geometry calculationsjstebbins2014-06-103-141/+302
| | | | | | | | simplifies the code and makes it work better also updates preview window size calculations git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6209 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix decoding avi with palettejstebbins2014-05-294-7/+46
| | | | | | | | | ... and probably other formats that use a palette. The palette is stored in AVPacket side data which we did not read. So read the side data and stash it in hb_buffer_t so that it can be used later by the decoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6207 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix overwriting of source pathjstebbins2014-05-273-8/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6206 b64f7644-9d1e-0410-96f1-a4d463321fa5
* deccc608sub: fix positioning once againjstebbins2014-05-231-3/+4
| | | | | | | | after last change, CCs were getting positioned too far into the middle of the image. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6204 b64f7644-9d1e-0410-96f1-a4d463321fa5
* deccc608sub: fix invalid subtitle position when extreme cropping applied.jstebbins2014-05-221-5/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6203 b64f7644-9d1e-0410-96f1-a4d463321fa5
* mux: fix problems created by >32 track limit patchjstebbins2014-05-141-14/+12
| | | | | | | | | | | | First problem was pre-existing, but hidden. Interleaving was severely broken because we relied on buf->s.stop to determin interleave points. stop is not guaranteed to be set. Other problems with the new bit vector code caused failure to complete muxing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6187 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bump x265 to version 1.0Rodeo2014-05-131-35/+91
| | | | | | | Miscellaneous bugfixes and performance improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6185 b64f7644-9d1e-0410-96f1-a4d463321fa5
* demux: fix problem with widely spaced SCRsjstebbins2014-05-134-7/+25
| | | | | | | | | | | | | | | | | Fixes this bug report https://forum.handbrake.fr/viewtopic.php?f=12&t=30032 Split MPEG demuxer into TS demuxer and PS demuxer to allow using different PCR/SCR delta tolerance in each scenario. We were using a PCR/SCR delta tolerance that was a bit of a compromise between the max allowed by the specification for TS vs PS streams. But the spec for TS PCR is 100ms and the spec for PS SCR is 700ms, so we risked false detection of discontinuities in PS. In PS streams that pack multiple frames into one PES packet, the detection of a discontinuity causes recalculation of an scr offset which jumps around wildly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6183 b64f7644-9d1e-0410-96f1-a4d463321fa5
* mux: eliminate 32 track limitjstebbins2014-05-111-35/+191
| | | | | | | | | The limit was due to using an uint32_t as a bit vector. This solves the limitation by introducing an hb_bitvec_t struct for bit vectors of unlimited size. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6181 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx265: fix chapter insertion.Rodeo2014-05-101-0/+1
| | | | | | | | | Checking whether we should attach a chapter to the output buffer is not enough, we actually have to attach it too. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6176 b64f7644-9d1e-0410-96f1-a4d463321fa5
* deccc608sub: fix cropping of CCsjstebbins2014-05-061-5/+6
| | | | | | | | If the CC was in the crop area at the top of the image, it's position was not moved properly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6172 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add VP8 supportjstebbins2014-04-157-102/+191
| | | | | | | Thanks to Matthew Harvey for this patch git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6165 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Convert all text subtitles to ASS subsjstebbins2014-04-1314-1935/+1377
| | | | | | | | | 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
* rendersub: fix rendering SRT markup in CC subsjstebbins2014-04-091-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6160 b64f7644-9d1e-0410-96f1-a4d463321fa5
* QSV: always use our own DTS.Rodeo2014-04-081-58/+40
| | | | | | | | | | | | | Previously, the DTS provided by MSDK was used if it was available and the frame rate was constant. Our own DTS is indentical to MSDK's (when the frame rate is constant), but MSDK will sometimes provide 1 or 2 bogus DTS over the duration of a file, causing the encode to abort (lavf is picky). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6158 b64f7644-9d1e-0410-96f1-a4d463321fa5
* QSV: fix logging of whether B-frames are enabled.Rodeo2014-04-071-7/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6157 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add generic code for converting NALRodeo2014-04-073-89/+254
| | | | | | | | | | | | | | unit bitstreams (H.264, HEVC) to and from Annex B format. Only used by QSV for now, but could always come in handy down the road. May also fix an issue introduced by the recent QSV cleanup patchset. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6156 b64f7644-9d1e-0410-96f1-a4d463321fa5