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
6bb925f4
Commit
6bb925f4
authored
Oct 31, 2002
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dont call emms_c() for each MB
Originally committed as revision 1127 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0aa7875a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
mpegvideo.c
libavcodec/mpegvideo.c
+4
-5
utils.c
libavcodec/utils.c
+6
-0
No files found.
libavcodec/mpegvideo.c
View file @
6bb925f4
...
...
@@ -1819,7 +1819,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
/* if previous was skipped too, then nothing to do !
skip only during decoding as we might trash the buffers during encoding a bit */
if
(
*
mbskip_ptr
>=
s
->
ip_buffer_count
&&
!
s
->
encoding
)
goto
the_end
;
return
;
}
else
{
*
mbskip_ptr
=
0
;
/* not skipped */
}
...
...
@@ -1866,7 +1866,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
/* skip dequant / idct if we are really late ;) */
if
(
s
->
hurry_up
>
1
)
goto
the_end
;
if
(
s
->
hurry_up
>
1
)
return
;
/* add dct residue */
if
(
s
->
encoding
||
!
(
s
->
mpeg2
||
s
->
h263_msmpeg4
||
s
->
codec_id
==
CODEC_ID_MPEG1VIDEO
...
...
@@ -1916,8 +1916,6 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
}
}
}
the_end
:
emms_c
();
//FIXME remove
}
static
inline
void
dct_single_coeff_elimination
(
MpegEncContext
*
s
,
int
n
,
int
threshold
)
...
...
@@ -2574,7 +2572,6 @@ static void encode_picture(MpegEncContext *s, int picture_number)
// s->mb_type[mb_y*s->mb_width + mb_x]=MB_TYPE_INTER;
}
}
emms_c
();
}
else
/* if(s->pict_type == I_TYPE) */
{
/* I-Frame */
//FIXME do we need to zero them?
...
...
@@ -2601,6 +2598,8 @@ static void encode_picture(MpegEncContext *s, int picture_number)
}
}
}
emms_c
();
if
(
s
->
scene_change_score
>
0
&&
s
->
pict_type
==
P_TYPE
){
s
->
pict_type
=
I_TYPE
;
memset
(
s
->
mb_type
,
MB_TYPE_INTRA
,
sizeof
(
UINT8
)
*
s
->
mb_width
*
s
->
mb_height
);
...
...
libavcodec/utils.c
View file @
6bb925f4
...
...
@@ -120,6 +120,9 @@ int avcodec_encode_video(AVCodecContext *avctx, UINT8 *buf, int buf_size,
int
ret
;
ret
=
avctx
->
codec
->
encode
(
avctx
,
buf
,
buf_size
,
(
void
*
)
pict
);
emms_c
();
//needed to avoid a emms_c() call before every return;
avctx
->
frame_number
++
;
return
ret
;
}
...
...
@@ -135,6 +138,9 @@ int avcodec_decode_video(AVCodecContext *avctx, AVPicture *picture,
ret
=
avctx
->
codec
->
decode
(
avctx
,
picture
,
got_picture_ptr
,
buf
,
buf_size
);
emms_c
();
//needed to avoid a emms_c() call before every return;
if
(
*
got_picture_ptr
)
avctx
->
frame_number
++
;
return
ret
;
...
...
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