Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
451
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
0e22b04b
Commit
0e22b04b
authored
15 years ago
by
Ilkka Ollakka
Browse files
Options
Downloads
Patches
Plain Diff
x264.c: handle X264_BUILD 78 bpyramid change
parent
d3cb36d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/codec/x264.c
+37
-0
37 additions, 0 deletions
modules/codec/x264.c
with
37 additions
and
0 deletions
modules/codec/x264.c
+
37
−
0
View file @
0e22b04b
...
...
@@ -91,10 +91,21 @@ static void Close( vlc_object_t * );
#define B_BIAS_LONGTEXT N_( "Bias the choice to use B-frames. Positive values " \
"cause more B-frames, negative values cause less B-frames." )
#define BPYRAMID_TEXT N_("Keep some B-frames as references")
#if X264_BUILD >= 78
#define BPYRAMID_LONGTEXT N_( "Allows B-frames to be used as references for " \
"predicting other frames. Keeps the middle of 2+ consecutive B-frames " \
"as a reference, and reorders frame appropriately.\n" \
" - none: Disabled\n" \
" - strict: Strictly hierarchical pyramid\n" \
" - normal: Non-strict (not Blu-ray compatible)\n"\
)
#else
#define BPYRAMID_LONGTEXT N_( "Allows B-frames to be used as references for " \
"predicting other frames. Keeps the middle of 2+ consecutive B-frames " \
"as a reference, and reorders frame appropriately." )
#endif
#define CABAC_TEXT N_("CABAC")
#define CABAC_LONGTEXT N_( "CABAC (Context-Adaptive Binary Arithmetic "\
...
...
@@ -352,6 +363,11 @@ static const char *const enc_me_list_text[] =
static
const
char
*
const
profile_list
[]
=
{
"baseline"
,
"main"
,
"high"
};
#if X264_BUILD >= 78
static
const
char
*
const
bpyramid_list
[]
=
{
"none"
,
"strict"
,
"normal"
};
#endif
static
const
char
*
const
enc_analyse_list
[]
=
{
"none"
,
"fast"
,
"normal"
,
"slow"
,
"all"
};
static
const
char
*
const
enc_analyse_list_text
[]
=
...
...
@@ -396,8 +412,14 @@ vlc_module_begin ()
B_BIAS_LONGTEXT
,
false
)
change_integer_range
(
-
100
,
100
)
#if X264_BUILD >= 78
add_string
(
SOUT_CFG_PREFIX
"bpyramid"
,
"none"
,
NULL
,
BPYRAMID_TEXT
,
BPYRAMID_LONGTEXT
,
false
)
change_string_list
(
bpyramid_list
,
bpyramid_list
,
0
);
#else
add_bool
(
SOUT_CFG_PREFIX
"bpyramid"
,
false
,
NULL
,
BPYRAMID_TEXT
,
BPYRAMID_LONGTEXT
,
false
)
#endif
add_bool
(
SOUT_CFG_PREFIX
"cabac"
,
true
,
NULL
,
CABAC_TEXT
,
CABAC_LONGTEXT
,
false
)
...
...
@@ -806,7 +828,22 @@ static int Open ( vlc_object_t *p_this )
if
(
i_val
>=
0
&&
i_val
<=
16
)
p_sys
->
param
.
i_bframe
=
i_val
;
#if X264_BUILD >= 78
psz_val
=
var_GetString
(
p_enc
,
SOUT_CFG_PREFIX
"bpyramid"
);
p_sys
->
param
.
i_bframe_pyramid
=
X264_B_PYRAMID_NONE
;
if
(
!
strcmp
(
psz_val
,
"none"
)
)
{
p_sys
->
param
.
i_bframe_pyramid
=
X264_B_PYRAMID_NONE
;
}
else
if
(
!
strcmp
(
psz_val
,
"strict"
)
)
{
p_sys
->
param
.
i_bframe_pyramid
=
X264_B_PYRAMID_STRICT
;
}
else
if
(
!
strcmp
(
psz_val
,
"normal"
)
)
{
p_sys
->
param
.
i_bframe_pyramid
=
X264_B_PYRAMID_NORMAL
;
}
#else
p_sys
->
param
.
b_bframe_pyramid
=
var_GetBool
(
p_enc
,
SOUT_CFG_PREFIX
"bpyramid"
);
#endif
i_val
=
var_GetInteger
(
p_enc
,
SOUT_CFG_PREFIX
"ref"
);
if
(
i_val
>
0
&&
i_val
<=
15
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment