summaryrefslogtreecommitdiffstats
path: root/libhb
Commit message (Collapse)AuthorAgeFilesLines
* Clean up CPU count detection.saintdev2009-03-111-54/+55
| | | | | | | | -No longer use 'grep' on linux to detect CPU count! -Use sysctls on OSX. -SunOS and CYGWIN are unmodified. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2254 b64f7644-9d1e-0410-96f1-a4d463321fa5
* BuildSystem: initial _skeleton_ asm support for libhb.konablend2009-03-102-3/+43
| | | | | | | | | - asm disposition is DISABLED. - it can only be enabled via a hidden configure option (--enable-asm) but will only be useful once asm code is checked-in. - this is checked-in early to not lose some internal configure enhancements made during asm build support impl. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2251 b64f7644-9d1e-0410-96f1-a4d463321fa5
* BuildSystem: general, configure and Xcode updates.konablend2009-03-083-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | *** NOTICE: This changeset requires a clean build directory. Please issue 'make xclean' inside build dir(s) after 'svn up'. This will help ensure there are no unexpected results. *** GENERAL: - renamed makevar PROJECT/ -> SRC/ for clarity. - renamed makevar PREFIX.install/ -> PREFIX/ for clarity. - split custom GNUmakefile overrides into defs/rules files. - inserted optional level of make customization at SRC/ level; see docs. - dropped HB.repo.wcversion (svnversion is no longer used). - corrected several 'rm' usages to use -f flag which avoids some build errors. - refreshed generated 00-Building.*.txt docs; work still in progress on the wiki front. *** CONFIGURE: - made configure more robust; configure may now be run outside of build directory! - adding log recording of configure activities. - improved readability of default options for configure - added: --force overwrite existing build config --src=DIR specify top-level source dir [.] --build=DIR specify build scratch/output dir [.] --prefix=DIR specify install dir for products [/Applications] - dropped --launch-force (replaced by --force) - dropped --launch-dir (replaced by --build) - dropped --launch-log *** XCODE: - renamed pbxproj definition EXTERNAL_PROJECT -> EXTERNAL_SRC for clarity. - fixed all configurations to default to EXTERNAL_JOBS=1 . - enabled Xcode internal parallelization (libhb, HandBrakeCLI and HandBrake benefit). - make now tickles Xcode build files to cause Info.plist regeneration and posting to HandBrake.app output; ie: svn up; click build and HandBrake.app's about panel will reflect the new repository rev. *** DARWIN: - added support to build universal binaries; see docs. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2242 b64f7644-9d1e-0410-96f1-a4d463321fa5
* reorder some calculations in hb_set_anamorphic_size so that the heightjstebbins2009-03-041-6/+12
| | | | | | | calculated after all adjustments have been made to the width. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2222 b64f7644-9d1e-0410-96f1-a4d463321fa5
* BuildSystem:konablend2009-03-031-0/+5
| | | | | | | | | - fixed ppc bug: scanning DVD does not pick up audio tracks - libdvdread headers require WORD_BIGENDIAN to be defined on BIGENDIAN systems - solution is to defined WORD_BIGENDIAN for libhb on ppc/ppc64 platforms git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2206 b64f7644-9d1e-0410-96f1-a4d463321fa5
* BuildSystem:konablend2009-03-031-0/+1
| | | | | | | | | | | | | - fixed OSX + Xcode to support parallel builds - enhanced OSX + Xcode to use proper pass-thru for all make targets - added global target --> install - added install: test.install - added install: gtk.install - updated pre-generated building guides (these will go away when wiki is updated) - updated xml2wiki script to spit out heading git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2205 b64f7644-9d1e-0410-96f1-a4d463321fa5
* BuildSystem:konablend2009-03-021-1/+8
| | | | | | | | | | | | | | | | - changed HandBrakeCLI to use project.h when showing version in hblog - changed macosx/Info.h.m4 to supply correct version; eg: MacGUI about-panel - HandBrakeCLI hblog now displays architecture; eg: Darwin i386 - HandBrake.app about-panel now displays architecture; eg: i386 - updated all versioning to reflect project policies: a. HB_PROJECT_VERSION now behave as old HB_VERSION b. HB_PROJECT_BUILD now behaves as old HB_BUILD c. dropped HB_PROJECT_VERSION_FORMAL as it is no longer referenced - renamed HOST.proc -> HOST.machine for clarity - renamed BUILD.proc -> BUILD.machine for clarity git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2192 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Re-enable libswscale accurate rounding on x86_64.saintdev2009-03-022-8/+2
| | | | | | The libswscale bug causing crashes was fixed a while ago. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2191 b64f7644-9d1e-0410-96f1-a4d463321fa5
* BuildSystem:konablend2009-03-021-0/+1
| | | | | | | - exposed HB_PROJECT_BUILD_ARCH to <hb.h> space. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2190 b64f7644-9d1e-0410-96f1-a4d463321fa5
* BuildSystem: conversion from jam-based to make-based system.konablend2009-03-0112-155/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KNOWN ISSUES: 1. OSX + Xcode builds do not support parallel builds; attempting to use them may cause unbounded number of jobs. However, disabling via configure --disable-xcode avoids the issue. 2. OSX ppc binary produces binary which has audio-scan problems. 3. OSX ppc64 binary has not been runtime tested. ADDED: 00-BuildUserGuide.txt contrib/*/module.* doc/ make/ libhb/module.* test/module.* macos/module.* gtk/module.* DROPPED: BUILD BuildContribDarwin.sh DownloadMacOsXContribBinaries.sh Jamfile Jamrules MacOsXContribBinariesVersion.txt Makefile Makefile.config jam libhb/Jamefile libhb/Makefile test/BUILDSHARED test/Makefile contrib/Jamfile contrib/Makefile contrib/patch-ffmpeg.patch contrib/patch-x264-idr.patch contrib/patch-x264-linux.patch RENAMED: contrib/*.patch -> contrib/MODULE/[AP]??-*.patch macosx/HandBrake.plist -> macosx/Info.plist MODIFIED: libhb/decavcodec.c Patched to use cleaner include "libavcodec/audioconvert". Second part to support this cleanup is ffmpeg A02-audioconvert.patch . MODIFIED: libhb/hb.c MODIFIED: libhb/hb.h MODIFIED: libhb/muxmkv.c MODIFIED: libhb/muxmp4.c MODIFIED: libhb/update.c Patched to use "project.h" for project metadata. Renamed HB_BUILD -> HB_PROJECT_BUILD. Renamed HB_VERSION -> HB_PROJECT_VERSION. MODIFIED: test/test.c: Patched HandBrakeCLI to support I/O on Mac OS X ZFS filesystems. Reference r1803 as similar patch for HandBrake.app . Unpatched behavior is crash/buserror when using ZFS. MODIFIED: macosx/Growl.framework/ Upgraded 0.7.6 (i386,ppc) -> 1.1.2 (i386,x86_64,ppc,ppc64). New architectures facilitate x86_64 and ppc64 builds. MODIFIED: macosx/HandBrake.xcodeproj/ Bumped compatibilty mode from 2.4 -> 3.1 . Dumped old configurations Deployment, Developer. Added configurations standard, sebug as replacements. Added standard.i386, standard.x86_64, standard.ppc, standard.ppc64 . for explicit architecture build. All configurations settings cleaned up and normalized. Build output directories adjusted to support new build system. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2180 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't truncate RF/QP values down to integers when displaying job config. ↵jbrjake2009-02-231-1/+1
| | | | | | Still needs to be restructured for encoders other than x264, but I wanted to get this minor change in now so I don't forget and because it won't break any patches to work.c. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2175 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allows direct setting of job->vquality from interfaces in the native QP ↵jbrjake2009-02-102-5/+21
| | | | | | scales used by XviD and Theora instead of requiring conversion to a percentage. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2136 b64f7644-9d1e-0410-96f1-a4d463321fa5
* only mark first audio track as default in mkv.jstebbins2009-02-071-0/+4
| | | | | | | | all tracks were getting marked which caused the last track to be chosen for playback by popcorn hour a-100 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2129 b64f7644-9d1e-0410-96f1-a4d463321fa5
* AC3 dynamic range compression changes. 0 now means a null DRC function. 1 ↵jbrjake2009-02-052-3/+10
| | | | | | | | remains the same (default DRC) and >1 still boosts soft sounds. For the moment, presets and interfaces still assume a default of 1, but the notion is to move to having 0 as the default, in the hope it will be louder/clearer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2119 b64f7644-9d1e-0410-96f1-a4d463321fa5
* With live preview decmpeg2 can be running more than once simultaneously, so ↵jbrjake2009-02-051-25/+25
| | | | | | the crude cadence tracking (Film->Video messages) needs to go in the hb_libmpeg2 struct...where I should have put it in the first place. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2118 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't let an invalid PES header length (from a corrupted packet) cause us to ↵van2009-01-281-8/+9
| | | | | | crash in memcpy. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2103 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Organizes anamorphic parameters in a struct, requiring some minor search and ↵jbrjake2009-01-2611-118/+179
| | | | | | replace changes in the interfaces. Folds the logic for strict anamorphic mode into hb_set_anamorphic_size() and also stakes out a new, more customizable mode 3. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2097 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Update libmkv and start writing mkv tags, no artwork as yet - haven't had ↵eddyg2009-01-201-0/+14
| | | | | | time to do it, sorry. I also had a hard time testing that the tags work. But I could see that they were present in the file, and I could see that it didn't affect playability. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2090 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't resync based on subtitles since their average duration is meaningless.van2009-01-151-12/+43
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2087 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add importing of ffmpeg input chapters.ritsuka2009-01-142-8/+33
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2082 b64f7644-9d1e-0410-96f1-a4d463321fa5
* h.264 i frame shouldn't be marked as sync sample.ritsuka2009-01-121-1/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2077 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Always use the track samplerate as the timescale for audio tracks. This ↵ritsuka2009-01-111-2/+2
| | | | | | fixes a problem when creating an mp4 with multiple audio tracks that have different samplerate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2074 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove some unused variablesritsuka2009-01-111-10/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2073 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bumps mp4v2 to r224jbrjake2009-01-111-5/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2072 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Get previews from H.264 content even if it's missing IDR frames (e.g., NZ TV ↵van2009-01-104-148/+176
| | | | | | | | | | | | & some blu-rays): - Grab stream characteristics (IDRs or not, PCRs or not, RAPs or not) while we're reading to compute the duration rather than trying to guess with no information later. - Only wait for an IDR after a seek if we know the stream has IDRs. Even then, wait for at most 255 frames. - If the stream doesn't have IDRs tell scan (via a new flag in the title struct) so that it can read but discard a second's worth of frames to get the decoder in sync withe stream. - While we're trying to sync the decoder, ffmpeg will spit out dozens of useless error messages so suppress them. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2071 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - have to account for a non-zero start time when we're seeking in ffmpeg files.van2008-12-131-13/+60
| | | | | | | | - try harder to get keyframes from ffmpeg files: if we've just done a seek, search the next 50 frames for a keyframe. - detect WMV3 keyframes since ffmpeg doesn't. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2027 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - try to determine the sample rate, channels, etc., of audio streams rather ↵van2008-12-131-12/+71
| | | | | | | | | than hardwiring 48KHz & 2 channels. - have to discard audio that starts before video time zero otherwise we desync the audio & video. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2026 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Consolidate all the ffmpeg-related includes into libhb/hbffmpeg.h then ↵van2008-12-1312-20/+22
| | | | | | prototype hb_avcodec_{init,open,close} so that we don't get gcc warnings from a dozen modules. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2025 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Loosen tolerance on Program Stream SCR change - 100ms is too tight for an ↵van2008-12-121-1/+1
| | | | | | EyeTV S-Video capture. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2024 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix a threading issue with avcodec_open/closejstebbins2008-12-127-16/+41
| | | | | | | | these functions can not be called from 2 threads simultaneosly. made a wrapper function that holds a lock while making the call git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2023 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't reject MPEG PS files just because they're missing a SYS header (clips ↵van2008-12-111-7/+7
| | | | | | won't have one). The standard says we just need a PACK header followed by some other legal start code. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2018 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improve duration calculation for transport streams. Streams that havejstebbins2008-12-101-3/+5
| | | | | | | | | many discontinuities (like concatenated blu-ray m2ts files) are handled better. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2017 b64f7644-9d1e-0410-96f1-a4d463321fa5
* If we don't get signed 16 bits samples from the audio decoder, convert to ↵van2008-12-061-0/+37
| | | | | | signed 16 bit. (Fix for the pcm_u8 audio generated by Canon cameras.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2014 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some floating point rounding errors in aspect ratio calculationsjstebbins2008-12-052-4/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2009 b64f7644-9d1e-0410-96f1-a4d463321fa5
* More code to deal with the flakey streams from NZ TV. They like to change ↵van2008-12-055-33/+18
| | | | | | the PCR without sending a new PCR and we get big timestamp changes but no new reference clock. So now we look at the PTS and if its change is outside a tolerance window we use the new PTS as a PCR & declare a clock discontinuity. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2008 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb:sr552008-12-041-1/+8
| | | | | | The malloc() function in cygwin doesn't return 16-byte aligned memory which causes it to randomly crash. Replaced with memalign() for the cygwin platform only. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2006 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - validate frame sync the way the standard suggests (via checking the frame ↵van2008-12-042-97/+169
| | | | | | | | | | | | crc) rather than looking at multiple frames. This should reduce the probability of mis-identifying random junk as AC-3 to less than 1 in 2^32. - check the crc on every frame so we don't let corrupted data into the decoder. - interpret the PTS as per the standard (it's the time of the first frame that starts in the packet, not the time of the first byte of the packet). Incorrect interpretation was resulting in an average 15ms timing error (worse case 31ms). - do all the PTS calculations in doubles so we don't get round-off error that will desync the audio & video with 44.1KHz audio sources (these can't appear on DVDs but do show up in avi/mkv/... files). - don't rely on the container to give us large enough frame fragments to validate the sync (some containers split audio frames into really small pieces). Instead use the 8K of unused space in the esconfig of the audio object as an accumulation buffer. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2002 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Elementary streams that scan couldn't type as audio streams have to be ↵van2008-12-041-15/+56
| | | | | | | | | | completely ignored - some of these don't follow the normal PES packet encoding so feeding them downstream to the demuxer will cause strange timing and other problems. - make log message correctly reflect our uncertainty about audio stream type so people don't complain about missing AC-3 audio when it isn't really there. - add missing av_free_packet in VC-1 keyframe search. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2001 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Found the ffmpeg initialization problem with VC-1 video. jstebbins2008-12-032-12/+115
| | | | | | | So now we can use our own demuxer for streams with VC-1. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1995 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - allow titles with video but no audio.van2008-12-021-9/+4
| | | | | | | - don't throw away previews just because we hit eof while trying to find audio info. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1993 b64f7644-9d1e-0410-96f1-a4d463321fa5
* I suspect that eddyg's r1987 didn't really want to totally break transport ↵van2008-12-021-0/+5
| | | | | | and program streams ... git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1992 b64f7644-9d1e-0410-96f1-a4d463321fa5
* git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1991 ↵sr552008-12-021-1/+1
| | | | b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add metadata support to libhb, add importing of MP4 metadata, add export of ↵eddyg2008-12-0211-128/+460
| | | | | | MP4 metadata, add importing of MP4 chapters, add seek to chapter for input files, add new libmp4v2, remove old MP4 chapter muxing - now in libmp4v2. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1987 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix one massively stupid & one moderately stupid bug I introduced into the ↵van2008-11-301-2/+21
| | | | | | DTS PTS handling. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1976 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds two new parameters to hb_scan, to control the number of preview frames ↵jbrjake2008-11-306-30/+52
| | | | | | | | generated during scan, and whether or not they're written to disk for later display. This will break any interfaces that use hb_scan until the new params are specified...sorry. Also adds a new job->seek_points setting (set this to the same as the number of previews) to be used with job->start_at_preview when doing live preview encodes, so the seek function has a frame of reference. Wires up the CLI with a --previews option (long option only) to control the new scan parameters, and defaults the CLI to not writing previews to disk. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1970 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't allow multiple decodes of the same ffmpeg audio stream. Because ffmpeg ↵van2008-11-291-4/+22
| | | | | | | | | mixes stream reader state with decoder state we only have one decoder instance for the streamso multiple decode requests will garble the audio and/or cause an abort. (Since the Universal preset specifies AC-3 passthru, using it on non-ac3 audio caused a second decode of the first audio track to be requested which triggered this bug and resulted in lots of aborts for wmv & avi conversions.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1969 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix 5.1 channels map for vorbis.ritsuka2008-11-271-6/+19
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1965 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - add John A. Stebbins' changes to handle TrueHD and DTS-HD multiplexed ↵van2008-11-256-370/+401
| | | | | | | | | | streams. - give transport streams their own demuxer rather than constructing fake PS packets to use the DVD demuxer. - start re-doing the transport stream code so it does fewer memory to memory copies. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1953 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - get rid of an unnecessary seek that was messing up either mkv or vc1 ↵van2008-11-191-2/+16
| | | | | | | | | | decoding. - switch av_seek_frame to zero back to time-based rather than byte-based since time-based screws up mkv & mp4 while time-based works for everything but vc1. - since ffmpeg doesn't correctly indicate key frames in vc1 look for them ourselves so that vc1 previews & cropping will work. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1927 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't abort when the ffmpeg vc1 decoder hands us a bogus packet sizevan2008-11-181-0/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1925 b64f7644-9d1e-0410-96f1-a4d463321fa5