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
811d58e0
Commit
811d58e0
authored
Aug 29, 2013
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/utils: support non edge emu for grayscale
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
cf06dee5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
utils.c
libavcodec/utils.c
+2
-1
No files found.
libavcodec/utils.c
View file @
811d58e0
...
@@ -568,6 +568,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
...
@@ -568,6 +568,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
for
(
i
=
0
;
i
<
4
&&
pool
->
pools
[
i
];
i
++
)
{
for
(
i
=
0
;
i
<
4
&&
pool
->
pools
[
i
];
i
++
)
{
const
int
h_shift
=
i
==
0
?
0
:
h_chroma_shift
;
const
int
h_shift
=
i
==
0
?
0
:
h_chroma_shift
;
const
int
v_shift
=
i
==
0
?
0
:
v_chroma_shift
;
const
int
v_shift
=
i
==
0
?
0
:
v_chroma_shift
;
int
is_planar
=
pool
->
pools
[
2
]
||
(
i
==
0
&&
s
->
pix_fmt
==
AV_PIX_FMT_GRAY8
);
pic
->
linesize
[
i
]
=
pool
->
linesize
[
i
];
pic
->
linesize
[
i
]
=
pool
->
linesize
[
i
];
...
@@ -576,7 +577,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
...
@@ -576,7 +577,7 @@ static int video_get_buffer(AVCodecContext *s, AVFrame *pic)
goto
fail
;
goto
fail
;
// no edge if EDGE EMU or not planar YUV
// no edge if EDGE EMU or not planar YUV
if
((
s
->
flags
&
CODEC_FLAG_EMU_EDGE
)
||
!
pool
->
pools
[
2
]
)
if
((
s
->
flags
&
CODEC_FLAG_EMU_EDGE
)
||
!
is_planar
)
pic
->
data
[
i
]
=
pic
->
buf
[
i
]
->
data
;
pic
->
data
[
i
]
=
pic
->
buf
[
i
]
->
data
;
else
{
else
{
pic
->
data
[
i
]
=
pic
->
buf
[
i
]
->
data
+
pic
->
data
[
i
]
=
pic
->
buf
[
i
]
->
data
+
...
...
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