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
2e5bde95
Commit
2e5bde95
authored
Apr 13, 2016
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: eliminate max_contexts
It is always equal to nb_slice_ctx.
parent
e3c9041c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
11 deletions
+2
-11
h264.c
libavcodec/h264.c
+1
-2
h264.h
libavcodec/h264.h
+0
-8
h264_slice.c
libavcodec/h264_slice.c
+1
-1
No files found.
libavcodec/h264.c
View file @
2e5bde95
...
...
@@ -808,7 +808,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
int
nals_needed
=
0
;
///< number of NALs that need decoding before the next frame thread starts
int
i
,
ret
=
0
;
h
->
max_contexts
=
h
->
nb_slice_ctx
;
if
(
!
(
avctx
->
flags2
&
AV_CODEC_FLAG2_CHUNKS
))
{
h
->
current_slice
=
0
;
if
(
!
h
->
first_field
)
...
...
@@ -935,7 +934,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size)
nal
->
type
,
nal
->
size_bits
);
}
if
(
context_count
==
h
->
max_contexts
)
{
if
(
context_count
==
h
->
nb_slice_ctx
)
{
ret
=
ff_h264_execute_decode_slices
(
h
,
context_count
);
if
(
ret
<
0
&&
(
h
->
avctx
->
err_recognition
&
AV_EF_EXPLODE
))
goto
end
;
...
...
libavcodec/h264.h
View file @
2e5bde95
...
...
@@ -584,14 +584,6 @@ typedef struct H264Context {
*/
int
current_slice
;
/**
* Max number of threads / contexts.
* This is equal to AVCodecContext.thread_count unless
* multithreaded decoding is impossible, in which case it is
* reduced to 1.
*/
int
max_contexts
;
/** @} */
/**
...
...
libavcodec/h264_slice.c
View file @
2e5bde95
...
...
@@ -1462,7 +1462,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
h
->
nal_ref_idc
==
0
))
sl
->
deblocking_filter
=
0
;
if
(
sl
->
deblocking_filter
==
1
&&
h
->
max_contexts
>
1
)
{
if
(
sl
->
deblocking_filter
==
1
&&
h
->
nb_slice_ctx
>
1
)
{
if
(
h
->
avctx
->
flags2
&
AV_CODEC_FLAG2_FAST
)
{
/* Cheat slightly for speed:
* Do not bother to deblock across slices. */
...
...
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