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
02734c6a
Commit
02734c6a
authored
22 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
print frame decoding time support (x86 only)
Originally committed as revision 504 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
83286d2a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/h263dec.c
+18
-2
18 additions, 2 deletions
libavcodec/h263dec.c
with
18 additions
and
2 deletions
libavcodec/h263dec.c
+
18
−
2
View file @
02734c6a
...
@@ -24,6 +24,18 @@
...
@@ -24,6 +24,18 @@
#include
"mpegvideo.h"
#include
"mpegvideo.h"
//#define DEBUG
//#define DEBUG
//#define PRINT_FRAME_TIME
#ifdef PRINT_FRAME_TIME
static
inline
long
long
rdtsc
()
{
long
long
l
;
asm
volatile
(
"rdtsc
\n\t
"
:
"=A"
(
l
)
);
// printf("%d\n", int(l/1000));
return
l
;
}
#endif
static
int
h263_decode_init
(
AVCodecContext
*
avctx
)
static
int
h263_decode_init
(
AVCodecContext
*
avctx
)
{
{
...
@@ -103,7 +115,9 @@ static int h263_decode_frame(AVCodecContext *avctx,
...
@@ -103,7 +115,9 @@ static int h263_decode_frame(AVCodecContext *avctx,
MpegEncContext
*
s
=
avctx
->
priv_data
;
MpegEncContext
*
s
=
avctx
->
priv_data
;
int
ret
;
int
ret
;
AVPicture
*
pict
=
data
;
AVPicture
*
pict
=
data
;
#ifdef PRINT_FRAME_TIME
uint64_t
time
=
rdtsc
();
#endif
#ifdef DEBUG
#ifdef DEBUG
printf
(
"*****frame %d size=%d
\n
"
,
avctx
->
frame_number
,
buf_size
);
printf
(
"*****frame %d size=%d
\n
"
,
avctx
->
frame_number
,
buf_size
);
printf
(
"bytes=%x %x %x %x
\n
"
,
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
]);
printf
(
"bytes=%x %x %x %x
\n
"
,
buf
[
0
],
buf
[
1
],
buf
[
2
],
buf
[
3
]);
...
@@ -317,7 +331,9 @@ static int h263_decode_frame(AVCodecContext *avctx,
...
@@ -317,7 +331,9 @@ static int h263_decode_frame(AVCodecContext *avctx,
note we allready added +1 for the current pix in MPV_frame_end(s) */
note we allready added +1 for the current pix in MPV_frame_end(s) */
if
(
s
->
num_available_buffers
>=
2
||
(
!
s
->
has_b_frames
))
if
(
s
->
num_available_buffers
>=
2
||
(
!
s
->
has_b_frames
))
*
data_size
=
sizeof
(
AVPicture
);
*
data_size
=
sizeof
(
AVPicture
);
#ifdef PRINT_FRAME_TIME
printf
(
"%Ld
\n
"
,
rdtsc
()
-
time
);
#endif
return
buf_size
;
return
buf_size
;
}
}
...
...
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