summaryrefslogtreecommitdiffstats
path: root/libhb/internal.h
Commit message (Collapse)AuthorAgeFilesLines
* Misc. typosluz.paz2018-02-201-2/+2
| | | Found via `codespell -q 3 --skip="./gtk/po`
* Update copyright dates to 2018.Bradley Sepos2018-01-011-1/+1
|
* Auto-rotate video that has rotation tagJohn Stebbins2017-11-091-0/+1
|
* tx3g: make font size scale with video heightJohn Stebbins2017-11-031-3/+3
| | | Fixes https://forum.handbrake.fr/viewtopic.php?f=5&t=37034
* opencl: removit it (#777)John Stebbins2017-06-121-8/+0
| | | | It was only used for scaling, it fails far too often and is only faster on a limited selectoin of hardware.
* filter: add frame parallelizing filter wrapperJohn Stebbins2017-06-061-0/+1
| | | | | | | | | | | | This wrapper can be used to frame parallelize simple video filters. By simple, I mean there can be no temporal context that is shared from one frame to the next. Wrap unsharp and lapsharp filters. unsharp required a small rework to separate out temporary storage that is required when processing each frame. We now need to duplicate this storage for each thread. Closes #759.
* libhb: Add LapSharp sharpening filter.Bradley Sepos2017-05-301-0/+1
|
* libhb: Add Unsharp sharpening filter.Bradley Sepos2017-05-301-0/+1
| | | | Closes #525.
* text subs: use generic font family names (#614)John Stebbins2017-03-101-0/+9
| | | | | | | | | | | | * text subs: use generic font family names Allows the platform more flexibility in choosing the "best" font for the platform. * rendersub: make font configurable per platform Use Lucida Console for mono font on windows since it chooses ugly, difficult to read Courier New when using monospace family name.
* batch: Support --min-duration when doing batch scansJohn Stebbins2017-02-271-1/+2
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/501
* mux: shift timestamps by largest encoder delayJohn Stebbins2017-02-141-2/+6
| | | | | This prevents libav from adding an mp4 edit list entry that causes a properly functioning player to drop the first couple of audio frames.
* Update copyright dates to 2017.Bradley Sepos2017-01-011-1/+1
|
* qsv: rename av_qsv* to hb_qsv*John Stebbins2016-12-171-1/+1
|
* libhb: fix build with --enable-qsvTim Walker2016-12-171-1/+1
| | | | | | | | | | Convert qsv_livav.[ch] to be built within libhb. Convert other files to use qsv_libav.h in place of libavcodec/qsv.h Don't attempt to build libav with QSV support (not available in unpatched release/11 branch). QSV-accelerated decoding is broken, so disable it for the time being.
* libhb: rename some masks to better reflect their purpose.Tim Walker2016-09-171-2/+2
|
* libhb: add dedicated buffer flags to indicate whether an encoded frame is a ↵Tim Walker2016-09-171-0/+2
| | | | | | | key frame or a reference frame. HB_FRAME_KEY and REF are in fact masks, not flags, and actually conflict with some PIC_FLAG_* values.
* internal: reorder PIC_FLAG_* elements by ascending value.Tim Walker2016-09-171-3/+3
| | | | Makes it easier to avoid adding elements with confilcting values.
* sync: correct timestamp discontinuities in sync instead of reader (#192)John Stebbins2016-05-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* sync: fix merging of multiple SSA to tx3gJohn Stebbins2016-05-171-0/+1
| | | | | | When more than 2 subtitles overlapped in time, they were not merged properly and could result in cases where the subtitle time went backwards
* libhb: remove unused hb_buffer_t sequence numberJohn Stebbins2016-05-171-13/+0
|
* libhb: send initial chapter through pipelineJohn Stebbins2016-05-171-0/+19
| | | | | Eliminate the need for everyone to assume that the first chapter starts at the first frame.
* remove dxva hw decode (#189)John Stebbins2016-05-171-8/+0
| | | | | | | | | * remove dxva hw decode It provides practically no speed increase even on a slow CPU and results in a speed decrease on fast CPUs. And the code is exceptionally fugly. * cli: remove USE_HWD
* mux: eliminate 2048 byte size limit of SSA subtitlesJohn Stebbins2016-05-081-2/+2
|
* libhb: reorder buffer type enum so uninitialized type is OTHER_BUFJohn Stebbins2016-03-231-1/+1
|
* Remove the CLI / LibHB Update Checker. It's been broken since we switched to ↵sr552016-03-121-2/+1
| | | | HTTPS and it's terrible code.
* decomb: split comb detection out into it's own filterJohn Stebbins2016-03-111-0/+1
|
* deinterlace: add conditional deinterlacing of interlaced framesJohn Stebbins2016-02-151-0/+5
| | | | | | | | | Only deinterlace frames that are marked as interlaced when mode HB_YADIF_AUTO is set in the filter settings. Currently, this would cause no frames to be deinterlaced since all frames are marked non-interlaced. This option will become useful in a subsequent patch that splits comb detection into it's own filter.
* libhb: Add libavfilter support and pad filterJohn Stebbins2016-01-211-4/+8
| | | | | | | | | | | | | | 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-2/+9
| | | | | | | | | | | 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
|
* libhb: repair split packets in readerJohn Stebbins2015-11-101-0/+1
| | | | | | | | We split PES packets when there is a PCR change in the middle of the packet. This works fine for audio and video where the decoder parses the ES to find frame boundaries. But it does not work for some decoders such as PGS subtitles. So mark split buffers and reassemble them in reader after processing the PCR change.
* libhb: make muxer, sync, and reader behave like other work objectsJohn Stebbins2015-11-091-2/+5
| | | | | | | | | | | | | simplify job initialization sequence, clean up code, and document dependencies in the sequence better. Make hb_add set job->sequence_id. It is no longer necessary for the frontend to do this. If the frontend needs the sequence_id, it is returned by hb_add(). Clean up use of interjob. do_job() now uses sequence_id to detect when a new sequence of related jobs is running and automatically clears interjob.
* libhb: don't use deprecated AVPictureJohn Stebbins2015-10-291-0/+3
| | | | | libav just deprecated AVPicture and all av_picture_*/avpicture_* functions.
* grayscale: make it a real filterJohn Stebbins2015-10-141-0/+1
| | | | | It only worked properly with the x264 encoder. Now it works with all encoders.
* libhb: add hb_buffer_listJohn Stebbins2015-09-241-4/+4
| | | | | This brings together several independent implementations of a simple buffer list manager.
* rendersub: handle mismatched video and subtitle dimensionsJohn Stebbins2015-09-241-0/+2
| | | | | The video frame subtitles are meant to be rendered to may not match the actual video we are encoding. So scale to match as needed.
* libhb: remove unused hb_buffer_t.subJohn Stebbins2015-09-041-13/+0
|
* libhb: detect read errors and propagatejstebbins2015-06-291-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7332 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Use a buffer flat to indicate EOFjstebbins2015-05-011-13/+14
| | | | | | | | | | | | ... 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
* demuxmpeg: Don't drop frames with bad timestampsjstebbins2015-04-221-2/+0
| | | | | | Just invalidate the timestamps and let the decoders interpolate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7121 b64f7644-9d1e-0410-96f1-a4d463321fa5
* stream: Improve transport stream PCR handlingjstebbins2015-04-221-1/+3
| | | | | | | | When a new PCR is seen, emit all currently cached data. This prevents data that was referenced to the previous PCR from being associated with the new PCR. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7120 b64f7644-9d1e-0410-96f1-a4d463321fa5
* sync: fix frame p-to-p extra audio after end framejstebbins2015-04-221-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7119 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Eliminate global variable hb_gui_use_hwd_flagjstebbins2015-03-291-7/+16
| | | | | | | | | | | | This global was shared between the CLI and libhb and used as a back door to force scan and encode passes to use the same ffmpeg context for hardware decoding. Aside from the fact that this context sharing should not be necessary and needs fixing, this information belongs in the hb_handle_t that is shared between the scan and the encode. So put it there and make sure the hb_handle_t get propagated to where the flag is needed. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7028 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: automatically scan title when processing json jobsjstebbins2015-03-071-0/+1
| | | | | | | | | | | | | | | Simplifies the WinGui. This also changes how jobs are processed. Creating the sub-jobs for multiple passes is delayed until after scanning and immediately before running the job. Working status has also changed. Sub-job passes are identified in status with an ID that allows the frontend to definitively identify what pass is in progress. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6976 b64f7644-9d1e-0410-96f1-a4d463321fa5
* mux: fix chapter timestamps, factor in video encoder delayjstebbins2015-02-041-1/+1
| | | | | | | | libav does not fix chapter timestamps for us, so we must do this until I can figure out a good fix to libav. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6871 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
* libhb: add hb_image_init to create blank imagesjstebbins2014-12-191-0/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6613 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: thread nlmeans filterjstebbins2014-09-091-34/+37
| | | | | | | Scales well with number of CPUs, so is 4x faster on quad cores. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6397 b64f7644-9d1e-0410-96f1-a4d463321fa5
* build: remove mp4v2 and libmkv dependenciesjstebbins2014-08-181-5/+0
| | | | | | | ...and enable x265 by default git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6309 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add new function for retrieving previewsjstebbins2014-07-291-1/+2
| | | | | | | | | | | | | | | | 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