summaryrefslogtreecommitdiffstats
path: root/libhb/encx264.c
Commit message (Collapse)AuthorAgeFilesLines
* - minor code cleanup - use x264_nal_t.i_type instead of buffer+offset&mask.konablend2009-05-031-5/+13
| | | | | | | | - use constants instead of hardcoded values. - explicitly list expected nal types to be processed further. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2372 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - encx264 sets HB_FRAME_REF to expose ref/non-ref frame status to muxer.konablend2009-05-031-0/+6
| | | | | | | | - bump libmp4v2 r286 -> r290; required for new API (sdtp atom support). - use new API MP4WriteSampleDependency() in muxer to signal disposable frames and set a few other dependency bits for sdtp atom. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2371 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/+21
| | | | | | | | | | | | 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
* libhb: set min:max key intervals ratio to 1:10 of fpskonablend2009-04-181-4/+12
| | | | | | | | | - new behavior effects ratios only for whole-numbered input FPS - old behavior { 23.976, 24, 29.976, 30, 59.94, 60 } -> { 24:240, 25:251, 30:300, 31:301, 60:600, 61:601 } - new behavior { 23.976, 24, 29.976, 30, 59.94, 60 } -> { 24:240, 24:240, 30:300, 30:300, 60:600, 60:600 } git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2343 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Organizes anamorphic parameters in a struct, requiring some minor search and ↵jbrjake2009-01-261-3/+3
| | | | | | 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
* Correct chroma size for raw video frames - width & height need to be rounded ↵van2008-11-081-4/+6
| | | | | | up if they're odd before dividing by 2. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1905 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Ooops, I wanted height not width there.jbrjake2008-10-191-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1852 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds a configuration option for whether the COLR atom and h.264 VUI header ↵jbrjake2008-10-191-2/+15
| | | | | | 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
* After discussion with eddyg, extending verbose logging level 2 from just ↵jbrjake2008-10-091-1/+1
| | | | | | memory-related logging to general-purpose housekeeping--stuff that isn't necessary when scrolling through activity logs users submit with bug reports and support queries. This includes things like thread start/exit messages and preview frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1820 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Bring libhb in line with x264's new default subme level of 6.jbrjake2008-09-191-3/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1724 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Make sure we never return an unitialized buffer chain to work_loop.van2008-08-091-0/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1622 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't lose our existing buffer chain when nal_encode returns NULL.van2008-07-291-10/+16
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1592 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use PTS, not DTS, in encx264 output frames so we don't have to special-case ↵van2008-07-261-42/+9
| | | | | | its output in every muxer. Confine code that deals with Apple's mistakes in handling video with b-frames to muxmp4. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1582 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - in encx264, if an video frame is larger than init_delay split it into ↵van2008-07-261-191/+274
| | | | | | | | | | | | pieces so we don't get jerky output caused by out-of-order frames. - add an explicit EOF for all streams, not just video. - don't generate extra audio silence at the end of an encode (don't need it with explicit eof). - get rid of 80ms initial delay in AAC encode & flush final four frames buffered in encoder. - put mp4 'chap' atom on first track (usually video) rather than first audio track since we can now do video without audio (atom just needs to go on an enabled media track & video is always enabled). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1581 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - fix an error in the SCR calculation that would cause an extra frame to be ↵van2008-06-301-2/+4
| | | | | | | | | | dropped at an SCR discontinuity. - fix a rounding error in the encx264 init_delay computation that would underestimate the delay for progressive content and cause spurious "init_delay too small" messages. - clean up the sync.c "video time didn't advance" logic and try to make the error mgs more useful for debugging frame duration problems. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1543 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Add COLR atom support to mpeg4ipvan2008-06-181-0/+17
| | | | | | | | - Add COLR atom to mp4 video tracks - Add colorspace info to h.264 VUI header git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1528 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Encode the initial H.264 NAL units for PPS and SPS, not just the ones during ↵jbrjake2008-06-061-6/+5
| | | | | | work. This was a regression caused by r270. Thanks for the patch, j45! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1498 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix for unplayable m4v/mp4 files due to negative numbers in ctts atom.van2008-05-311-7/+25
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1478 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Opens up another way to give x264 a constant QP or RF, by passing a direct ↵jbrjake2008-04-261-1/+24
| | | | | | value instead of a percentage that encx264.c has to convert. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1447 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
* Let's try out saner b-frame init delays again.jbrjake2008-04-111-4/+2
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1404 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Minor chapter cleanups.van2008-04-041-1/+3
| | | | | | | | | | - put chapter number in buf rather than a 'new chapter' flag. - use that chapter number to index chapter text in muxers so a dropped chapter doesn't make all subsequent chapter labeling wrong. - get rid of most of the chapter logging & just output one line giving the chapter text, number, frame & time. - fix a bug in sync that could cause chapter marks to be lost. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1377 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: Fix timecodes when using x264 with avi.saintdev2008-03-051-4/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1326 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Formatting: Remove a lot of trailing whitespace.saintdev2008-02-211-14/+14
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1307 b64f7644-9d1e-0410-96f1-a4d463321fa5
* When x264 outputs frames as references for b-frame pyramids, flag them as ↵jbrjake2008-02-121-1/+5
| | | | | | such instead of just marking them as regular b-frames. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1257 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - correct the way that output timestamps are generated so that VFR will work ↵van2008-02-041-27/+73
| | | | | | with bframes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1250 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Better b-frame muxing. Instead of using an arbitrarily long offset and then ↵jbrjake2007-12-281-1/+28
| | | | | | | | later walking the file to find the smallest one, now x264 uses the smallest delay it can from the start. This significantly cuts down muxing time. As a side effect, it also makes fixing chapter markers + b-frames easy, so that's included too in muxmp4 (thanks, van!). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1152 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Don't copy the frame before passing it to x264, let x264 look directly into ↵eddyg2007-12-121-7/+20
| | | | | | our HB buffer instead. x264 will copy the data from it as required. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1116 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Automagically set keyframe intervals for x264, based on the specified FPS.jbrjake2007-10-261-1/+10
| | | | | | | | | So... 23.976fps content gets a minimum interval of 24 and a maximum of 240 25fps content uses defaults, a minimum interval of 25 and a maximum of 250 29.97fps content gets a minimum of 30 and a maximum of 300. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1038 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fixed a problem when using more than 13 b-frames in x264ritsuka2007-10-111-8/+7
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1018 b64f7644-9d1e-0410-96f1-a4d463321fa5
* When duplicating the x264 options keep a pointer to the start of the options ↵eddyg2007-10-021-3/+6
| | | | | | so that we can free them. Also check that the memory allocation actually succeeded. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@998 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fixes encx264.c from rev 994 to avoid crasing with 2pass and auto select / ↵dynaflash2007-09-271-3/+3
| | | | | | forced subtitiles. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@995 b64f7644-9d1e-0410-96f1-a4d463321fa5
* MacGui: Mod encx264.c to allow the queue to show the advanced x264 options ↵dynaflash2007-09-271-1/+2
| | | | | | in the encoding job. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@993 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Van's changes to the x264 lib and HB encoder to ensure that an IDR frame is ↵eddyg2007-09-171-1/+30
| | | | | | used for each new chapter. Well done and lots of thanks to Van for this one. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@967 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Switch buf->key to buf->frametype which is a bitmask telling us what type of ↵saintdev2007-06-171-13/+14
| | | | | | | | | frame we are dealing with. This doesn't change any functionality, but I need to be able to distinguish between x264 IDR and I frames for the upcoming matroska muxer. This also has the side effect of making the code a little easier to read and maintain. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@623 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Removes thread limitation for iPod encoding. With x264's new-ish sliceless ↵jbrjake2007-05-091-1/+0
| | | | | | threading method, there is no longer any need, if there ever was, of keeping the video to 1 slice. This should significantly speed up iPod encodes and shut up the people claiming HB can't use more than 70% of a processor. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@577 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Tells x264 to use threads=cpus*1.5 instead of threads=cpus. This is because ↵jbrjake2007-05-021-1/+1
| | | | | | x264 implemented sliceless threading since we last updated the revision we use. The codec now works best with more threads than processors, as odd as that seems at first blush. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@564 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cleaning up the code a bit.clee2007-04-171-207/+212
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@521 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a major memory leak introduced in Nyx's bframe patch.saintdev2007-04-171-7/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@519 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Much better B-frame muxing frame-reordering. This will preserve the sps/pps ↵jbrjake2007-04-161-78/+145
| | | | | | | | info, properly offset the first frame, and flush any remaining frames at the end of the encode. Patch by: Nyx git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@513 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix a bus error if b-pyramid is given as an x264 option without specifying a ↵jbrjake2007-04-031-6/+13
| | | | | | value. (Thanks for alerting me to the bug, saintdev) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@473 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix about 156,199 bytes of leaked memory.saintdev2007-03-311-6/+9
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@469 b64f7644-9d1e-0410-96f1-a4d463321fa5
* H.264 B-frame muxing for MP4, including B-pyramids. The latter are QuickTime ↵jbrjake2007-03-301-5/+44
| | | | | | | | incompatible. "Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves." -- Alan Kay git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@464 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge the 5.1 branch into the trunk.prigaux2007-03-061-0/+301
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@422 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge the 0.8.0_mpeg4ip branch into the trunkprigaux2007-02-111-203/+0
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@285 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Added CRF x264 rate control method to HBTest.jbrjake2007-01-041-4/+16
| | | | | | | | | | Constant quantizer is maintained as the default so nothing changes: HBTest -i input -o output -e x264 -q 0.60 Switch to constant rate factor by throwing a -Q on the end: HBTest -i input -o output -e x264 -q 0.60 -Q git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@89 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HandBrake 0.7.1a2handbrake2006-12-161-13/+3
| | | | | | | | Updated x264 base source to svn 604 Improved CQP and ABR handling git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@71 b64f7644-9d1e-0410-96f1-a4d463321fa5
* HandBrake 0.7.1a1rhester2006-09-301-36/+53
| | | | | | | | | | | | | | | | Made H.264 baseline levels more generic Added iPod 640x480 support to libhb, HBTest and MacOS X GUI Added proper iPod 640x480 muxing Modified rate control for more accurate ending video bitrates Updated ffmpeg and x264 base sources to more current levels Removed inlined ff_get_fourcc (now in ffmpeg) Updated patches for xvidcore, libdvdread, x264, and ffmpeg Relocated contrib files to local web server and updated version files to new site Renamed contrib files and patches to consistent naming standard Updated contrib Jamfile to support new patches and naming standard git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@70 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Merge from avformat branchtiter2006-04-171-45/+15
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@60 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Structural changes, in order to eventually be able to compile HBtiter2006-03-161-54/+47
| | | | | | | without certain encoders git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@34 b64f7644-9d1e-0410-96f1-a4d463321fa5