Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
b3f858b8
Commit
b3f858b8
authored
11 years ago
by
Timothy Gu
Committed by
Michael Niedermayer
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
libxvid: cosmetics: Realign the code
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
f118b417
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/libxvid.c
+33
-34
33 additions, 34 deletions
libavcodec/libxvid.c
with
33 additions
and
34 deletions
libavcodec/libxvid.c
+
33
−
34
View file @
b3f858b8
...
@@ -356,48 +356,47 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
...
@@ -356,48 +356,47 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
uint16_t
*
intra
,
*
inter
;
uint16_t
*
intra
,
*
inter
;
int
fd
;
int
fd
;
xvid_plugin_single_t
single
=
{
0
};
xvid_plugin_single_t
single
=
{
0
};
struct
xvid_ff_pass1
rc2pass1
=
{
0
};
struct
xvid_ff_pass1
rc2pass1
=
{
0
};
xvid_plugin_2pass2_t
rc2pass2
=
{
0
};
xvid_plugin_2pass2_t
rc2pass2
=
{
0
};
xvid_plugin_lumimasking_t
masking_l
=
{
0
};
/* For lumi masking */
xvid_plugin_lumimasking_t
masking_l
=
{
0
};
/* For lumi masking */
xvid_plugin_lumimasking_t
masking_v
=
{
0
};
/* For variance AQ */
xvid_plugin_lumimasking_t
masking_v
=
{
0
};
/* For variance AQ */
xvid_plugin_ssim_t
ssim
=
{
0
};
xvid_plugin_ssim_t
ssim
=
{
0
};
xvid_gbl_init_t
xvid_gbl_init
=
{
0
};
xvid_gbl_init_t
xvid_gbl_init
=
{
0
};
xvid_enc_create_t
xvid_enc_create
=
{
0
};
xvid_enc_create_t
xvid_enc_create
=
{
0
};
xvid_enc_plugin_t
plugins
[
7
];
xvid_enc_plugin_t
plugins
[
7
];
x
->
twopassfd
=
-
1
;
x
->
twopassfd
=
-
1
;
/* Bring in VOP flags from ffmpeg command-line */
/* Bring in VOP flags from ffmpeg command-line */
x
->
vop_flags
=
XVID_VOP_HALFPEL
;
/* Bare minimum quality */
x
->
vop_flags
=
XVID_VOP_HALFPEL
;
/* Bare minimum quality */
if
(
xvid_flags
&
CODEC_FLAG_4MV
)
if
(
xvid_flags
&
CODEC_FLAG_4MV
)
x
->
vop_flags
|=
XVID_VOP_INTER4V
;
/* Level 3 */
x
->
vop_flags
|=
XVID_VOP_INTER4V
;
/* Level 3 */
if
(
avctx
->
trellis
if
(
avctx
->
trellis
)
)
x
->
vop_flags
|=
XVID_VOP_TRELLISQUANT
;
/* Level 5 */
x
->
vop_flags
|=
XVID_VOP_TRELLISQUANT
;
/* Level 5 */
if
(
xvid_flags
&
CODEC_FLAG_AC_PRED
)
if
(
xvid_flags
&
CODEC_FLAG_AC_PRED
)
x
->
vop_flags
|=
XVID_VOP_HQACPRED
;
/* Level 6 */
x
->
vop_flags
|=
XVID_VOP_HQACPRED
;
/* Level 6 */
if
(
xvid_flags
&
CODEC_FLAG_GRAY
)
if
(
xvid_flags
&
CODEC_FLAG_GRAY
)
x
->
vop_flags
|=
XVID_VOP_GREYSCALE
;
x
->
vop_flags
|=
XVID_VOP_GREYSCALE
;
/* Decide which ME quality setting to use */
/* Decide which ME quality setting to use */
x
->
me_flags
=
0
;
x
->
me_flags
=
0
;
switch
(
avctx
->
me_method
)
{
switch
(
avctx
->
me_method
)
{
case
ME_FULL
:
/* Quality 6 */
case
ME_FULL
:
/* Quality 6 */
x
->
me_flags
|=
XVID_ME_EXTSEARCH16
x
->
me_flags
|=
XVID_ME_EXTSEARCH16
|
XVID_ME_EXTSEARCH8
;
|
XVID_ME_EXTSEARCH8
;
case
ME_EPZS
:
/* Quality 4 */
case
ME_EPZS
:
/* Quality 4 */
x
->
me_flags
|=
XVID_ME_ADVANCEDDIAMOND8
x
->
me_flags
|=
XVID_ME_ADVANCEDDIAMOND8
|
XVID_ME_HALFPELREFINE8
|
XVID_ME_HALFPELREFINE8
|
XVID_ME_CHROMA_PVOP
|
XVID_ME_CHROMA_PVOP
|
XVID_ME_CHROMA_BVOP
;
|
XVID_ME_CHROMA_BVOP
;
case
ME_LOG
:
/* Quality 2 */
case
ME_LOG
:
/* Quality 2 */
case
ME_PHODS
:
case
ME_PHODS
:
case
ME_X1
:
case
ME_X1
:
x
->
me_flags
|=
XVID_ME_ADVANCEDDIAMOND16
x
->
me_flags
|=
XVID_ME_ADVANCEDDIAMOND16
|
XVID_ME_HALFPELREFINE16
;
|
XVID_ME_HALFPELREFINE16
;
case
ME_ZERO
:
/* Quality 0 */
case
ME_ZERO
:
/* Quality 0 */
default:
default:
...
@@ -408,15 +407,15 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
...
@@ -408,15 +407,15 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
switch
(
avctx
->
mb_decision
)
{
switch
(
avctx
->
mb_decision
)
{
case
2
:
case
2
:
x
->
vop_flags
|=
XVID_VOP_MODEDECISION_RD
;
x
->
vop_flags
|=
XVID_VOP_MODEDECISION_RD
;
x
->
me_flags
|=
XVID_ME_HALFPELREFINE8_RD
x
->
me_flags
|=
XVID_ME_HALFPELREFINE8_RD
|
XVID_ME_QUARTERPELREFINE8_RD
|
XVID_ME_QUARTERPELREFINE8_RD
|
XVID_ME_EXTSEARCH_RD
|
XVID_ME_EXTSEARCH_RD
|
XVID_ME_CHECKPREDICTION_RD
;
|
XVID_ME_CHECKPREDICTION_RD
;
case
1
:
case
1
:
if
(
!
(
x
->
vop_flags
&
XVID_VOP_MODEDECISION_RD
)
)
if
(
!
(
x
->
vop_flags
&
XVID_VOP_MODEDECISION_RD
)
)
x
->
vop_flags
|=
XVID_VOP_FAST_MODEDECISION_RD
;
x
->
vop_flags
|=
XVID_VOP_FAST_MODEDECISION_RD
;
x
->
me_flags
|=
XVID_ME_HALFPELREFINE16_RD
x
->
me_flags
|=
XVID_ME_HALFPELREFINE16_RD
|
XVID_ME_QUARTERPELREFINE16_RD
;
|
XVID_ME_QUARTERPELREFINE16_RD
;
default:
default:
break
;
break
;
...
@@ -425,12 +424,12 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
...
@@ -425,12 +424,12 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx) {
/* Bring in VOL flags from ffmpeg command-line */
/* Bring in VOL flags from ffmpeg command-line */
x
->
vol_flags
=
0
;
x
->
vol_flags
=
0
;
if
(
xvid_flags
&
CODEC_FLAG_GMC
)
{
if
(
xvid_flags
&
CODEC_FLAG_GMC
)
{
x
->
vol_flags
|=
XVID_VOL_GMC
;
x
->
vol_flags
|=
XVID_VOL_GMC
;
x
->
me_flags
|=
XVID_ME_GME_REFINE
;
x
->
me_flags
|=
XVID_ME_GME_REFINE
;
}
}
if
(
xvid_flags
&
CODEC_FLAG_QPEL
)
{
if
(
xvid_flags
&
CODEC_FLAG_QPEL
)
{
x
->
vol_flags
|=
XVID_VOL_QUARTERPEL
;
x
->
vol_flags
|=
XVID_VOL_QUARTERPEL
;
x
->
me_flags
|=
XVID_ME_QUARTERPELREFINE16
;
x
->
me_flags
|=
XVID_ME_QUARTERPELREFINE16
;
if
(
x
->
vop_flags
&
XVID_VOP_INTER4V
)
if
(
x
->
vop_flags
&
XVID_VOP_INTER4V
)
x
->
me_flags
|=
XVID_ME_QUARTERPELREFINE8
;
x
->
me_flags
|=
XVID_ME_QUARTERPELREFINE8
;
}
}
...
...
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