summaryrefslogtreecommitdiffstats
path: root/libhb/encx264.c
Commit message (Collapse)AuthorAgeFilesLines
* x264 bump from r1523 to r1538dynaflash2010-04-141-5/+4
| | | | | | - Accompanying changes to encx264.c to address default min-keyint in x264, encx264.c patch courtesy of Rodeo. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3225 b64f7644-9d1e-0410-96f1-a4d463321fa5
* flush frames x264 has cached properlyjstebbins2010-04-021-2/+4
| | | | | | | | | | waiting until the returned size is == 0 isn't adequate. you must use the function x264_encoder_delayed_frames encoding very short clips resulted in invalid unplayable files. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3186 b64f7644-9d1e-0410-96f1-a4d463321fa5
* when in cfr mode, tell x264 we are doing cfr and allow x264 to set the ↵jstebbins2010-04-021-2/+11
| | | | | | | | | | | timebase to the framerate. fixes compatibility issue with tsMuxer which many PS3 users use. now they can select a specific framerate, which will output cfr video that tsMuxer can grok. we should have been doing this anyway. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3185 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: change the x264 header NAL array order from sei - sps - pps to sps - ↵dynaflash2010-03-311-4/+4
| | | | | | | | pps - sei as per x265 r1510 - Thanks golgol7777 for the patch! git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3180 b64f7644-9d1e-0410-96f1-a4d463321fa5
* temporary hack to use old x264 b-pyramid default of 0 (none)jstebbins2010-03-051-0/+3
| | | | | | | | this will be reverted when the gui's and presets are updated to reflect the new default of 2 (normal). git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3150 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix keyint mismatch between 1st and 2nd passes of a 2pass encodejstebbins2010-02-061-10/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3100 b64f7644-9d1e-0410-96f1-a4d463321fa5
* use DTS generated by x264 when computing duration and offset in muxmp4jstebbins2010-02-061-96/+9
| | | | | | | | also fix an issue where ffmpeg generated negative PTS for initial frames of video. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3097 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Removes obsolete check for mbtree being off before adjusting render offsets ↵jbrjake2009-12-091-3/+3
| | | | | | for b-pyramid. Also corrects a bit of coding style. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3018 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Use the correct render offset when b-pyramid is enabled in the x264 ↵jbrjake2009-12-081-39/+24
| | | | | | parameter string but is being disabled inside libx264 due to mb-tree. Thanks, Rodeo, and good catch! Also adds a logging message to note weight-p being disabled in bframeless encodes. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3013 b64f7644-9d1e-0410-96f1-a4d463321fa5
* update x264 to r1332jstebbins2009-11-111-2/+2
| | | | | | | Default weightp to none for baseline. user can override. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2922 b64f7644-9d1e-0410-96f1-a4d463321fa5
* temporary fix for x264 b-pyramid parameter changejstebbins2009-10-311-0/+8
| | | | | | | | if value is "1", set to "normal", "0" set to "none" pass other values through. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2907 b64f7644-9d1e-0410-96f1-a4d463321fa5
* remove crf flag and all uses of itjstebbins2009-10-191-36/+8
| | | | | | | x264 encodes will only use crf now. qp mode is gone. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2891 b64f7644-9d1e-0410-96f1-a4d463321fa5
* bump x264 to r1271jstebbins2009-09-241-14/+9
| | | | | | | | | make changes required by the x264 api change fix some build issues that the x264 bump exposed git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2836 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updates x264 to r1259-dd026f2, bringing with it a bunch of changes you can ↵jbrjake2009-09-151-0/+45
| | | | | | read about on their git log. The most prominent change is macroblock tree rate control (read about it on doom9), which is on by default, and for most content it produces smaller, better quality encodes. Due to a minor, temporary issue with fades in baseline profile encodes, for the moment I'm disabling mbtree when bframes=0, but this can be overridden through explicitly specifying mbtree=1 in the x264 options string. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2823 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Blah, need to pay more attention when transcripting patches. job->areBframes ↵jbrjake2009-08-091-1/+3
| | | | | | needs to be on when no x264 opts are specified. Thanks again, Rodeo. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2758 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Oops, forgot the job->areBframes check needed to be updated for the new x264 ↵jbrjake2009-08-091-5/+5
| | | | | | defaults. Thanks for the catch, Rodeo. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2756 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - Bumps x264 to r1195-5d75a9b. x264 has new default settings: subme 6->7, ↵jbrjake2009-08-011-1/+5
| | | | | | | | | | bframes 0->3, 8x8dct 0->1, psnr 1->0, ssim 1->0, ref 1->3, mixed-refs 0->1, trellis 0->1, weightb 0->1 - Explicitly enables SSIM and PSNR metrics for all x264 encodes - MacGui: Updates Advanced tab for new x264 defaults - MacGui and CLI: Updates built-in presets to produce the same output given the new default x264 settings git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2742 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - cleanup gcc format warnings showing up on linux 64-bitkonablend2009-06-251-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2619 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adds an interjob structure to preserve some encode data across jobs within ↵jbrjake2009-06-041-7/+20
| | | | | | an instance of libhb. This allows correcting the estimated bitrate/filesize of 2-pass encodes of variable framerate content, as the actual frame count is known after the first pass. Thanks for putting the idea into code, Shaya. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2482 b64f7644-9d1e-0410-96f1-a4d463321fa5
* - 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