summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-03-25 16:53:11 +0000
committerRodeo <[email protected]>2012-03-25 16:53:11 +0000
commit970ae1ed9f3c05fa4a8a4bc454892ef63278c721 (patch)
treec454f92a3e8a09e8b275e8b7f164be3c00860246
parent5f9578cc46e6b7c88477542815b6f8c3eaa6ee5f (diff)
Fix hb_apply_h264_level. x264_sps_init doesn't yet take VBV into account when setting the H.264 profile.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4541 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--libhb/encx264.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/libhb/encx264.c b/libhb/encx264.c
index d20447bb1..d086a3422 100644
--- a/libhb/encx264.c
+++ b/libhb/encx264.c
@@ -641,6 +641,11 @@ void hb_apply_h264_level( x264_param_t * param, const char * level, const char *
/* H.264 profile */
h264_profile = -1; // Auto
+ /* TODO: FIXME
+ * we need to guess the profile like x264_sps_init does, otherwise we'll get
+ * an error when setting a Main-incompatible VBV and x264_sps_init guesses
+ * Main profile. x264_sps_init may eventually take VBV into account when
+ * guessing profile, at which point this code can be re-enabled.
if( x264_profile && *x264_profile )
{
// if the user explicitly specified a profile, don't guess it
@@ -648,10 +653,6 @@ void hb_apply_h264_level( x264_param_t * param, const char * level, const char *
{
h264_profile = 2; // High 4:4:4 Predictive
}
- else if( !strcasecmp( x264_profile, "high" ) )
- {
- h264_profile = 1; // High
- }
else if( !strcasecmp( x264_profile, "main" ) ||
!strcasecmp( x264_profile, "baseline" ) )
{
@@ -659,9 +660,21 @@ void hb_apply_h264_level( x264_param_t * param, const char * level, const char *
}
else
{
- hb_log( "hb_apply_h264_level [warning]: unsupported x264 profile %s, ignoring", x264_profile );
+ for( i = 0; x264_profile_names[i]; i++ )
+ {
+ if( !strcasecmp( x264_profile, x264_profile_names[i] ) )
+ {
+ h264_profile = 1; // High or equivalent
+ break;
+ }
+ }
+ if( h264_profile == -1 )
+ {
+ hb_log( "hb_apply_h264_level [warning]: unsupported x264 profile %s, ignoring", x264_profile );
+ }
}
}
+ */
/* find the x264_level_t corresponding to the requested level */
if( level && *level )