summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* Add DTS-HD passthru \o/jstebbins2011-06-1410-99/+133
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4055 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix problem with processing audio gaps in dts streamsjstebbins2011-06-121-1/+1
| | | | | | | | incorrect start time was placed on the outgoing dts packet when a gap was detected. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4053 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: generalize channel remapping between decoders and encodersjstebbins2011-06-1212-91/+71
| | | | | | | | Decoders set the channel map of their output in hb_audio_config_t. Encoders use this information to remap while encoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4052 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: clean up AVCodecContext initializationsjstebbins2011-06-103-10/+50
| | | | | | | | also fixes warning message generated by libav when initializing "silence" sample about channel layout setting. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4038 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: disable threaded ffmpeg decoding for scanjstebbins2011-06-103-3/+8
| | | | | | | | There is a bug in ffmpeg that causes a crash if you call avcodec_open and avcodec_close repeatedly on the same AVCodecContext. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4037 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Enable multi-threaded decode in ffmpegjstebbins2011-06-089-13/+27
| | | | | | | | Enable both slice and frame based mutli-threaded decode in ffmpeg. Uses cpu_count/2 + 1 threads. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4034 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add ffaac encode supportjstebbins2011-06-081-1/+2
| | | | | | | | Adds "AAC (ffmpeg)" option to lingui and macui, "ffaac" option to cli. Does not yet remove faac. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4031 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix up usage of deprecated libav symbols and clean up patch fuzzjstebbins2011-06-073-11/+11
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4030 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add support for libav aac encoder (libhb only)jstebbins2011-06-078-35/+118
| | | | | | | | | This generalizes the ac3 encoder to make it easy to add support for any audio encoder that libav supports. Since ffaac is not quite ready, the cli and gui does not expose ffaac yet. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4029 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bump FFmpeg from git-0b32da9 to git-v0.7b2-406-g7b20d35 (from Libav)jstebbins2011-06-072-1/+7
| | | | | | | | | | | | | | | | Highlights: - Sources with more than 20 streams (video, audio and subtitles combined) are now supported - Adds decoding support for 10-bit H.264 - Adds frame-based threading for H.264 and VP8 Not yet enabled in HB. See experimental patch on RB to enable. - Quality tweaks for the AC3 encoder - AAC encoder improvements Not yet enabled in HB. See experimental patch on RB to enable. - Miscellaneous other fixes and improvements git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4028 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: Sort BD titles by playlist idjstebbins2011-06-071-6/+29
| | | | | | | | | This makes the logs of different rips more consistent. Previously, the order of titles was determined by the order the mpls files were written in the PLAYLIST directory which could vary from rip to rip. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4027 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix crash when x264 fails to initializejstebbins2011-06-062-1/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4025 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a problem with filtering and picking correct BD titlejstebbins2011-06-051-0/+13
| | | | | | | | | Titles that are the same except for number of chapters were being filtered out of the title list. So sometimes you would get a BD title that didn't seem to have any chapters. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4024 b64f7644-9d1e-0410-96f1-a4d463321fa5
* LinGui: Add support for naming audio tracks.jstebbins2011-06-031-0/+4
| | | | | | | | Also fix hb_audio_add. It was not copying the audio name. And fix audio track name parsing in the CLI. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4020 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove the depreciated hb_calc_bitrate methodsr552011-05-212-117/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3987 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Macgui: libhb, MacGUI: reflect the fact that DRC only applies to ↵dynaflash2011-05-191-1/+1
| | | | | | | | | non-passthru AC3 sources - As per https://reviews.handbrake.fr/r/74/ -Patch by Rodeo, Thanks. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3983 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix some problems with rgb2yuv and yuv2rgbjstebbins2011-05-172-10/+10
| | | | | | | | | | 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
* Remove old muxers that are no longer used by HBsr552011-04-302-1048/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3971 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: don't use deprecated elements of the FFmpeg/Libav APIjstebbins2011-04-285-39/+33
| | | | | | | | | | | | | HandBrake uses many attributes of the FFmpeg API that are were deprecated when we did the last bump. Many of them no longer exist in current FFmpeg/Libav git, or are going to be removed soon. Replaces them with non-deprecated attributes that already exist in the build we currently use. Thanks to Rodeo for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3964 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a crash that can happen due to corrupt mpeg2 datajstebbins2011-04-271-0/+9
| | | | | | | | | The mpe2dec can return nonsense values for width and height that make sws_getContext fail. So check the context return value and just drop the buffer if it fails. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3963 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a problem with overlapping vobsubsjstebbins2011-04-272-13/+29
| | | | | | | | | | | Since we now allow subtitles that overlap in time, it is no longer appropriate to arbitrarily set the duration to 3 seconds when vobsubs don't have an explicit stop time. This causes them to overlap on the display. So now, we set the stop time for such vobsubs to -1. Then in sync adjust the stop time to the start of the next vobsub when it is seen. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3961 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make order of audio tracks found in PS streams more predictablejstebbins2011-04-253-1/+45
| | | | | | | | | Since PS streams don't have a directory of streams, we find them by scanning the PES headers for stream types. We were adding them in the order found which is pretty random. This sorts audios by substream id. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3958 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a problem when encoding the same source audio track twice from BD sourcesjstebbins2011-04-251-5/+23
| | | | | | | | | The pid and substream were being added to the TS stream list twice which caused 2 copies of each packet to be returned to reader. This caused sync to drop every second packet with "time went backwards" log message. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3957 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix stall due due to propagation of incorrect audio timestampjstebbins2011-04-241-0/+2
| | | | | | | | Was passing AV_NOPTS_VALUE that is generated by libav. Needed to translate to -1 which is what we use to designate invalid timestamps. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3955 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Change scale factor for timestamp offset in vobsub commandsjstebbins2011-04-241-4/+4
| | | | | | | | Testing shows that this should be 1024 instead of 900. Thanks to Rodeo for validation and patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3954 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add support for TrueHD and DTS-HD from BD sourcesjstebbins2011-04-2212-801/+1189
| | | | | | | | | | | | | | TrueHD and DTS-HD now show up in the audio list along side their AC-3 and DTS counterparts. Note that currently the DTS-HD decoder we are using (ffmpeg) discards the HD portion of the stream and onle decodes the DTS core portion. So there is no advantage yet to using the DTS-HD stream. In the future I would like to add DTS-HD passthru support and hopefully ffmpeg will improve their DTS-HD decoder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3950 b64f7644-9d1e-0410-96f1-a4d463321fa5
* remove unused vfr member of hb_job_tjstebbins2011-04-211-1/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3947 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove redundant code.jstebbins2011-04-201-10/+2
| | | | | | | | Should have been removed here https://trac.handbrake.fr/changeset/2917 Thanks to rodeo for spotting this. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3944 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HE-AAC support for the OSX port. Thanks go to amarcus, ritsuka and rodeo.sr552011-04-189-29/+195
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3937 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix int overflow that can happen when computing PARjstebbins2011-04-163-2/+64
| | | | | | | | | | If the source has large non-reduced PAR values, our computed value was overflowing an int. Compute it in an int64_t then reduce it. Also, keep num and den below 65535. Larger values just aren't really significant and will cause more overflow issues. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3931 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a problem with BD audio detection.jstebbins2011-04-111-11/+56
| | | | | | | | | | | | | | Each clip of a BD are allowed to have different audios if the clip does not have a seamless connection to the previous clip. Most titles are a series of seamless clips that all have the exact same audio. But I found some that have a final non-seamless clip that has completely different audios and broke the old algorithm. New algorithm, look at each clip and count the number of other clips have the same audio. Use the clip that has the most matches. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3918 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a deadlock that can happen with p-to-p encodingjstebbins2011-04-102-2/+39
| | | | | | | | | | | | | | | | | | With p-to-p, the audio sync thread waits for the video sync thread to reach the designated start point. There is a possibility that the video decoder will drop so many frames that the audio sync fifo fills before any frames reach the video sync thread. When this happens, drop some audio to unplug the pipeline. Also, to make this less likely to happen, start sending data to the video decoder 2 seconds before the actual desired start point. This will allow the decoder to find an initial i-frame before the audio stalls since the audio sync thread drops any audio that is before the designated start point. A side effect of this is our start time now more accurate since the decoder is only dropping frames before the start point instead of after. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3917 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Handle boundaries between blueray clips better.jstebbins2011-04-083-0/+14
| | | | | | | | | | These boundaries are always discontinuities. But sometimes we were not detecting them as such and would drop frames. So set a flag in the buffer when libbluray tells us a new clip is starting and use that to trigger computation of a new scr offset. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3912 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Eliminate incompatible pointer type warnings for sws_scalejstebbins2011-04-084-5/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3910 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use bibiliographic form of ISO-639-2 lang codes in muxmkvjstebbins2011-04-081-4/+10
| | | | | | | | | | The Mkvtoolnix developer claims that MKV only allows the bibliographic form of ISO-639-2 lang codes: https://www.bunkus.org/bugzilla/show_bug.cgi?id=598 http://matroska.org/technical/specs/index.html#languages seems to confirm this. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3909 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Change internal audio representation rangejstebbins2011-04-0813-67/+70
| | | | | | | | | | | ...from float [-32768...32767] to float [-1.0...1.0] Using the range [-1.0..1.0] requires fewer translations of the range for our various encoders and decoders. This also gets rid of a hacky translation from float to int to float in decavcodec audio decoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3908 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix dts downmix when the output encoder is lamejstebbins2011-04-071-2/+0
| | | | | | | | | libdca downmix is broken if you ask for dolby and DCA_ADJUST_LEVEL. Since we fixed the clipping problem that DCA_ADJUST_LEVEL is used for with changeset 3294, we can just disable this. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3907 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add audio gain adjustment to libhb and CLIjstebbins2011-04-054-41/+81
| | | | | | | | New CLI option is --gain <float>. Value is measured in dB. Negative values are quieter, positive values are louder. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3902 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix the volume output level of our dts decoderjstebbins2011-04-041-1/+1
| | | | | | | | | | dcadec returns samples that have values in the range -1.0 to 1.0. We need these to be converted to the range -32768 to 32767. For some reason, decdca was scaling by 16768 instead of 32767. This has been like this since dts support was initially added by maurj. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3900 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make logging of audio and subtitle id's more consistantjstebbins2011-04-025-13/+13
| | | | | | | | | | | | 1) whenever we log audio->id or subtitle->id using hex formatting, precede the hex with 0x (which was already done in some places but not others) 2) format audio->id as hex instead of decimal in sync.c (makes it much easier to see which track "went backwards" or had silence added to it, checking the job configuration logged by work.c) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3898 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Shorten instead of dropping overlapping subtitles in mp4jstebbins2011-04-021-0/+10
| | | | | | | | If the non-overlaping remainder is greater than 0.5 seconds, shorten the subtitle instead of completely dropping it. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3897 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Flush ffmpeg codec buffers after every seek.jstebbins2011-04-021-1/+21
| | | | | | | | | | According to several e-mails I've read on ffmpeg-devel, avcodec_flush_buffers should be called after any seek. It appears this is even more critical to do when using frame based multi-threading. I don't see any immediate difference in functionality by adding this, but it may prevent surprises in the future. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3896 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix garbled previews from BD h.264 sourcesjstebbins2011-04-024-5/+9
| | | | | | | | | | | Forome reason, frames that are tagged as recovery points in many BD h.264 streams do not result in complete frames when decoded. Pushing 2 extra frames through the decoder seems to always fix this. This patch extends something I was already doing when generating previews from a BD structure. This just applies the same logic to ffmpeg streams that have h.264 video. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3895 b64f7644-9d1e-0410-96f1-a4d463321fa5
* get rid of an superfluous test and decrimentjstebbins2011-03-311-10/+7
| | | | | | | just an old thinko that needed correcting. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3894 b64f7644-9d1e-0410-96f1-a4d463321fa5
* True SSA passthru for MKV.jstebbins2011-03-312-12/+125
| | | | | | | | | 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
* MP4 muxer ignores all but the first of overlapping UTF-8 subtitles.davidfstr2011-03-301-51/+62
| | | | | | | | | This is necessary because MP4 does not support overlapping subtitles. Attempting to use overlapping subtitles causes the display of subsequent subtitles to be delayed incorrectly. Subsequent patches may merge UTF-8 subtitles (upstream) so that this case does not occur. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3890 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix chapter passthru problems with some files.jstebbins2011-03-291-0/+1
| | | | | | | | | | | | If the video stream is not the first track in the file, chapters were lost. During scan, we identify which track is video and stash this in title. While reading, when a chapter is found we want to tag the next video buffer. But the video track id stored in the title was not being applied when opening the file for reading, so the chapter mark always went on track id 0. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3889 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix problem with qt7 playback of mpeg4 videojstebbins2011-03-281-0/+7
| | | | | | | | | The reference frames were not being tagged correctly during muxing which really screwes up qt7 but appears to have little effect on qtx or other players. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3887 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Simplify a lot of subtitle handling code.jstebbins2011-03-276-499/+110
| | | | | | | 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
* Remove legacy % to RF mapping.jstebbins2011-03-215-42/+8
| | | | | | | | | | Although the % option has been gone for a while in the cli and gui's, there were some mappings happening in libhb and for preset imports. This removes the last vestages of % quality mapping. Thanks to Rodeo for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3857 b64f7644-9d1e-0410-96f1-a4d463321fa5