summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* scan: fix very slow scanning for some filesJohn Stebbins2017-04-123-4/+6
| | | | | | | The threshold in bytes for when to give up trying to decode a frame was too big for a lot of streams. It was made large to accomodate 4K raw video. Instead of counting bytes, count frames fed to the decoder. This is more consistant regardless of video resolution and codec.
* preset: fix sanitizing audio settings when samplerate != AutoJohn Stebbins2017-04-121-2/+7
| | | | | The samplerate was incorrectly copied to the job as a string instead of an int which caused invalid sanitizing of audio settings.
* scan: enable HBTF_NO_IDR when not enough previews foundJohn Stebbins2017-04-111-0/+4
| | | | | | | | Setting this flag signals to libav to not wait for IDR or recovery points before returning frames to us. Some videos have neither IDRs or recovery points, so this fixes transcoding such video. Fixes https://github.com/HandBrake/HandBrake/issues/456
* Fix raw video timestampsJohn Stebbins2017-04-093-0/+7
| | | | | | Raw video has no timestamps. But we drop frames in sync that have no timestamps. So detect raw video and extrapolate timestamps from framerate.
* qsv: hevc10 fix for correct declaration of data/zero bitsmaxd2017-04-071-1/+1
|
* batch: fix crash when a stream scan failsJohn Stebbins2017-03-281-1/+1
|
* libhb: initialize sleep prevention reasonForActivity CFStringRef inside a ↵Damiano Galassi2017-03-151-6/+4
| | | | function, fix build with icc mac compiler. Patch by jwardnh.
* qsv: fixing variable re-use (#627)maximd332017-03-141-5/+6
| | | | Closes #625.
* opencl: cleaning more leaks (#628)maximd332017-03-141-62/+95
| | | | opencl: cleaning more leaks
* Remove Fontconfig on Windows (#610)Oleg Oshmyan2017-03-121-2/+6
| | | | | | | | | | | * Remove Fontconfig on Windows Let libass use its DirectWrite font provider backend instead of Fontconfig. This eliminates Fontconfig's font cache generation delay that occurred at the start of an encode after a system font was (un)installed or when HandBrake was installed and used to burn text subtitles for the first time. * Remove LibHB's dependency on Fontconfig when it's not used
* subtitles: simplify and shorten subtitle descriptions (#591)John Stebbins2017-03-107-81/+107
| | | | | | | | | | | | | | | | | | * subtitles: simplify and shorten subtitle descriptions Generally, it eliminates parens to make things more readable. I.e. it turns this: English (Closed Caption)(Wide Screen)(Bitmap)(VOBSUB) Into this: English, Closed Caption [Wide Screen, VOBSUB] * Revise punctuation per BradleyS request * fix subtitle description formatting * incorporate suggestions from PR
* text subs: use generic font family names (#614)John Stebbins2017-03-106-6/+15
| | | | | | | | | | | | * 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.
* Fix various spelling mistakes (#613)Sebastian Ramacher2017-03-101-1/+1
| | | | | | | | | | * Fix spelling of 'source' * Fix spelling of 'specify' * Fix spelling of 'internal' * Fix spelling of 'quitting'
* opencl: fixing more resource leaksmaxd2017-03-101-15/+24
|
* opencl: Fix resource leak.maxd2017-03-081-0/+2
| | | | Closes #617 and closes #618.
* qsv: only main10 profile supported for HEVC 10b encodemaxd2017-03-052-6/+9
|
* qsv: added HEVC 10-bit as encoder, should help for GUI integrationmaxd2017-03-055-6/+27
|
* qsv: adding hevc10 support starting from KBL platformmaxd2017-03-052-14/+54
|
* qsv: adding hevc decode supportmaxd2017-03-041-0/+8
|
* sync: fix small video dejitter errorJohn Stebbins2017-03-031-0/+5
| | | | | | | | | | | | | This very small error snowballs into a crash in x264 :-p If the amount of jitter on the first frame in the queue was small (about 1 tick) then jitter would not be removed from that frame. This extra tick of jitter can appear on different frames depending on when frame arrives and how much has been queued. This very small amount of randomness lead to problems in the VFR filter. A frame duration difference as small as 1 tick can lead to an extra frame getting duplicated when doing CFR. When doing 2 pass encoding, this extra frame causes x264 to crash at the end of the 2nd pass.
* work: set orig_vrate correctlyJohn Stebbins2017-02-281-1/+3
| | | | | | | | | It was getting set to the title's rate instead of the rate that the filter chain sets. An incorrect vrate causes x265 rate control breakage. Fixes https://github.com/HandBrake/HandBrake/issues/600
* batch: Support --min-duration when doing batch scansJohn Stebbins2017-02-273-4/+11
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/501
* 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
* encca_aac: fix a small leakDamiano Galassi2017-02-241-0/+1
|
* encca_aac: use the libhb list helper functions to append buffersDamiano Galassi2017-02-241-34/+20
|
* encca_aac: no need to pad manually the remaining dataDamiano Galassi2017-02-241-12/+0
|
* encca_aac: flush all the remaining packets from encodersDamiano Galassi2017-02-241-17/+30
|
* audio_resample: fix mapping of mono to single channel (#593)John Stebbins2017-02-241-0/+27
| | | | | | | | | | | | | | | | | * audio_resample: fix mapping of mono to single channel libav's mixer code can't map single channel layouts to other single channel layouts. And we were asking it to map e.g. front left to front center because out MONO mixdown == libav front center. So when we request MONO and the source is any single channel, change our output layout to match the input. fixes https://forum.handbrake.fr/viewtopic.php?f=12&t=36016&sid=c5993fa7375792a940152c8adda19a54 * Incorporate Rodeo's suggestions * fix grammar
* encx265: fix compiler warningJohn Stebbins2017-02-221-1/+0
|
* encx265: fix 2 pass encoding when framerate is wrongJohn Stebbins2017-02-221-3/+2
| | | | | | x265 expects the framerate specified to be the same for both passes. So we must set the same value even when we compute that the actual framerate differs from what the file's header says.
* dvd: add widescreen/letterbox/pan&scan/4:3 to vobsub descriptionJohn Stebbins2017-02-213-10/+55
|
* dvd: add widescreen vobsubs when letterbox is permittedJohn Stebbins2017-02-212-154/+228
| | | | | | We were only adding subtitle tracks specifically designed for letterbox when letterbox is permitted. We should also add the subtitle tracks that are specifically designed for wide screen.
* 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
* decavcodec: drop initial_padding audio samplesJohn Stebbins2017-02-213-18/+61
| | | | | | These are samples that were not in the original source and were added by the encoder. To get a faithful reproduction of the source, they must be dropped.
* encavcodecaudio: set encoder time_base to 90khzJohn Stebbins2017-02-211-7/+9
| | | | | Setting the time_base to 90khz reduces rounding errors when converting back and forth from the default which was sample_rate.
* encavcodecaudio: fix dropping of final input packetJohn Stebbins2017-02-211-1/+1
| | | | | When exactly input_samples were left in the input buffer, we were dropping them when they could be encoded.
* opencl: better release of OpenCL context to avoid more leaksmaxd2017-02-202-0/+10
|
* opencl: fixing leaks for clBuffersmaxd2017-02-201-0/+5
|
* encca_aac: factory encoder delay into timestampsJohn Stebbins2017-02-201-2/+15
| | | | | And set audio init_delay so that we can record the encoder delay in the output container.
* preset: fix application of anamorphic "Off"John Stebbins2017-02-191-1/+1
|
* sync: fix sync problem with delayed streamsJohn Stebbins2017-02-181-5/+5
| | | | | | If a stream is delayed by a large amount and the first timestamp from the stream is AV_NOPTS_VALUE, sync assumed a 0 timestamp which caused loss of sync. Drop the buffer instead.
* decavcodec: fix commentJohn Stebbins2017-02-181-1/+1
|
* qsv: fix init_delay referenceJohn Stebbins2017-02-151-1/+1
| | | | Missed changing this when moving init_delay out of esconfig union
* muxavformat: Inform muxer of encoder delayJohn Stebbins2017-02-151-0/+2
| | | | | | | initial_padding is used to inform libav muxers of initial encoder delay duration. When set for mkv it can be used to remove the silence samples during playback since the delay value gets stored in the mkv CodecDelay element.
* mux: revert shift timestamps by largest encoder delayJohn Stebbins2017-02-141-35/+0
| | | | | | | | Ugh! I need a brain transplant! This would have cause a properly functioning player to insert silence at the start of playback that wasn't in the original source. reverts 5429a92c51682240acbbe7b150d314d993d7d3a0
* mux: shift timestamps by largest encoder delayJohn Stebbins2017-02-148-13/+49
| | | | | This prevents libav from adding an mp4 edit list entry that causes a properly functioning player to drop the first couple of audio frames.
* libhb: fix Bob + CFR Same As Source + 2 Pass encodeJohn Stebbins2017-02-091-4/+5
| | | | | | | | The bob filter predicts the resulting output framerate as 2 * input framerate. So during 2 pass encoding, we must adjust the framerate with the knows 1st pass values *after* any predictions made by filters. Fixes https://github.com/HandBrake/HandBrake/issues/556
* qsv: Allocate planes contiguously.maxd2017-02-021-6/+4
| | | | | | Better performance and less prone to crashing. Fixes #540 and closes #558.
* preset: fix behavior of AudioSecondaryEncoderModeJohn Stebbins2017-01-291-2/+2
| | | | | When true, this is meant to use the secondary encoder only for the first selected audio track. It was completely broken :(