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
189db9c9
Commit
189db9c9
authored
May 25, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffv1: fix 16bits multithreading
fixes ticket237 Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
feae7ad2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
ffv1.c
libavcodec/ffv1.c
+10
-8
No files found.
libavcodec/ffv1.c
View file @
189db9c9
...
...
@@ -1146,6 +1146,7 @@ static int encode_slice(AVCodecContext *c, void *arg){
int
x
=
fs
->
slice_x
;
int
y
=
fs
->
slice_y
;
AVFrame
*
const
p
=
&
f
->
picture
;
const
int
ps
=
(
c
->
bits_per_raw_sample
>
8
)
+
1
;
if
(
f
->
colorspace
==
0
){
const
int
chroma_width
=
-
((
-
width
)
>>
f
->
chroma_h_shift
);
...
...
@@ -1153,12 +1154,12 @@ static int encode_slice(AVCodecContext *c, void *arg){
const
int
cx
=
x
>>
f
->
chroma_h_shift
;
const
int
cy
=
y
>>
f
->
chroma_v_shift
;
encode_plane
(
fs
,
p
->
data
[
0
]
+
x
+
y
*
p
->
linesize
[
0
],
width
,
height
,
p
->
linesize
[
0
],
0
);
encode_plane
(
fs
,
p
->
data
[
0
]
+
ps
*
x
+
y
*
p
->
linesize
[
0
],
width
,
height
,
p
->
linesize
[
0
],
0
);
encode_plane
(
fs
,
p
->
data
[
1
]
+
cx
+
cy
*
p
->
linesize
[
1
],
chroma_width
,
chroma_height
,
p
->
linesize
[
1
],
1
);
encode_plane
(
fs
,
p
->
data
[
2
]
+
cx
+
cy
*
p
->
linesize
[
2
],
chroma_width
,
chroma_height
,
p
->
linesize
[
2
],
1
);
encode_plane
(
fs
,
p
->
data
[
1
]
+
ps
*
cx
+
cy
*
p
->
linesize
[
1
],
chroma_width
,
chroma_height
,
p
->
linesize
[
1
],
1
);
encode_plane
(
fs
,
p
->
data
[
2
]
+
ps
*
cx
+
cy
*
p
->
linesize
[
2
],
chroma_width
,
chroma_height
,
p
->
linesize
[
2
],
1
);
}
else
{
encode_rgb_frame
(
fs
,
(
uint32_t
*
)(
p
->
data
[
0
])
+
x
+
y
*
(
p
->
linesize
[
0
]
/
4
),
width
,
height
,
p
->
linesize
[
0
]
/
4
);
encode_rgb_frame
(
fs
,
(
uint32_t
*
)(
p
->
data
[
0
])
+
ps
*
x
+
y
*
(
p
->
linesize
[
0
]
/
4
),
width
,
height
,
p
->
linesize
[
0
]
/
4
);
}
emms_c
();
...
...
@@ -1475,6 +1476,7 @@ static int decode_slice(AVCodecContext *c, void *arg){
int
height
=
fs
->
slice_height
;
int
x
=
fs
->
slice_x
;
int
y
=
fs
->
slice_y
;
const
int
ps
=
(
c
->
bits_per_raw_sample
>
8
)
+
1
;
AVFrame
*
const
p
=
&
f
->
picture
;
av_assert1
(
width
&&
height
);
...
...
@@ -1483,12 +1485,12 @@ static int decode_slice(AVCodecContext *c, void *arg){
const
int
chroma_height
=
-
((
-
height
)
>>
f
->
chroma_v_shift
);
const
int
cx
=
x
>>
f
->
chroma_h_shift
;
const
int
cy
=
y
>>
f
->
chroma_v_shift
;
decode_plane
(
fs
,
p
->
data
[
0
]
+
x
+
y
*
p
->
linesize
[
0
],
width
,
height
,
p
->
linesize
[
0
],
0
);
decode_plane
(
fs
,
p
->
data
[
0
]
+
ps
*
x
+
y
*
p
->
linesize
[
0
],
width
,
height
,
p
->
linesize
[
0
],
0
);
decode_plane
(
fs
,
p
->
data
[
1
]
+
cx
+
cy
*
p
->
linesize
[
1
],
chroma_width
,
chroma_height
,
p
->
linesize
[
1
],
1
);
decode_plane
(
fs
,
p
->
data
[
2
]
+
cx
+
cy
*
p
->
linesize
[
1
],
chroma_width
,
chroma_height
,
p
->
linesize
[
2
],
1
);
decode_plane
(
fs
,
p
->
data
[
1
]
+
ps
*
cx
+
cy
*
p
->
linesize
[
1
],
chroma_width
,
chroma_height
,
p
->
linesize
[
1
],
1
);
decode_plane
(
fs
,
p
->
data
[
2
]
+
ps
*
cx
+
cy
*
p
->
linesize
[
1
],
chroma_width
,
chroma_height
,
p
->
linesize
[
2
],
1
);
}
else
{
decode_rgb_frame
(
fs
,
(
uint32_t
*
)
p
->
data
[
0
]
+
x
+
y
*
(
p
->
linesize
[
0
]
/
4
),
width
,
height
,
p
->
linesize
[
0
]
/
4
);
decode_rgb_frame
(
fs
,
(
uint32_t
*
)
p
->
data
[
0
]
+
ps
*
x
+
y
*
(
p
->
linesize
[
0
]
/
4
),
width
,
height
,
p
->
linesize
[
0
]
/
4
);
}
emms_c
();
...
...
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