Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
326dff7d
Commit
326dff7d
authored
Apr 06, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ticket34
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bc604722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
mpeg4videoenc.c
libavcodec/mpeg4videoenc.c
+15
-3
No files found.
libavcodec/mpeg4videoenc.c
View file @
326dff7d
...
...
@@ -650,8 +650,6 @@ void mpeg4_encode_mb(MpegEncContext * s,
x
=
s
->
mb_x
*
16
;
y
=
s
->
mb_y
*
16
;
if
(
x
+
16
>
s
->
width
)
x
=
s
->
width
-
16
;
if
(
y
+
16
>
s
->
height
)
y
=
s
->
height
-
16
;
offset
=
x
+
y
*
s
->
linesize
;
p_pic
=
s
->
new_picture
.
data
[
0
]
+
offset
;
...
...
@@ -667,7 +665,21 @@ void mpeg4_encode_mb(MpegEncContext * s,
b_pic
=
pic
->
data
[
0
]
+
offset
;
if
(
pic
->
type
!=
FF_BUFFER_TYPE_SHARED
)
b_pic
+=
INPLACE_OFFSET
;
diff
=
s
->
dsp
.
sad
[
0
](
NULL
,
p_pic
,
b_pic
,
s
->
linesize
,
16
);
if
(
x
+
16
>
s
->
width
||
y
+
16
>
s
->
height
){
int
x1
,
y1
;
int
xe
=
FFMIN
(
16
,
s
->
width
-
x
);
int
ye
=
FFMIN
(
16
,
s
->
height
-
y
);
diff
=
0
;
for
(
y1
=
0
;
y1
<
ye
;
y1
++
){
for
(
x1
=
0
;
x1
<
xe
;
x1
++
){
diff
+=
FFABS
(
p_pic
[
x1
+
y1
*
s
->
linesize
]
-
b_pic
[
x1
+
y1
*
s
->
linesize
]);
}
}
diff
=
diff
*
256
/
(
xe
*
ye
);
}
else
{
diff
=
s
->
dsp
.
sad
[
0
](
NULL
,
p_pic
,
b_pic
,
s
->
linesize
,
16
);
}
if
(
diff
>
s
->
qscale
*
70
){
//FIXME check that 70 is optimal
s
->
mb_skipped
=
0
;
break
;
...
...
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