Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
e6dba5df
Commit
e6dba5df
authored
Apr 29, 2008
by
Ramiro Polla
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typo: distoration -> distortion.
Originally committed as revision 13019 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
34d71ebe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
14 deletions
+14
-14
avcodec.h
libavcodec/avcodec.h
+1
-1
dsputil.c
libavcodec/dsputil.c
+3
-3
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+10
-10
No files found.
libavcodec/avcodec.h
View file @
e6dba5df
...
@@ -1699,7 +1699,7 @@ typedef struct AVCodecContext {
...
@@ -1699,7 +1699,7 @@ typedef struct AVCodecContext {
int
mb_decision
;
int
mb_decision
;
#define FF_MB_DECISION_SIMPLE 0 ///< uses mb_cmp
#define FF_MB_DECISION_SIMPLE 0 ///< uses mb_cmp
#define FF_MB_DECISION_BITS 1 ///< chooses the one which needs the fewest bits
#define FF_MB_DECISION_BITS 1 ///< chooses the one which needs the fewest bits
#define FF_MB_DECISION_RD 2 ///< rate distor
a
tion
#define FF_MB_DECISION_RD 2 ///< rate distortion
/**
/**
* custom intra quantization matrix
* custom intra quantization matrix
...
...
libavcodec/dsputil.c
View file @
e6dba5df
...
@@ -3698,7 +3698,7 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int
...
@@ -3698,7 +3698,7 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int
DECLARE_ALIGNED_8
(
uint64_t
,
aligned_bak
[
stride
]);
DECLARE_ALIGNED_8
(
uint64_t
,
aligned_bak
[
stride
]);
DCTELEM
*
const
temp
=
(
DCTELEM
*
)
aligned_temp
;
DCTELEM
*
const
temp
=
(
DCTELEM
*
)
aligned_temp
;
uint8_t
*
const
bak
=
(
uint8_t
*
)
aligned_bak
;
uint8_t
*
const
bak
=
(
uint8_t
*
)
aligned_bak
;
int
i
,
last
,
run
,
bits
,
level
,
distor
a
tion
,
start_i
;
int
i
,
last
,
run
,
bits
,
level
,
distortion
,
start_i
;
const
int
esc_length
=
s
->
ac_esc_length
;
const
int
esc_length
=
s
->
ac_esc_length
;
uint8_t
*
length
;
uint8_t
*
length
;
uint8_t
*
last_length
;
uint8_t
*
last_length
;
...
@@ -3765,9 +3765,9 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int
...
@@ -3765,9 +3765,9 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int
s
->
dsp
.
idct_add
(
bak
,
stride
,
temp
);
s
->
dsp
.
idct_add
(
bak
,
stride
,
temp
);
distor
a
tion
=
s
->
dsp
.
sse
[
1
](
NULL
,
bak
,
src1
,
stride
,
8
);
distortion
=
s
->
dsp
.
sse
[
1
](
NULL
,
bak
,
src1
,
stride
,
8
);
return
distor
a
tion
+
((
bits
*
s
->
qscale
*
s
->
qscale
*
109
+
64
)
>>
7
);
return
distortion
+
((
bits
*
s
->
qscale
*
s
->
qscale
*
109
+
64
)
>>
7
);
}
}
static
int
bit8x8_c
(
/*MpegEncContext*/
void
*
c
,
uint8_t
*
src1
,
uint8_t
*
src2
,
int
stride
,
int
h
){
static
int
bit8x8_c
(
/*MpegEncContext*/
void
*
c
,
uint8_t
*
src1
,
uint8_t
*
src2
,
int
stride
,
int
h
){
...
...
libavcodec/mpegvideo_enc.c
View file @
e6dba5df
...
@@ -2742,7 +2742,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
...
@@ -2742,7 +2742,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
s
->
me
.
scene_change_score
=
0
;
s
->
me
.
scene_change_score
=
0
;
// s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME rate
distora
tion
// s->lambda= s->current_picture_ptr->quality; //FIXME qscale / ... stuff for ME rate
distor
tion
if
(
s
->
pict_type
==
FF_I_TYPE
){
if
(
s
->
pict_type
==
FF_I_TYPE
){
if
(
s
->
msmpeg4_version
>=
3
)
s
->
no_rounding
=
1
;
if
(
s
->
msmpeg4_version
>=
3
)
s
->
no_rounding
=
1
;
...
@@ -3078,7 +3078,7 @@ int dct_quantize_trellis_c(MpegEncContext *s,
...
@@ -3078,7 +3078,7 @@ int dct_quantize_trellis_c(MpegEncContext *s,
survivor_count
=
1
;
survivor_count
=
1
;
for
(
i
=
start_i
;
i
<=
last_non_zero
;
i
++
){
for
(
i
=
start_i
;
i
<=
last_non_zero
;
i
++
){
int
level_index
,
j
,
zero_distor
a
tion
;
int
level_index
,
j
,
zero_distortion
;
int
dct_coeff
=
FFABS
(
block
[
scantable
[
i
]
]);
int
dct_coeff
=
FFABS
(
block
[
scantable
[
i
]
]);
int
best_score
=
256
*
256
*
256
*
120
;
int
best_score
=
256
*
256
*
256
*
120
;
...
@@ -3088,10 +3088,10 @@ int dct_quantize_trellis_c(MpegEncContext *s,
...
@@ -3088,10 +3088,10 @@ int dct_quantize_trellis_c(MpegEncContext *s,
#endif
#endif
)
)
dct_coeff
=
(
dct_coeff
*
inv_aanscales
[
scantable
[
i
]
])
>>
12
;
dct_coeff
=
(
dct_coeff
*
inv_aanscales
[
scantable
[
i
]
])
>>
12
;
zero_distor
a
tion
=
dct_coeff
*
dct_coeff
;
zero_distortion
=
dct_coeff
*
dct_coeff
;
for
(
level_index
=
0
;
level_index
<
coeff_count
[
i
];
level_index
++
){
for
(
level_index
=
0
;
level_index
<
coeff_count
[
i
];
level_index
++
){
int
distor
a
tion
;
int
distortion
;
int
level
=
coeff
[
level_index
][
i
];
int
level
=
coeff
[
level_index
][
i
];
const
int
alevel
=
FFABS
(
level
);
const
int
alevel
=
FFABS
(
level
);
int
unquant_coeff
;
int
unquant_coeff
;
...
@@ -3112,12 +3112,12 @@ int dct_quantize_trellis_c(MpegEncContext *s,
...
@@ -3112,12 +3112,12 @@ int dct_quantize_trellis_c(MpegEncContext *s,
unquant_coeff
<<=
3
;
unquant_coeff
<<=
3
;
}
}
distor
ation
=
(
unquant_coeff
-
dct_coeff
)
*
(
unquant_coeff
-
dct_coeff
)
-
zero_distora
tion
;
distor
tion
=
(
unquant_coeff
-
dct_coeff
)
*
(
unquant_coeff
-
dct_coeff
)
-
zero_distor
tion
;
level
+=
64
;
level
+=
64
;
if
((
level
&
(
~
127
))
==
0
){
if
((
level
&
(
~
127
))
==
0
){
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
int
run
=
i
-
survivor
[
j
];
int
run
=
i
-
survivor
[
j
];
int
score
=
distor
a
tion
+
length
[
UNI_AC_ENC_INDEX
(
run
,
level
)]
*
lambda
;
int
score
=
distortion
+
length
[
UNI_AC_ENC_INDEX
(
run
,
level
)]
*
lambda
;
score
+=
score_tab
[
i
-
run
];
score
+=
score_tab
[
i
-
run
];
if
(
score
<
best_score
){
if
(
score
<
best_score
){
...
@@ -3130,7 +3130,7 @@ int dct_quantize_trellis_c(MpegEncContext *s,
...
@@ -3130,7 +3130,7 @@ int dct_quantize_trellis_c(MpegEncContext *s,
if
(
s
->
out_format
==
FMT_H263
){
if
(
s
->
out_format
==
FMT_H263
){
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
int
run
=
i
-
survivor
[
j
];
int
run
=
i
-
survivor
[
j
];
int
score
=
distor
a
tion
+
last_length
[
UNI_AC_ENC_INDEX
(
run
,
level
)]
*
lambda
;
int
score
=
distortion
+
last_length
[
UNI_AC_ENC_INDEX
(
run
,
level
)]
*
lambda
;
score
+=
score_tab
[
i
-
run
];
score
+=
score_tab
[
i
-
run
];
if
(
score
<
last_score
){
if
(
score
<
last_score
){
last_score
=
score
;
last_score
=
score
;
...
@@ -3141,10 +3141,10 @@ int dct_quantize_trellis_c(MpegEncContext *s,
...
@@ -3141,10 +3141,10 @@ int dct_quantize_trellis_c(MpegEncContext *s,
}
}
}
}
}
else
{
}
else
{
distor
a
tion
+=
esc_length
*
lambda
;
distortion
+=
esc_length
*
lambda
;
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
int
run
=
i
-
survivor
[
j
];
int
run
=
i
-
survivor
[
j
];
int
score
=
distor
a
tion
+
score_tab
[
i
-
run
];
int
score
=
distortion
+
score_tab
[
i
-
run
];
if
(
score
<
best_score
){
if
(
score
<
best_score
){
best_score
=
score
;
best_score
=
score
;
...
@@ -3156,7 +3156,7 @@ int dct_quantize_trellis_c(MpegEncContext *s,
...
@@ -3156,7 +3156,7 @@ int dct_quantize_trellis_c(MpegEncContext *s,
if
(
s
->
out_format
==
FMT_H263
){
if
(
s
->
out_format
==
FMT_H263
){
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
for
(
j
=
survivor_count
-
1
;
j
>=
0
;
j
--
){
int
run
=
i
-
survivor
[
j
];
int
run
=
i
-
survivor
[
j
];
int
score
=
distor
a
tion
+
score_tab
[
i
-
run
];
int
score
=
distortion
+
score_tab
[
i
-
run
];
if
(
score
<
last_score
){
if
(
score
<
last_score
){
last_score
=
score
;
last_score
=
score
;
last_run
=
run
;
last_run
=
run
;
...
...
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