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
e3c2d0f3
Commit
e3c2d0f3
authored
Feb 28, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
h264: Replace mpegvideo-specific MAX_THREADS by private define
parent
5d1c2e53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
h264.c
libavcodec/h264.c
+4
-4
h264.h
libavcodec/h264.h
+2
-1
No files found.
libavcodec/h264.c
View file @
e3c2d0f3
...
...
@@ -1195,7 +1195,7 @@ static void free_tables(H264Context *h, int free_rbsp)
h
->
cur_pic_ptr
=
NULL
;
for
(
i
=
0
;
i
<
MAX_THREADS
;
i
++
)
{
for
(
i
=
0
;
i
<
H264_
MAX_THREADS
;
i
++
)
{
hx
=
h
->
thread_context
[
i
];
if
(
!
hx
)
continue
;
...
...
@@ -3224,12 +3224,12 @@ static int h264_slice_header_init(H264Context *h, int reinit)
return
ret
;
}
if
(
nb_slices
>
MAX_THREADS
||
(
nb_slices
>
h
->
mb_height
&&
h
->
mb_height
))
{
if
(
nb_slices
>
H264_
MAX_THREADS
||
(
nb_slices
>
h
->
mb_height
&&
h
->
mb_height
))
{
int
max_slices
;
if
(
h
->
mb_height
)
max_slices
=
FFMIN
(
MAX_THREADS
,
h
->
mb_height
);
max_slices
=
FFMIN
(
H264_
MAX_THREADS
,
h
->
mb_height
);
else
max_slices
=
MAX_THREADS
;
max_slices
=
H264_
MAX_THREADS
;
av_log
(
h
->
avctx
,
AV_LOG_WARNING
,
"too many threads/slices %d,"
" reducing to %d
\n
"
,
nb_slices
,
max_slices
);
nb_slices
=
max_slices
;
...
...
libavcodec/h264.h
View file @
e3c2d0f3
...
...
@@ -40,6 +40,7 @@
#include "rectangle.h"
#define H264_MAX_PICTURE_COUNT 32
#define H264_MAX_THREADS 16
#define MAX_SPS_COUNT 32
#define MAX_PPS_COUNT 256
...
...
@@ -580,7 +581,7 @@ typedef struct H264Context {
* @name Members for slice based multithreading
* @{
*/
struct
H264Context
*
thread_context
[
MAX_THREADS
];
struct
H264Context
*
thread_context
[
H264_
MAX_THREADS
];
/**
* current slice number, used to initalize slice_num of each thread/context
...
...
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