summaryrefslogtreecommitdiffstats
path: root/libhb/encx264.c
Commit message (Collapse)AuthorAgeFilesLines
* Bump libav to v9_beta3.Rodeo2012-12-311-4/+4
| | | | | | | | Miscellaneous bugfixes and improvements. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5124 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: cosmetics.Rodeo2012-12-201-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5103 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: unset a few options that have no effect in the ↵Rodeo2012-12-201-1/+21
| | | | | | advanced options string. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5102 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: cosmetics, change the meaning of the last parameter ↵Rodeo2012-12-201-9/+9
| | | | | | (be_quiet -> verbose). Seems more common. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5101 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: raise qpmin to 4. 3 has been found to fail on real sources.Rodeo2012-12-091-3/+5
| | | | | | | | Fixes https://forum.handbrake.fr/viewtopic.php?f=5&t=25735 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5094 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse(): fix typo.Rodeo2012-11-271-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5086 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: miscellaneous cosmetics.Rodeo2012-11-121-31/+64
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5061 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: miscellaneous cosmetics.Rodeo2012-11-121-301/+326
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5060 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_x264_param_unparse: returns a complete x264 encopts string from a ↵Rodeo2012-11-121-2/+620
| | | | | | preset/tune(s)/profile/level/encopts combo. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5059 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add a utility function to check whether an H.264 level can be used given the ↵Rodeo2012-11-051-0/+15
| | | | | | current encoding parameters. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5044 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: revert part of revision 4944.Rodeo2012-11-051-20/+9
| | | | | | | | There's no reason why fps would be specified in the x264_param_t vs. width/height via separate parameters. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5043 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: return 1 in case of warnings and make return values > 0 ↵Rodeo2012-09-111-11/+28
| | | | | | | | | | non-fatal. This could be used by a GUI to remove incompatible levels from a drop-down, for example. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4955 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: add a parameter to silence warnings.Rodeo2012-09-111-27/+34
| | | | | | | | This can be used to avoid log pollution when e.g. using an x264 unparse function. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4954 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: make hb_x264_encopt_synonyms two-dimensional instead of faking it.Rodeo2012-09-091-3/+3
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4946 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: use less generic names for some stuff.Rodeo2012-09-091-8/+8
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4945 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level() update & cleanup.Rodeo2012-09-091-119/+142
| | | | | | | | | | The caller may specify any width & height now, rather than having to initialize the x264_param_t's fields directly. Since it's reasonable to expect GUIs to only provide valid levels (if it doesn't, there's a bug that needs fixing), it's OK to abort when the requested level is not valid. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4944 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Updated file copyright / GPL headerssr552012-06-151-3/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4737 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Cosmetic after last commit.Rodeo2012-03-311-1/+1
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4569 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: cleanup.Rodeo2012-03-311-33/+33
| | | | | | | | | | | | | | libx264 can detect the CPU count, so no need to set the number of threads. We now use the x264 default, even when sliced threads are enabled. Move some initializations until after parsing job->advanced_opts. Width, height and annexb aren't meant to be set by the user. Only get a new temporary filename if we're actually doing 2-pass encoding. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4568 b64f7644-9d1e-0410-96f1-a4d463321fa5
* hb_apply_h264_level: avoid division by zero due to some x264_param_t fields ↵Rodeo2012-03-291-4/+16
| | | | | | being uninitialized. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4558 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: add functionality to retrieve the "preferred" option name for ↵Rodeo2012-03-291-1/+10
| | | | | | options that have multiple names. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4554 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: use source colorimetry information when available.Rodeo2012-03-281-11/+24
| | | | | | | | | When source colorimetry can't be determined, guess. Added code to guess PAL SD content and updated code to guess HD content. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4552 b64f7644-9d1e-0410-96f1-a4d463321fa5
* encx264: use x264_param_apply_fastfirstpass.Rodeo2012-03-281-0/+6
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4551 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: add basic dictionary implementation.Rodeo2012-03-281-49/+18
| | | | | | | | Note: under OS X, this commit may require a full rebuild to work properly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4550 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Rework filter pipelinejstebbins2012-03-271-34/+34
| | | | | | | | | | | | | | | | | | | | This patch enhances the filter objects. The 2 key improvements are: 1. A filter can change the image dimensions as frames pass through it. 2. A filter can output more than one frame. In addition, I have: Moved cropping & scalling into a filter object Added 90 degree rotation to the rotate filter Moved subtitle burn-in rendering to a filter object. Moved VFR/CFR handling into a framerate shaping filter object. Removed render.c since all it's responsibilities got moved to filters. Improves VOBSUB and SSA subtitle handling. Allows subtitle animations. SSA karaoke support. My apologies in advance if anything breaks ;) git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4546 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix hb_apply_h264_level. x264_sps_init doesn't yet take VBV into account ↵Rodeo2012-03-251-5/+18
| | | | | | when setting the H.264 profile. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4541 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Misc. improvements to the previous commit.Rodeo2012-03-241-25/+68
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4535 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add hb_apply_h264_level(). Sets and ensures compliance with the specified ↵Rodeo2012-03-241-3/+152
| | | | | | | | | | H.264 level. Does not modify framerate and resolution but prints warnings when they are incompatible with the requested level. Exposed to CLI users only via the --h264-level option. GUI support may come later, once we decide how to handle x264 presets/tunes/profiles. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4534 b64f7644-9d1e-0410-96f1-a4d463321fa5
* CLI: x264 preset, tuning, and profile supportjstebbins2011-10-021-22/+56
| | | | | | | | New cli options --x264-preset, --x264-tune, and --x264-profile. x264 preset and tune are set first, followed by any custom x264 option string, and finally the profile is applied. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4265 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add fake keyframes for PIR encodingjstebbins2011-09-191-10/+18
| | | | | | | | Periodic intra refresh has no IDR frames, but x264 signals a keyframe at recovery points. Use this flag to fake keyframes in the container so that seeking in these files works properly. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4232 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: allow changing colorimetry in x264 optionsjstebbins2011-08-081-31/+32
| | | | | | | | Setting "colorprim", "transfer", or "colormarix" in the x264 advanced options will no longer be ignored and will propagate to the mp4 muxer where those values also get set in the container. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4164 b64f7644-9d1e-0410-96f1-a4d463321fa5
* libhb: fix crash when x264 fails to initializejstebbins2011-06-061-0/+5
| | | | git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4025 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Remove legacy % to RF mapping.jstebbins2011-03-211-12/+3
| | | | | | | | | | 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
* fix 2 pass cfr x264 crashjstebbins2011-03-131-1/+1
| | | | | | | | | | | An error in interjob->vrate calculation lead to specifying a different timebase for the 1st and 2nd pass which x264 does not allow. This improves the interjob->vrate calculation accuracy and also guarantees the timebase is the same on both passes regardless of the calculations accuracy. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3848 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Add parameter parsing and b-frame support to ffmpeg mpeg-4 encoderjstebbins2011-03-111-4/+4
| | | | | | | | | | | | | The cli will now accept ':' separated parameters using the '-x' option for ffmpeg mpeg-4. The linux gui has an entry box on the advanced tab to add options. The option keys and values are the same as what the ffmpeg command line allows. Calculation of DTS timestamps was added to encavcodec.c in order to allow out of order b-frames. The algorithm is similar to what x264 uses. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3839 b64f7644-9d1e-0410-96f1-a4d463321fa5
* make keyint match between 1st and 2nd passes of vfr and pfr encodes.jstebbins2011-03-081-23/+19
| | | | | | | | | | | | make keyint and fps settings consistent across video encoders. make interjob->vrate changes for pfr mode like we do for vfr since pfr is the same as vfr except when it hits it's peak. in mkv, set track default duration to actual measured vrate on 2 pass encodes. thanks to Rodeo for the corrections in encx264 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3831 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Adjust x264 qpmin for QT compatibility.jstebbins2010-12-161-0/+6
| | | | | | | | | | A recent change in x264 lowered the default qpmin to 0. QuickTime has trouble with very low QPs (resulting in visual artifacts). Known to affect QuickTime 7, QuickTime X and iTunes. Testing shows that a qpmin of 3 works. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3708 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Fix encx264 to accomodate upcoming x264 api change.jstebbins2010-11-071-18/+15
| | | | | | | | | | i_qpplus1 is going away, so eliminate our use of it. Isn't needed anyway. Also switch from using x264_picture_alloc to x264_picture_init. We are supplying out own buffer, so we should be using init instead of alloc. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3660 b64f7644-9d1e-0410-96f1-a4d463321fa5
* Improved logging of keyint min/maxjstebbins2010-11-071-4/+21
| | | | | | | | | | | | | | | | | | And small tweak to keyint_max calculation. x264 slightly changed the way the automatic min-keyint is calculated. Also, keyint infinite was added. This does not cause any encoding issues, but depending on the settings and the framerate, the log contained keyint values that don't correspond to the actual encode's values. The keyint_max was calculated, 59.94 fps sources will get a keyint of 599 rather than 600. With this change, It is rounded to the closest integer then multiplied by 10. Thanks to Rodeo git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3658 b64f7644-9d1e-0410-96f1-a4d463321fa5
* update baseline presets with weightp=0jstebbins2010-10-231-38/+0
| | | | | | | eliminate hack that defaults weightp=0 when bframes=0 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3623 b64f7644-9d1e-0410-96f1-a4d463321fa5
* clean up crufty legacy codejstebbins2010-10-231-17/+0
| | | | | | | remove unused code relating to avi, ogm, psp, ipod, and forcing h264 levels git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3622 b64f7644-9d1e-0410-96f1-a4d463321fa5
* fix some preset issuesjstebbins2010-07-031-15/+0
| | | | | | | | | | | add b-pyramid=none to appletv presets and remove b-pyramid hack from encx264.c change samplerate from 48 to 'Auto' in all presets cap samplerate to 48khz since none of the encoders support higher rates remove obsolete UsesMaxPictureSettings from all presets. replace with UsesPictureSettings=2 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3424 b64f7644-9d1e-0410-96f1-a4d463321fa5
* 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