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
1bd024ec
Commit
1bd024ec
authored
Nov 13, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg4videodec: split static decoder table init out
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c74cd999
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
mpeg4video.h
libavcodec/mpeg4video.h
+1
-0
mpeg4videodec.c
libavcodec/mpeg4videodec.c
+18
-14
No files found.
libavcodec/mpeg4video.h
View file @
1bd024ec
...
...
@@ -101,6 +101,7 @@ int ff_mpeg4_decode_partitions(MpegEncContext *s);
int
ff_mpeg4_get_video_packet_prefix_length
(
MpegEncContext
*
s
);
int
ff_mpeg4_decode_video_packet_header
(
MpegEncContext
*
s
);
void
ff_mpeg4_init_direct_mv
(
MpegEncContext
*
s
);
int
ff_mpeg4videodec_static_init
(
void
);
/**
*
...
...
libavcodec/mpeg4videodec.c
View file @
1bd024ec
...
...
@@ -2255,23 +2255,10 @@ end:
return
decode_vop_header
(
s
,
gb
);
}
static
av_cold
int
decode_init
(
AVCodecContext
*
avctx
)
{
MpegEncContext
*
s
=
avctx
->
priv_data
;
int
ret
;
av_cold
int
ff_mpeg4videodec_static_init
(
void
)
{
static
int
done
=
0
;
s
->
divx_version
=
s
->
divx_build
=
s
->
xvid_build
=
s
->
lavc_build
=
-
1
;
if
((
ret
=
ff_h263_decode_init
(
avctx
))
<
0
)
return
ret
;
if
(
!
done
)
{
done
=
1
;
ff_init_rl
(
&
ff_mpeg4_rl_intra
,
ff_mpeg4_static_rl_table_store
[
0
]);
ff_init_rl
(
&
ff_rvlc_rl_inter
,
ff_mpeg4_static_rl_table_store
[
1
]);
ff_init_rl
(
&
ff_rvlc_rl_intra
,
ff_mpeg4_static_rl_table_store
[
2
]);
...
...
@@ -2290,7 +2277,24 @@ static av_cold int decode_init(AVCodecContext *avctx)
INIT_VLC_STATIC
(
&
mb_type_b_vlc
,
MB_TYPE_B_VLC_BITS
,
4
,
&
ff_mb_type_b_tab
[
0
][
1
],
2
,
1
,
&
ff_mb_type_b_tab
[
0
][
0
],
2
,
1
,
16
);
done
=
1
;
}
}
static
av_cold
int
decode_init
(
AVCodecContext
*
avctx
)
{
MpegEncContext
*
s
=
avctx
->
priv_data
;
int
ret
;
s
->
divx_version
=
s
->
divx_build
=
s
->
xvid_build
=
s
->
lavc_build
=
-
1
;
if
((
ret
=
ff_h263_decode_init
(
avctx
))
<
0
)
return
ret
;
ff_mpeg4videodec_static_init
();
s
->
h263_pred
=
1
;
s
->
low_delay
=
0
;
//default, might be overridden in the vol header during header parsing
...
...
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