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
ca16f88c
Commit
ca16f88c
authored
Jul 10, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tiffenc: add .init
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
5a9d6993
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
tiffenc.c
libavcodec/tiffenc.c
+13
-5
No files found.
libavcodec/tiffenc.c
View file @
ca16f88c
...
...
@@ -215,6 +215,18 @@ static void pack_yuv(TiffEncoderContext * s, uint8_t * dst, int lnum)
}
}
static
av_cold
int
encode_init
(
AVCodecContext
*
avctx
)
{
TiffEncoderContext
*
s
=
avctx
->
priv_data
;
avctx
->
coded_frame
=
&
s
->
picture
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
coded_frame
->
key_frame
=
1
;
s
->
avctx
=
avctx
;
return
0
;
}
static
int
encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
...
...
@@ -234,12 +246,7 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
uint8_t
*
yuv_line
=
NULL
;
int
shift_h
,
shift_v
;
s
->
avctx
=
avctx
;
*
p
=
*
pict
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
key_frame
=
1
;
avctx
->
coded_frame
=
&
s
->
picture
;
s
->
width
=
avctx
->
width
;
s
->
height
=
avctx
->
height
;
...
...
@@ -487,6 +494,7 @@ AVCodec ff_tiff_encoder = {
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
CODEC_ID_TIFF
,
.
priv_data_size
=
sizeof
(
TiffEncoderContext
),
.
init
=
encode_init
,
.
encode2
=
encode_frame
,
.
pix_fmts
=
(
const
enum
PixelFormat
[])
{
PIX_FMT_RGB24
,
PIX_FMT_PAL8
,
PIX_FMT_GRAY8
,
PIX_FMT_GRAY8A
,
PIX_FMT_GRAY16LE
,
...
...
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