summaryrefslogtreecommitdiffstats
path: root/libhb/scan.c
Commit message (Collapse)AuthorAgeFilesLines
* scan: fix crash due to last commitJohn Stebbins2018-05-301-1/+2
| | | | check codec_name and profile_name for NULL before strstr search.
* scan: rationalize ffmpeg codec/profile namesJohn Stebbins2018-05-301-45/+66
| | | | | | | | | ffmpeg is inconsistent in the format of returned profile names. Sometimes the profile name includes the codec name and sometimes it does not. So search for the codec name in the profile name and add codec name if it's not there. Ugh! Fixes https://github.com/HandBrake/HandBrake/issues/1375
* Update copyright dates to 2018.Bradley Sepos2018-01-011-1/+1
|
* scan: don't abort on empty buffersJohn Stebbins2017-11-221-4/+4
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/1017
* CLI: add option to log version, title, and progress in jsonJohn Stebbins2017-11-061-12/+16
| | | This is useful for scripts and other frontends that need to parse CLI output.
* scan: fix vobsub & pgs width/height for some stream typesJohn Stebbins2017-06-261-12/+12
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/798
* 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.
* scan: improve support for very short source video streamsJohn Stebbins2017-06-091-55/+43
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/779
* scan: fix very slow scanning for some filesJohn Stebbins2017-04-121-4/+4
| | | | | | | 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.
* 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
* batch: Support --min-duration when doing batch scansJohn Stebbins2017-02-271-2/+3
| | | | Fixes https://github.com/HandBrake/HandBrake/issues/501
* opencl: Workaround broken drivers that crash when you call clGetPlatformIDs ↵Scott2017-01-151-2/+6
| | | | with valid inputs. #496
* Update copyright dates to 2017.Bradley Sepos2017-01-011-1/+1
|
* fix memory leaksJohn Stebbins2016-12-171-1/+1
| | | | | | The series of commits starting with Tim's "libav: remove our custom QSV wrapper." Closes #46, closes #276, and closes #416.
* libhb: fix small leaksJohn Stebbins2016-12-141-0/+6
| | | | fixes various context leaks in error conditions
* remove dxva hw decode (#189)John Stebbins2016-05-171-3/+2
| | | | | | | | | * 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
* scan: quit looking for audio if a preview scan reaches EOFJohn Stebbins2016-03-231-44/+58
| | | | | Also, verify that vid_info geometry matches vid_buf geometry And some cosmetic changes
* scan: check if the video decoder was properly initialized before decoding ↵Damiano Galassi2016-03-011-1/+10
| | | | the preview.
* Update copyright dates to 2016.Bradley Sepos2016-01-011-1/+1
|
* scan: increase sensitivity to video flagsJohn Stebbins2015-11-091-26/+34
| | | | | | | We were mis-detecting framerate often because we did not see enough samples of various video flags while scanning previews. So move sampling of these flags into the inner video decode loop and collect more samples.
* libhb: make muxer, sync, and reader behave like other work objectsJohn Stebbins2015-11-091-1/+1
| | | | | | | | | | | | | 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.
* scan: fix rescan avoidance logicJohn Stebbins2015-09-291-0/+1
| | | | We need to rescan when the number of previews changes.
* libhb: add hb_buffer_listJohn Stebbins2015-09-241-27/+20
| | | | | This brings together several independent implementations of a simple buffer list manager.
* libhb: detect read errors and propagatejstebbins2015-06-291-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7332 b64f7644-9d1e-0410-96f1-a4d463321fa5
* DXVA2: cleanup decode support checks.Rodeo2015-06-231-0/+8
| | | | | | | This should fix https://forum.handbrake.fr/viewtopic.php?f=11&t=32520 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7310 b64f7644-9d1e-0410-96f1-a4d463321fa5
* scan: skip scan if title has already been scannedjstebbins2015-05-261-0/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7226 b64f7644-9d1e-0410-96f1-a4d463321fa5
* scan: increase scan size thresh to accomodate raw 4K avijstebbins2015-05-121-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@7170 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Eliminate global variable hb_gui_use_hwd_flagjstebbins2015-03-291-13/+13
| | | | | | | | | | | | 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-2/+21
| | | | | | | | | | | | | | | 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
* New audio output options.Rodeo2015-02-151-0/+13
| | | | | | | | | Dolby Digital Plus (E-AC-3), Dolby TrueHD and FLAC can now be passed through without re-encoding. They aren't covered by Auto Passthru yet, however. In addition, encoding to E-AC-3 is now possible. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6908 b64f7644-9d1e-0410-96f1-a4d463321fa5
* scan: work around libav mpeg2 dummy first framejstebbins2015-02-151-1/+11
| | | | | | | | | | libav generates a dummy first frame after any seek for some mpeg2 streams. This results in black preview frames and invalid autocrop values. So always decode at least 2 frames before using the frame for preview. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6906 b64f7644-9d1e-0410-96f1-a4d463321fa5
* scan: improve preview generation for short videos that have no IDRsjstebbins2015-02-021-1/+14
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6862 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: remove dead codejstebbins2014-12-231-3/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6646 b64f7644-9d1e-0410-96f1-a4d463321fa5
* json: add json APIsjstebbins2014-12-161-49/+57
| | | | | | | | | | 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
* scan: potential fix for missing audio tracksjstebbins2014-12-121-2/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6597 b64f7644-9d1e-0410-96f1-a4d463321fa5
* scan: eliminate duplicate activity log stream infojstebbins2014-11-171-2/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6525 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: improve CC detectionjstebbins2014-10-281-7/+15
| | | | | | | | | We are failing to detect CCs in some sources because the CC data is not present on every frame. Makes scan always decode a few extra frames to give the decode a better chance of seeing the CC data. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6471 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: improve preview generateion when there are no IDRsjstebbins2014-10-021-0/+17
| | | | | | | | | | Puts the decoder into a mode that returns *all* frames. I.e. it won't just scan to the end of the file looking for an IDR. Then we decode multiple frames (up to 100) searching for an I frame. This way, the reconstructed frame we use for a preview is more likely to be complete. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6430 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix scanning of video that is a single GOPjstebbins2014-09-091-14/+47
| | | | | | | | | | With this type of stream, scan only successfully decodes 1 frame. Eliminating the flush after seek allows decoding more frames. Note that there is a side effect of allowing some junk frames to be decoded, so we only skip the flush if normal scanning finds only 1 frame. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6396 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Fix decoding avi with palettejstebbins2014-05-291-7/+14
| | | | | | | | | ... 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 fps calculation when number of previews is very smalljstebbins2014-03-161-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6116 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: remove a52decjstebbins2014-02-201-1/+0
| | | | | | | replace it with libavcodec ac3 decoder git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6049 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: support AV_FRAME_DATA_MATRIXENCODING side data.Rodeo2014-01-261-5/+35
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6000 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: set audio description in LookForAudio (scan.c).Rodeo2014-01-251-1/+110
| | | | | | | | | All audio tracks go through it since SVN revision 5424. This is where we have the most information about each audio track. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5996 b64f7644-9d1e-0410-96f1-a4d463321fa5
* remove contrib mpeg2decjstebbins2014-01-131-7/+4
| | | | | | | | We no longer need mpeg2dec. libav now has all the features we need for mpeg2 decoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5966 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix reporting of buffer allocation statistics during scanjstebbins2013-11-181-2/+1
| | | | | | | | Put hb_buffer_pool_free() in the right position after all buffers allocated during scan are free. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5895 b64f7644-9d1e-0410-96f1-a4d463321fa5
* OpenCL: use the new library loading architecture for all OpenCL code.Rodeo2013-11-081-0/+4
| | | | | | | | | | | An OpenCL SDK is no longer needed to build OpenCL support. Note: as a result, the --enable-opencl configure option is removed. Also, libOpenCL is no longer needed to run the application (it is still necessary to use OpenCL features, of course). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5886 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Plug some leaks and clean up the buffer pool code a little.jstebbins2013-10-231-0/+2
| | | | | | | | | | | Filters were leaking buffers when a job is cancelled. decavcodec could leak when job cancelled. decavcodec leaked audio extradata in BSInfo encavcodec and encavcodecaudio leaked AVCodecContext sync leaked subtitle_sanitizer_t data git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5853 b64f7644-9d1e-0410-96f1-a4d463321fa5