Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
cd65fe39
Commit
cd65fe39
authored
Apr 26, 2005
by
Gildas Bazin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* modules/codec/x264.c: added bpyramid and subpel options + support for X264_ANALYSE_BSUB16x16.
parent
93b9a64d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
2 deletions
+34
-2
modules/codec/x264.c
modules/codec/x264.c
+34
-2
No files found.
modules/codec/x264.c
View file @
cd65fe39
...
@@ -80,6 +80,10 @@ static void Close( vlc_object_t * );
...
@@ -80,6 +80,10 @@ static void Close( vlc_object_t * );
#define BFRAMES_LONGTEXT N_( "Number of consecutive B-Frames between I and " \
#define BFRAMES_LONGTEXT N_( "Number of consecutive B-Frames between I and " \
"P-frames." )
"P-frames." )
#define BPYRAMID_TEXT N_("B pyramid")
#define BPYRAMID_LONGTEXT N_( "Allows B-frames to be used as references for " \
"predicting other frames." )
#define FRAMEREF_TEXT N_("Number of previous frames used as predictors.")
#define FRAMEREF_TEXT N_("Number of previous frames used as predictors.")
#define FRAMEREF_LONGTEXT N_( "This is effective in Anime, but seems to " \
#define FRAMEREF_LONGTEXT N_( "This is effective in Anime, but seems to " \
"make little difference in live-action source material. Some decoders " \
"make little difference in live-action source material. Some decoders " \
...
@@ -94,6 +98,11 @@ static void Close( vlc_object_t * );
...
@@ -94,6 +98,11 @@ static void Close( vlc_object_t * );
"-1 disables scene-cut detection, so I-frames are be inserted only every "\
"-1 disables scene-cut detection, so I-frames are be inserted only every "\
"other keyint frames, which probably leads to ugly encoding artifacts." )
"other keyint frames, which probably leads to ugly encoding artifacts." )
#define SUBPEL_TEXT N_("Sub-pixel refinement quality.")
#define SUBPEL_LONGTEXT N_( "This parameter controls quality versus speed " \
"tradeoffs involved in the motion estimation decision process " \
"(lower = quicker and higher = better quality)." )
static
char
*
enc_analyse_list
[]
=
static
char
*
enc_analyse_list
[]
=
{
""
,
"all"
,
"normal"
,
"fast"
,
"none"
};
{
""
,
"all"
,
"normal"
,
"fast"
,
"none"
};
static
char
*
enc_analyse_list_text
[]
=
static
char
*
enc_analyse_list_text
[]
=
...
@@ -136,6 +145,9 @@ vlc_module_begin();
...
@@ -136,6 +145,9 @@ vlc_module_begin();
BFRAMES_LONGTEXT
,
VLC_FALSE
);
BFRAMES_LONGTEXT
,
VLC_FALSE
);
change_integer_range
(
0
,
16
);
change_integer_range
(
0
,
16
);
add_bool
(
SOUT_CFG_PREFIX
"bpyramid"
,
0
,
NULL
,
BPYRAMID_TEXT
,
BPYRAMID_LONGTEXT
,
VLC_FALSE
);
add_integer
(
SOUT_CFG_PREFIX
"frameref"
,
1
,
NULL
,
FRAMEREF_TEXT
,
add_integer
(
SOUT_CFG_PREFIX
"frameref"
,
1
,
NULL
,
FRAMEREF_TEXT
,
FRAMEREF_LONGTEXT
,
VLC_FALSE
);
FRAMEREF_LONGTEXT
,
VLC_FALSE
);
change_integer_range
(
1
,
15
);
change_integer_range
(
1
,
15
);
...
@@ -144,6 +156,10 @@ vlc_module_begin();
...
@@ -144,6 +156,10 @@ vlc_module_begin();
SCENE_LONGTEXT
,
VLC_FALSE
);
SCENE_LONGTEXT
,
VLC_FALSE
);
change_integer_range
(
-
1
,
100
);
change_integer_range
(
-
1
,
100
);
add_integer
(
SOUT_CFG_PREFIX
"subpel"
,
40
,
NULL
,
SUBPEL_TEXT
,
SUBPEL_LONGTEXT
,
VLC_FALSE
);
change_integer_range
(
1
,
5
);
vlc_module_end
();
vlc_module_end
();
/*****************************************************************************
/*****************************************************************************
...
@@ -151,7 +167,8 @@ vlc_module_end();
...
@@ -151,7 +167,8 @@ vlc_module_end();
*****************************************************************************/
*****************************************************************************/
static
const
char
*
ppsz_sout_options
[]
=
{
static
const
char
*
ppsz_sout_options
[]
=
{
"qp"
,
"qp-min"
,
"qp-max"
,
"cabac"
,
"loopfilter"
,
"analyse"
,
"qp"
,
"qp-min"
,
"qp-max"
,
"cabac"
,
"loopfilter"
,
"analyse"
,
"keyint"
,
"keyint-min"
,
"bframes"
,
"frameref"
,
"scenecut"
,
NULL
"keyint"
,
"keyint-min"
,
"bframes"
,
"bpyramid"
,
"frameref"
,
"scenecut"
,
"subpel"
,
NULL
};
};
static
block_t
*
Encode
(
encoder_t
*
,
picture_t
*
);
static
block_t
*
Encode
(
encoder_t
*
,
picture_t
*
);
...
@@ -257,6 +274,11 @@ static int Open ( vlc_object_t *p_this )
...
@@ -257,6 +274,11 @@ static int Open ( vlc_object_t *p_this )
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"bframes"
,
&
val
);
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"bframes"
,
&
val
);
if
(
val
.
i_int
>=
0
&&
val
.
i_int
<=
16
)
p_sys
->
param
.
i_bframe
=
val
.
i_int
;
if
(
val
.
i_int
>=
0
&&
val
.
i_int
<=
16
)
p_sys
->
param
.
i_bframe
=
val
.
i_int
;
#if X264_BUILD >= 23
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"bpyramid"
,
&
val
);
p_sys
->
param
.
b_bframe_pyramid
=
val
.
b_bool
;
#endif
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"frameref"
,
&
val
);
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"frameref"
,
&
val
);
if
(
val
.
i_int
>
0
&&
val
.
i_int
<=
15
)
if
(
val
.
i_int
>
0
&&
val
.
i_int
<=
15
)
p_sys
->
param
.
i_frame_reference
=
val
.
i_int
;
p_sys
->
param
.
i_frame_reference
=
val
.
i_int
;
...
@@ -267,6 +289,12 @@ static int Open ( vlc_object_t *p_this )
...
@@ -267,6 +289,12 @@ static int Open ( vlc_object_t *p_this )
p_sys
->
param
.
i_scenecut_threshold
=
val
.
i_int
;
p_sys
->
param
.
i_scenecut_threshold
=
val
.
i_int
;
#endif
#endif
#if X264_BUILD >= 23
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"subpel"
,
&
val
);
if
(
val
.
i_int
>=
1
&&
val
.
i_int
<=
5
)
p_sys
->
param
.
analyse
.
i_subpel_refine
=
val
.
i_int
;
#endif
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"analyse"
,
&
val
);
var_Get
(
p_enc
,
SOUT_CFG_PREFIX
"analyse"
,
&
val
);
if
(
!
strcmp
(
val
.
psz_string
,
"none"
)
)
if
(
!
strcmp
(
val
.
psz_string
,
"none"
)
)
{
{
...
@@ -283,8 +311,12 @@ static int Open ( vlc_object_t *p_this )
...
@@ -283,8 +311,12 @@ static int Open ( vlc_object_t *p_this )
}
}
else
if
(
!
strcmp
(
val
.
psz_string
,
"all"
)
)
else
if
(
!
strcmp
(
val
.
psz_string
,
"all"
)
)
{
{
#ifndef X264_ANALYSE_BSUB16x16
# define X264_ANALYSE_BSUB16x16 0
#endif
p_sys
->
param
.
analyse
.
inter
=
p_sys
->
param
.
analyse
.
inter
=
X264_ANALYSE_I4x4
|
X264_ANALYSE_PSUB16x16
|
X264_ANALYSE_PSUB8x8
;
X264_ANALYSE_I4x4
|
X264_ANALYSE_PSUB16x16
|
X264_ANALYSE_PSUB8x8
|
X264_ANALYSE_BSUB16x16
;
}
}
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
if
(
val
.
psz_string
)
free
(
val
.
psz_string
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment