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
c5865a89
Commit
c5865a89
authored
Oct 29, 2011
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use bytestream functions to write header.
Signed-off-by:
Reimar Döffinger
<
Reimar.Doeffinger@gmx.de
>
parent
d9f4dc52
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
25 deletions
+19
-25
proresenc.c
libavcodec/proresenc.c
+19
-25
No files found.
libavcodec/proresenc.c
View file @
c5865a89
...
...
@@ -497,31 +497,25 @@ static int prores_encode_frame(AVCodecContext *avctx, unsigned char *buf,
int
pic_size
=
prores_encode_picture
(
avctx
,
pic
,
buf
+
header_size
+
8
,
buf_size
-
header_size
-
8
);
AV_WB32
(
buf
,
pic_size
+
8
+
header_size
);
AV_WB8
(
buf
+
4
,
'i'
);
AV_WB8
(
buf
+
5
,
'c'
);
AV_WB8
(
buf
+
6
,
'p'
);
AV_WB8
(
buf
+
7
,
'f'
);
AV_WB16
(
buf
+
8
,
header_size
);
AV_WB16
(
buf
+
10
,
0
);
AV_WB8
(
buf
+
12
,
'f'
);
AV_WB8
(
buf
+
13
,
'm'
);
AV_WB8
(
buf
+
14
,
'p'
);
AV_WB8
(
buf
+
15
,
'g'
);
AV_WB16
(
buf
+
16
,
pic
->
width
);
AV_WB16
(
buf
+
18
,
pic
->
height
);
buf
[
20
]
=
0x83
;
// {10}(422){00}{00}(frame){11}
buf
[
21
]
=
0
;
buf
[
22
]
=
2
;
buf
[
23
]
=
2
;
buf
[
24
]
=
6
;
buf
[
25
]
=
32
;
buf
[
26
]
=
0
;
buf
[
27
]
=
3
;
memcpy
(
buf
+
28
,
QMAT_LUMA
[
avctx
->
profile
],
64
);
memcpy
(
buf
+
92
,
QMAT_CHROMA
[
avctx
->
profile
],
64
);
bytestream_put_be32
(
&
buf
,
pic_size
+
8
+
header_size
);
bytestream_put_buffer
(
&
buf
,
"icpf"
,
4
);
bytestream_put_be16
(
&
buf
,
header_size
);
bytestream_put_be16
(
&
buf
,
0
);
bytestream_put_buffer
(
&
buf
,
"fmpg"
,
4
);
bytestream_put_be16
(
&
buf
,
pic
->
width
);
bytestream_put_be16
(
&
buf
,
pic
->
height
);
*
buf
++
=
0x83
;
// {10}(422){00}{00}(frame){11}
*
buf
++
=
0
;
*
buf
++
=
2
;
*
buf
++
=
2
;
*
buf
++
=
6
;
*
buf
++
=
32
;
*
buf
++
=
0
;
*
buf
++
=
3
;
bytestream_put_buffer
(
&
buf
,
QMAT_LUMA
[
avctx
->
profile
],
64
);
bytestream_put_buffer
(
&
buf
,
QMAT_CHROMA
[
avctx
->
profile
],
64
);
return
pic_size
+
8
+
header_size
;
}
...
...
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