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
f7114249
Commit
f7114249
authored
Mar 24, 2011
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg12.c: fix slice threading for mpeg2 field picture mode.
Fixes "make THREADS=2 fate-mpeg2-field-enc".
parent
cd256c3b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
mpeg12.c
libavcodec/mpeg12.c
+13
-1
No files found.
libavcodec/mpeg12.c
View file @
f7114249
...
@@ -1882,7 +1882,9 @@ static int slice_decode_thread(AVCodecContext *c, void *arg){
...
@@ -1882,7 +1882,9 @@ static int slice_decode_thread(AVCodecContext *c, void *arg){
start_code
=
-
1
;
start_code
=
-
1
;
buf
=
ff_find_start_code
(
buf
,
s
->
gb
.
buffer_end
,
&
start_code
);
buf
=
ff_find_start_code
(
buf
,
s
->
gb
.
buffer_end
,
&
start_code
);
mb_y
=
start_code
-
SLICE_MIN_START_CODE
;
mb_y
=
(
start_code
-
SLICE_MIN_START_CODE
)
<<
field_pic
;
if
(
s
->
picture_structure
==
PICT_BOTTOM_FIELD
)
mb_y
++
;
if
(
mb_y
<
0
||
mb_y
>=
s
->
end_mb_y
)
if
(
mb_y
<
0
||
mb_y
>=
s
->
end_mb_y
)
return
-
1
;
return
-
1
;
}
}
...
@@ -2299,6 +2301,16 @@ static int decode_chunks(AVCodecContext *avctx,
...
@@ -2299,6 +2301,16 @@ static int decode_chunks(AVCodecContext *avctx,
break
;
break
;
case
PICTURE_START_CODE
:
case
PICTURE_START_CODE
:
if
(
avctx
->
thread_count
>
1
&&
s
->
slice_count
)
{
int
i
;
avctx
->
execute
(
avctx
,
slice_decode_thread
,
s2
->
thread_context
,
NULL
,
s
->
slice_count
,
sizeof
(
void
*
));
for
(
i
=
0
;
i
<
s
->
slice_count
;
i
++
)
s2
->
error_count
+=
s2
->
thread_context
[
i
]
->
error_count
;
s
->
slice_count
=
0
;
}
if
(
last_code
==
0
||
last_code
==
SLICE_MIN_START_CODE
){
if
(
last_code
==
0
||
last_code
==
SLICE_MIN_START_CODE
){
if
(
mpeg_decode_postinit
(
avctx
)
<
0
){
if
(
mpeg_decode_postinit
(
avctx
)
<
0
){
av_log
(
avctx
,
AV_LOG_ERROR
,
"mpeg_decode_postinit() failure
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"mpeg_decode_postinit() failure
\n
"
);
...
...
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