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
8e6511c1
Commit
8e6511c1
authored
Sep 07, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proresdec2: avoid VLA and use SliceContext instead.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
af2a17c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
proresdec.h
libavcodec/proresdec.h
+1
-0
proresdec2.c
libavcodec/proresdec2.c
+6
-4
No files found.
libavcodec/proresdec.h
View file @
8e6511c1
...
...
@@ -31,6 +31,7 @@ typedef struct {
unsigned
mb_y
;
unsigned
mb_count
;
unsigned
data_size
;
int
ret
;
}
SliceContext
;
typedef
struct
{
...
...
libavcodec/proresdec2.c
View file @
8e6511c1
...
...
@@ -431,6 +431,7 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int
int16_t
qmat_chroma_scaled
[
64
];
int
mb_x_shift
;
slice
->
ret
=
-
1
;
//av_log(avctx, AV_LOG_INFO, "slice %d mb width %d mb x %d y %d\n",
// jobnr, slice->mb_count, slice->mb_x, slice->mb_y);
...
...
@@ -494,19 +495,20 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int
qmat_chroma_scaled
,
log2_chroma_blocks_per_mb
);
}
slice
->
ret
=
0
;
return
0
;
}
static
int
decode_picture
(
AVCodecContext
*
avctx
)
{
ProresContext
*
ctx
=
avctx
->
priv_data
;
int
i
,
threads_ret
[
ctx
->
slice_count
]
;
int
i
;
avctx
->
execute2
(
avctx
,
decode_slice_thread
,
NULL
,
threads_ret
,
ctx
->
slice_count
);
avctx
->
execute2
(
avctx
,
decode_slice_thread
,
NULL
,
NULL
,
ctx
->
slice_count
);
for
(
i
=
0
;
i
<
ctx
->
slice_count
;
i
++
)
if
(
threads_ret
[
i
]
<
0
)
return
threads_ret
[
i
]
;
if
(
ctx
->
slices
[
i
].
ret
<
0
)
return
ctx
->
slices
[
i
].
ret
;
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