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
743e1df5
Commit
743e1df5
authored
Sep 20, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prores: Simplify code further
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
ecb0edd9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
proresdec.c
libavcodec/proresdec.c
+12
-13
No files found.
libavcodec/proresdec.c
View file @
743e1df5
...
...
@@ -459,7 +459,7 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int
SliceContext
*
slice
=
&
ctx
->
slices
[
jobnr
];
const
uint8_t
*
buf
=
slice
->
data
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
int
i
,
hdr_size
,
qscale
;
int
i
,
hdr_size
,
qscale
,
log2_chroma_blocks_per_mb
;
int
luma_stride
,
chroma_stride
;
int
y_data_size
,
u_data_size
,
v_data_size
;
uint8_t
*
dest_y
,
*
dest_u
,
*
dest_v
;
...
...
@@ -498,7 +498,14 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int
chroma_stride
=
pic
->
linesize
[
1
]
<<
1
;
}
mb_x_shift
=
(
avctx
->
pix_fmt
==
PIX_FMT_YUV444P10
)
?
5
:
4
;
if
(
avctx
->
pix_fmt
==
PIX_FMT_YUV444P10
)
{
mb_x_shift
=
5
;
log2_chroma_blocks_per_mb
=
2
;
}
else
{
mb_x_shift
=
4
;
log2_chroma_blocks_per_mb
=
1
;
}
dest_y
=
pic
->
data
[
0
]
+
(
slice
->
mb_y
<<
4
)
*
luma_stride
+
(
slice
->
mb_x
<<
5
);
dest_u
=
pic
->
data
[
1
]
+
(
slice
->
mb_y
<<
4
)
*
chroma_stride
+
(
slice
->
mb_x
<<
mb_x_shift
);
dest_v
=
pic
->
data
[
2
]
+
(
slice
->
mb_y
<<
4
)
*
chroma_stride
+
(
slice
->
mb_x
<<
mb_x_shift
);
...
...
@@ -512,21 +519,13 @@ static int decode_slice_thread(AVCodecContext *avctx, void *arg, int jobnr, int
decode_slice_luma
(
avctx
,
slice
,
dest_y
,
luma_stride
,
buf
,
y_data_size
,
qmat_luma_scaled
);
if
((
avctx
->
flags
&
CODEC_FLAG_GRAY
))
{
}
else
if
(
avctx
->
pix_fmt
==
PIX_FMT_YUV444P10
)
{
decode_slice_chroma
(
avctx
,
slice
,
dest_u
,
chroma_stride
,
buf
+
y_data_size
,
u_data_size
,
qmat_chroma_scaled
,
2
);
decode_slice_chroma
(
avctx
,
slice
,
dest_v
,
chroma_stride
,
buf
+
y_data_size
+
u_data_size
,
v_data_size
,
qmat_chroma_scaled
,
2
);
}
else
{
if
(
!
(
avctx
->
flags
&
CODEC_FLAG_GRAY
))
{
decode_slice_chroma
(
avctx
,
slice
,
dest_u
,
chroma_stride
,
buf
+
y_data_size
,
u_data_size
,
qmat_chroma_scaled
,
1
);
qmat_chroma_scaled
,
log2_chroma_blocks_per_mb
);
decode_slice_chroma
(
avctx
,
slice
,
dest_v
,
chroma_stride
,
buf
+
y_data_size
+
u_data_size
,
v_data_size
,
qmat_chroma_scaled
,
1
);
qmat_chroma_scaled
,
log2_chroma_blocks_per_mb
);
}
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