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
113aeee6
Commit
113aeee6
authored
Mar 28, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264_parser: move the H264DSPContext to the parser context
parent
3176217c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
h264_parser.c
libavcodec/h264_parser.c
+3
-3
No files found.
libavcodec/h264_parser.c
View file @
113aeee6
...
@@ -46,6 +46,7 @@ typedef struct H264ParseContext {
...
@@ -46,6 +46,7 @@ typedef struct H264ParseContext {
H264Context
h
;
H264Context
h
;
ParseContext
pc
;
ParseContext
pc
;
H264ParamSets
ps
;
H264ParamSets
ps
;
H264DSPContext
h264dsp
;
int
got_first
;
int
got_first
;
}
H264ParseContext
;
}
H264ParseContext
;
...
@@ -53,7 +54,6 @@ typedef struct H264ParseContext {
...
@@ -53,7 +54,6 @@ typedef struct H264ParseContext {
static
int
h264_find_frame_end
(
H264ParseContext
*
p
,
const
uint8_t
*
buf
,
static
int
h264_find_frame_end
(
H264ParseContext
*
p
,
const
uint8_t
*
buf
,
int
buf_size
)
int
buf_size
)
{
{
H264Context
*
h
=
&
p
->
h
;
int
i
;
int
i
;
uint32_t
state
;
uint32_t
state
;
ParseContext
*
pc
=
&
p
->
pc
;
ParseContext
*
pc
=
&
p
->
pc
;
...
@@ -64,7 +64,7 @@ static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
...
@@ -64,7 +64,7 @@ static int h264_find_frame_end(H264ParseContext *p, const uint8_t *buf,
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
for
(
i
=
0
;
i
<
buf_size
;
i
++
)
{
if
(
state
==
7
)
{
if
(
state
==
7
)
{
i
+=
h
->
h264dsp
.
startcode_find_candidate
(
buf
+
i
,
buf_size
-
i
);
i
+=
p
->
h264dsp
.
startcode_find_candidate
(
buf
+
i
,
buf_size
-
i
);
if
(
i
<
buf_size
)
if
(
i
<
buf_size
)
state
=
2
;
state
=
2
;
}
else
if
(
state
<=
2
)
{
}
else
if
(
state
<=
2
)
{
...
@@ -597,7 +597,7 @@ static av_cold int init(AVCodecParserContext *s)
...
@@ -597,7 +597,7 @@ static av_cold int init(AVCodecParserContext *s)
h
->
nb_slice_ctx
=
1
;
h
->
nb_slice_ctx
=
1
;
h
->
slice_context_count
=
1
;
h
->
slice_context_count
=
1
;
ff_h264dsp_init
(
&
h
->
h264dsp
,
8
,
1
);
ff_h264dsp_init
(
&
p
->
h264dsp
,
8
,
1
);
return
0
;
return
0
;
}
}
...
...
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