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
08b31a72
Commit
08b31a72
authored
Mar 30, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xwdenc: remove unused code
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
77535bb3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
21 deletions
+4
-21
xwdenc.c
libavcodec/xwdenc.c
+4
-21
No files found.
libavcodec/xwdenc.c
View file @
08b31a72
...
@@ -30,17 +30,8 @@
...
@@ -30,17 +30,8 @@
#define WINDOW_NAME "lavcxwdenc"
#define WINDOW_NAME "lavcxwdenc"
#define WINDOW_NAME_SIZE 11
#define WINDOW_NAME_SIZE 11
static
av_cold
int
xwd_encode_init
(
AVCodecContext
*
avctx
)
{
avctx
->
coded_frame
=
avcodec_alloc_frame
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
return
0
;
}
static
int
xwd_encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
static
int
xwd_encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
const
AVFrame
*
p
,
int
*
got_packet
)
const
AVFrame
*
p
ict
,
int
*
got_packet
)
{
{
enum
AVPixelFormat
pix_fmt
=
avctx
->
pix_fmt
;
enum
AVPixelFormat
pix_fmt
=
avctx
->
pix_fmt
;
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
...
@@ -49,6 +40,7 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -49,6 +40,7 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
uint32_t
header_size
;
uint32_t
header_size
;
int
i
,
out_size
,
ret
;
int
i
,
out_size
,
ret
;
uint8_t
*
ptr
,
*
buf
;
uint8_t
*
ptr
,
*
buf
;
AVFrame
*
const
p
=
(
AVFrame
*
)
pict
;
pixdepth
=
av_get_bits_per_pixel
(
desc
);
pixdepth
=
av_get_bits_per_pixel
(
desc
);
if
(
desc
->
flags
&
PIX_FMT_BE
)
if
(
desc
->
flags
&
PIX_FMT_BE
)
...
@@ -158,8 +150,8 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -158,8 +150,8 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return
ret
;
return
ret
;
buf
=
pkt
->
data
;
buf
=
pkt
->
data
;
avctx
->
coded_frame
->
key_frame
=
1
;
p
->
key_frame
=
1
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
bytestream_put_be32
(
&
buf
,
header_size
);
bytestream_put_be32
(
&
buf
,
header_size
);
bytestream_put_be32
(
&
buf
,
XWD_VERSION
);
// file version
bytestream_put_be32
(
&
buf
,
XWD_VERSION
);
// file version
...
@@ -216,20 +208,11 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
...
@@ -216,20 +208,11 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return
0
;
return
0
;
}
}
static
av_cold
int
xwd_encode_close
(
AVCodecContext
*
avctx
)
{
av_freep
(
&
avctx
->
coded_frame
);
return
0
;
}
AVCodec
ff_xwd_encoder
=
{
AVCodec
ff_xwd_encoder
=
{
.
name
=
"xwd"
,
.
name
=
"xwd"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
AV_CODEC_ID_XWD
,
.
id
=
AV_CODEC_ID_XWD
,
.
init
=
xwd_encode_init
,
.
encode2
=
xwd_encode_frame
,
.
encode2
=
xwd_encode_frame
,
.
close
=
xwd_encode_close
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[])
{
AV_PIX_FMT_BGRA
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[])
{
AV_PIX_FMT_BGRA
,
AV_PIX_FMT_RGBA
,
AV_PIX_FMT_RGBA
,
AV_PIX_FMT_ARGB
,
AV_PIX_FMT_ARGB
,
...
...
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