summaryrefslogtreecommitdiffstats
path: root/libhb/common.h
Commit message (Collapse)AuthorAgeFilesLines
* Excises xvid from libhb because it's not worthy. Having two different MPEG-4 ↵jbrjake2009-05-261-4/+2
| | | | | | | | | Part 2 encoders is superfluous and when choosing between ffmpeg and xvid, xvid is the clear loser since we need to keep ffmpeg around for other functions and xvid constantly requires attention to ensure it compiles. MacGui: Removes some stray references to the codec and unlinks it from the Xcode project. CLI: Removes references to the codec and removes it as a dependency. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2448 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Add CoreAudio AAC as one of the encoder on Mac OS X.ritsuka2009-05-231-0/+2
| | | | | | | - Remove hb_init() and hb_init_express() macro. Rename hb_init_real() to hb_init() - Add two more bitrate combination for audio codecs in common.h git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2441 b64f7644-9d1e-0410-96f1-a4d463321fa5
* mkv soft subtitle supportjstebbins2009-05-191-1/+4
| | | | | | | | | | | | | - new libmkv 0.6.4 with subtitle track support - muxmkv supports vobsub and closed caption subtitles - added subtitle format, source, and dest initialization to dvdnav - moved subtitle_force flag into hb_subtitle_t struct as it needs to be settable per subtitle - gtk ui added subtitle tab which allows selection of multiple subtitles - reorgainize subtitle sync code to prevent dropping of subtitles when multiple subtitles are enabled git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2428 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Change CC608 decoder to be its own threadeddyg2009-05-071-3/+4
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2396 b64f7644-9d1e-0410-96f1-a4d463321fa5
* subtitle muxing: jstebbins2009-05-061-0/+1
| | | | | | | | | | initialize mux_data for passthru subtitles in muxmp4 and muxmkv add non-continuous tracks for passthru subtitles in muxcommon log closed caption data that gets to the muxer git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2393 b64f7644-9d1e-0410-96f1-a4d463321fa5
* VOBSUB encoder skeleton for use with mkv VOBSUB pass-througheddyg2009-05-061-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2389 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rewrite pass-through timestamps in sync, put on subtitle->fifo_out for ↵eddyg2009-05-051-1/+2
| | | | | | muxing. Also put the mp4 subtitle display inline with muxing - easy for ritsuka to put into a subtitle track ;) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2384 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Soft Subs Part 2: Auto-detect CC during scan, add CC to subtitle list in ↵eddyg2009-05-041-2/+3
| | | | | | title, if selected then CC's are extracted, MP4 Muxer will dump the subs to the log at the end of encoding. TODO: Translate PTS for buf->start to HB format, add MP4 subtitle track and subs during muxing. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2375 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Stage 1 Soft Subtitle Support - Allow multiple subtitle tracks to be ↵eddyg2009-05-041-5/+7
| | | | | | selected, and mark them for Render or Pass Through. No functional difference from the UIs, however in theory they could render multiple tracks - would be a dogs breakfast on screen though, and is untested. Have tested all normal operations from the UIs, including scanning. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2373 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Move frame rate code from sync to the end of render so it can account for ↵van2009-05-021-3/+1
| | | | | | | | | | | | frame timing changes made by filters. - Fix a bug that would make CFR alternate between massive drops and massive dups on some titles. - If we're not doing CFR add a factor-of-two fudge factor to init_delay to account f or the awful clock resolution of some mkvs and mp4s. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2368 b64f7644-9d1e-0410-96f1-a4d463321fa5
* dvdnav: improve title scanningjstebbins2009-05-011-0/+2
| | | | | | | | | | | - looks for ptt with longest pgc sequence instead of just picking first ptt solves many 'short title' problems - constructs chapters from the pg's within the pgc's instead of using ptt's solve the problem of ptt's that point to an intro pgc instead of to the actual chapter position in the title. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2361 b64f7644-9d1e-0410-96f1-a4d463321fa5
* add libdvdnav supportjstebbins2009-04-271-0/+2
| | | | | | | | | | | emulates the vm of a dvd player in order to navigate the disc more reliably it is optional and disabled by default CLI option '--dvdnav' enables. GUI's have a new option in preferences. When dvdnav is enabled, you can also select angles (cli '--angle') git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2355 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump libmp4v2 r224 ->r286; chunk duration; tags; cover-artkonablend2009-04-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The major changes to libmp4v2 include the new Tags API for iTunes metadata management and new API to set track chunk duration limits. Additionally, the patches for libmp4v2 are no longer required and libmp4v2 should build significantly faster as it now enabled precompiled headers on various platforms. Tags API effects common.h, decmetdata.c and muxmp4.c and replaces the operations in a near 1:1 mapping for functionality except all access happens in between alloc/fetch and store/free pattern. libhb no longer checks the bits of cover-art in order to determine image type. That functionality is now delegated to libmp4v2; and libhb identify_art_type() has been removed accordingly. Chunk duration support has been added which makes use of new API from libmp4v2: MP4SetTrackDurationPerChunk( MP4File, MP4TrackId ); And muxmp4 adds new internal function MP4TuneTrackDurationPerChunk() which is invoked after all video/audio track creation which tunes chunk duration to the equivalent of 4-frames in track timescale; as per van's suggestion. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2347 b64f7644-9d1e-0410-96f1-a4d463321fa5
* This patch adds mingw32 cross-compilation support to HandBrake trunk tokonablend2009-04-141-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | produce native win32 binaries. The main benefits are the binary does not have any Cygwin runtime requirements and various host platforms can be leveraged to build HandBrake. Cross-compilation toolchains are complex to setup and recommended for experts only; but once setup it can build at speeds similar to native builds, on Darwin or Linux. BUILD INSTRUCTIONS: Add mingw32 toolchain to beginning of your path and take the toolchain prefix from gcc (eg: i386-mingw32-gcc) and pass to configure: ./configure --cross=i386-ming32 PRODUCTS: - hb.lib (static library) - HandBrakeCLI.exe DOWNLOADS: Contrib downloads need to be seeded with: - pthreads-w32-2-8-0-release.tar.gz (new) - xvidcore-20090311.tar.gz SUMMARY: Specifically, all GUI trees are not impacted. configure - added --cross=PREFIX - reworked search for gcc and cross-compile related tools to use prefix contrib/ - sub-patches added as needed for mingw contrib/xvidcore/ - bumped from 1.1.3 -> 1.2.1+ (daily 20090311) - reconstituted P01-cygwin.patch - created new P00-darwin.patch needed for macho64 asm flag on x86_64 arch libhb/ - uint -> uint32_t - remaining changes guarded by mingw32 macro. test/ - modified to support pthread-compatibility library attach/detach. - all changes guarded by mingw32 macro. BRANCHES: source: https://hbfork.googlecode.com/svn/branches/mingw@28 target: svn://svn.handbrake.fr/HandBrake/trunk@2325 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2326 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make MULTIPLE_MOD handle mod 1 correctlyjstebbins2009-04-131-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2323 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a job->frame_to_stop variable similar to the existing pts_to_stop ↵jbrjake2009-03-311-0/+1
| | | | | | | | parameter, for ending an encode after a certain number of decoded frames. CLI: Replaces --stop-at-pts and --stop-at-duration with a general --stop-at option. The argument is in the form unit:amount. So --stop-at duration:10 for a 10 second encode, --stop-at pts:300300 to end when that timestamp is reached, or --stop-at frame:1000 to stop after reading 1000 frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2286 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Organizes anamorphic parameters in a struct, requiring some minor search and ↵jbrjake2009-01-261-4/+12
| | | | | | 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
* Get previews from H.264 content even if it's missing IDR frames (e.g., NZ TV ↵van2009-01-101-0/+4
| | | | | | | | | | | | & 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
* More code to deal with the flakey streams from NZ TV. They like to change ↵van2008-12-051-2/+0
| | | | | | 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
* Add metadata support to libhb, add importing of MP4 metadata, add export of ↵eddyg2008-12-021-0/+17
| | | | | | 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
* Adds two new parameters to hb_scan, to control the number of preview frames ↵jbrjake2008-11-301-1/+2
| | | | | | | | 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
* - add John A. Stebbins' changes to handle TrueHD and DTS-HD multiplexed ↵van2008-11-251-1/+1
| | | | | | | | | | 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
* libhb support for live previewjstebbins2008-11-111-0/+8
| | | | | | | | set job->start_at_preview to the preview frame you want to start at set job->pts_to_stop to the number of 90khz ticks duration git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1915 b64f7644-9d1e-0410-96f1-a4d463321fa5
* ETSI TS 102 366 V1.2.1 compliant AC3 in MP4, replaces older hacked version ↵eddyg2008-10-291-0/+4
| | | | | | that was hardcoding the AC3 stream information in the dac3 atom based on the AppleTV startup movie stream. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1879 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added support for extracting the audio and subtitle types and adding those ↵eddyg2008-10-231-0/+2
| | | | | | to the audio and subtitle names, e.g. Director's Commentary. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1863 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a configuration option for whether the COLR atom and h.264 VUI header ↵jbrjake2008-10-191-0/+1
| | | | | | should signal Bt.601 or Bt.7709 color, instead of just setting it based on whether the source is standard or high definition (which is preserved as default, and made more sensitive to letterboxed HD content). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1851 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Makes sure loose anamorphic respects max width and height settings, and ↵jbrjake2008-10-181-1/+1
| | | | | | removes a bunch of code by repurposing MULTIPLE_MOD() (thanks j45!). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1843 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: Add support for naming audio tracks to the HandBrakeCLI, thanks to ↵eddyg2008-10-101-0/+1
| | | | | | LePetomane for the patch. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1825 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Only do 'lost PCR' checks (r1712) when we're dealing with something that ↵van2008-10-031-1/+2
| | | | | | | | | could be an over-the-air transport stream. We can't lose the clock of a program stream and shouldn't have losses on an m2ts stream. - Widen the DTS-to-PCR acceptance window from +-5sec to +-5min since there's nothing in the standard that bounds the offset between a DTS and its clock reference. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1802 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - change aspect from a scaled int to a double so we can handle the widervan2008-08-081-2/+2
| | | | | | | | | | | | | | | | | | | range of aspect ratios we get from ffmpeg files. - add container_aspect to title struct (always zero except for DVDs when it's the aspect from the VTSI). To handle broken French DVDs, make HB complain & use the container aspect if it's different from the aspect computed from the video PAR. - fix ScanFunc's job template init so that it doesn't think the only legal aspect ratios are 16:9 & 4:3. - hb_reduce wouldn't reduce any fraction where both terms were equal and prime (e.g., 2/2, 3/3, 5/5, etc. would not become 1/1). Recoded it using Euclid's Algorithm so it always works and is faster. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1616 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Splits the display of job settings off from the actual work of beginning of ↵jbrjake2008-08-011-0/+5
| | | | | | | | a job, and reorganizes/elaborates the display's layout. Adds new title variables to provide more description of sources: video_codec_name, video_bitrate (currently only used by DVD sources), and container_name and data_rate (currently only used by ffmpeg input sources). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1599 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a job->cfr boolean to indicate "encode this with a constant frame rate" ↵jbrjake2008-06-051-11/+16
| | | | | | instead of passing through the true frame durations from the source. Includes CLI implementation, which sets cfr to 1 if the user specifies a frame rate. Otherwise, it uses "same as source" frame rate. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1496 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Keep track of the input pixel aspect ratio as well as the output one. ↵jbrjake2008-06-041-0/+4
| | | | | | Hopefully doesn't break anything. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1489 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - support blu-ray, avchd & dvb x264van2008-05-311-2/+46
| | | | | | | - support video files handled by ffmpeg (avi, mkv, mp4, etc.) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1480 b64f7644-9d1e-0410-96f1-a4d463321fa5
* git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1471 ↵jbrjake2008-05-291-0/+1
| | | | b64f7644-9d1e-0410-96f1-a4d463321fa5
* Saearch & Replace domain names to move from .m0k.org to handbrake.fr. Only ↵jbrjake2008-04-151-1/+1
| | | | | | covers trunk files, libhb, and test. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1418 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fixes for different number of frames between pass 1 & 2, missing frames at ↵van2008-04-131-0/+1
| | | | | | | | | | | | end, and an deadlock with pcm audio. - since the SCR clock recovery is done in reader.c we can't currently skip audio frames during pass 1 or we miss clock changes signaled by those frames & end up dropping more video frames in pass 1 than pass 2. - since many modules buffer frames we can't tell if we're done just by looking for empty fifos. Send an empty buffer to mark end-of-stream all the way along the processing pipeline & use it to flush internally buffered data. - in a processing pipeline you're done when the end of the pipe says your done. add a thread status variable so we can tell when individual threads are finished then make do_job wait until the encoder thread is done so that we're sure all the frames have been processed and sent to the muxer. - since the muxer alternates between reading video & audio packets we have to have enough buffer in the audio pipeline to handle a video-frame's worth of audio packets (33ms). Since pcm packets are <1ms we need >60 slots in the audio fifos or we'll deadlock. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1412 b64f7644-9d1e-0410-96f1-a4d463321fa5
* New internal audio handling.saintdev2008-04-011-103/+111
| | | | | | | | Each audio track contains it's own settings for codec, bitrate, samplerate, etc. This allows for very complex combinations of audio tracks if desired. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1365 b64f7644-9d1e-0410-96f1-a4d463321fa5
* = Adds an hb_detect_comb() function that indicates whether or not a frame ↵jbrjake2008-03-231-0/+1
| | | | | | | | | shows interlacing artifacts. - Utilitizes that function in scan.c to analyze the preview frames - Sets a new title->detected_interlacing variable to true if half or more previews show combing, and warns the user in the log. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1359 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Theora.saintdev2008-03-201-0/+2
| | | | | | | | This adds the theora encoder to the Xcode project as well. It does not enable anything in the Mac GUI, just allows it to build. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1350 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Formatting: Remove a lot of trailing whitespace.saintdev2008-02-211-10/+10
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1307 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Allow mac gui to select AC-3 + AAC at the same time, still needs CLI work ↵eddyg2008-02-161-0/+7
| | | | | | for the same. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1267 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Queue Update - thanks travistexdynaflash2007-12-171-0/+1
| | | | | | | | | | | - The primary change is that HBJob now copies the relevant fields out of hb_job_s that it needs. It no longer keeps a pointer reference to libhb's job. - The only time the queue looks at libhb's jobs is when scanning the job list in order to build of the GUI queue display. - Removed all uses of hb_current_job(). - Canceled jobs now stay listed in the queue, with a canceled icon. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1130 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MPEG-2 stream reading fixes for missing audio, multiple audio tracks, ↵jbrjake2007-12-131-3/+0
| | | | | | language codes, reading streams larger than 2GB, and incorrect title numbers. This vastly expands HandBrake's TS/PS compatibility. Thanks, van! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1123 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds extra, user-selectable dynamic range compression to the liba52 ↵jbrjake2007-12-081-0/+1
| | | | | | | | interface, making softer sounds louder. Based on code from liba52's A52Decoder, used in Perian's preferences pane. Set with a job->dynamic_range_compression float, with valid values being 1.0 - 4.0. Controlled from the CLI with --dynamic-range-compression or -D. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1108 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Gives the CLI a separate option for adding the iPod UUID atom to mp4 files, ↵jbrjake2007-11-281-0/+1
| | | | | | instead of it just being a side-effect of using the x264b30 encoder. It's called with -I or --ipod-atom . git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1084 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Optimize MP4 files for HTTP streaming (on the CLI it's -O or --optimize).jbrjake2007-11-211-1/+1
| | | | | | | | Has mpeg4ip run a second pass after muxing is complete, to move the MOOV atom to the beginning of the file. To get this to work, I had to replace a patch from Perian, which has written the avc1 "Compressor Name" in the Pascal string style QuickTime expects. Unfortunately, that patch left mpeg4ip unable to parse its own output, when muxing x264 video. Instead, now the Compressor Name is a blank string, and QuickTime substitutes "H.264" for it. NOTE: This is *not* hinting for RTP streaming, just shuffling the container around so it starts playing faster over the web. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1074 b64f7644-9d1e-0410-96f1-a4d463321fa5
* First attempt at variable frame rate detelecining for NTSC video sources.jbrjake2007-11-101-1/+2
| | | | | | | This check-in includes the library code as well as the CLI implementation. Only works with MP4 and MKV, untested with high profile, results may vary with mixed content, consult a physician if condition persists for longer than four hours. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1051 b64f7644-9d1e-0410-96f1-a4d463321fa5
* "Loose" anamorphic:jbrjake2007-10-161-0/+2
| | | | | | | | - Scales the storage frame size to arbitrary widths, like 640 for the iPod. - Uses dimensions that divide cleanly by an arbitrary number (default: 16) and adjusts the SAR to match - Uses ITU PAR values when the video is meant to be overscanned ( 7+ pixels cropped on left+right) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1029 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added buffer management and changed fifo sizes. Changed job->subtitle_scan ↵eddyg2007-09-111-1/+1
| | | | | | to job->indepth_scan, and fixed memory init bug in denoise.c. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@945 b64f7644-9d1e-0410-96f1-a4d463321fa5