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
2c34596f
Commit
2c34596f
authored
Apr 13, 2005
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
non 4:2:0 foobar.{Y,U,V} support
Originally committed as revision 4125 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f40487c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
img2.c
libavformat/img2.c
+6
-4
No files found.
libavformat/img2.c
View file @
2c34596f
...
...
@@ -222,6 +222,8 @@ static int img_read_header(AVFormatContext *s1, AVFormatParameters *ap)
st
->
codec
.
codec_type
=
CODEC_TYPE_VIDEO
;
st
->
codec
.
codec_id
=
av_str2id
(
img_tags
,
s
->
path
);
}
if
(
st
->
codec
.
codec_type
==
CODEC_TYPE_VIDEO
&&
ap
->
pix_fmt
)
st
->
codec
.
pix_fmt
=
ap
->
pix_fmt
;
return
0
;
}
...
...
@@ -336,10 +338,10 @@ static int img_write_packet(AVFormatContext *s, AVPacket *pkt)
}
if
(
codec
->
codec_id
==
CODEC_ID_RAWVIDEO
){
int
size
=
(
codec
->
width
*
codec
->
height
)
>>
2
;
put_buffer
(
pb
[
0
],
pkt
->
data
,
4
*
size
);
put_buffer
(
pb
[
1
],
pkt
->
data
+
4
*
size
,
size
);
put_buffer
(
pb
[
2
],
pkt
->
data
+
5
*
size
,
size
);
int
ysize
=
codec
->
width
*
codec
->
height
;
put_buffer
(
pb
[
0
],
pkt
->
data
,
y
size
);
put_buffer
(
pb
[
1
],
pkt
->
data
+
ysize
,
(
pkt
->
size
-
ysize
)
/
2
);
put_buffer
(
pb
[
2
],
pkt
->
data
+
ysize
+
(
pkt
->
size
-
ysize
)
/
2
,
(
pkt
->
size
-
ysize
)
/
2
);
put_flush_packet
(
pb
[
1
]);
put_flush_packet
(
pb
[
2
]);
url_fclose
(
pb
[
1
]);
...
...
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