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
77535bb3
Commit
77535bb3
authored
Mar 30, 2013
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bmpenc: get rid of BMPContext as it is unused
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
bd252ff6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
13 deletions
+2
-13
bmp.h
libavcodec/bmp.h
+0
-4
bmpenc.c
libavcodec/bmpenc.c
+2
-9
No files found.
libavcodec/bmp.h
View file @
77535bb3
...
...
@@ -24,10 +24,6 @@
#include "avcodec.h"
typedef
struct
BMPContext
{
AVFrame
picture
;
}
BMPContext
;
typedef
enum
{
BMP_RGB
=
0
,
BMP_RLE8
=
1
,
...
...
libavcodec/bmpenc.c
View file @
77535bb3
...
...
@@ -32,11 +32,6 @@ static const uint32_t rgb565_masks[] = { 0xF800, 0x07E0, 0x001F };
static
const
uint32_t
rgb444_masks
[]
=
{
0x0F00
,
0x00F0
,
0x000F
};
static
av_cold
int
bmp_encode_init
(
AVCodecContext
*
avctx
){
BMPContext
*
s
=
avctx
->
priv_data
;
avcodec_get_frame_defaults
(
&
s
->
picture
);
avctx
->
coded_frame
=
&
s
->
picture
;
switch
(
avctx
->
pix_fmt
)
{
case
AV_PIX_FMT_BGRA
:
avctx
->
bits_per_coded_sample
=
32
;
...
...
@@ -71,15 +66,14 @@ static av_cold int bmp_encode_init(AVCodecContext *avctx){
static
int
bmp_encode_frame
(
AVCodecContext
*
avctx
,
AVPacket
*
pkt
,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
BMPContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
&
s
->
picture
;
int
n_bytes_image
,
n_bytes_per_row
,
n_bytes
,
i
,
n
,
hsize
,
ret
;
const
uint32_t
*
pal
=
NULL
;
uint32_t
palette256
[
256
];
int
pad_bytes_per_row
,
pal_entries
=
0
,
compression
=
BMP_RGB
;
int
bit_count
=
avctx
->
bits_per_coded_sample
;
uint8_t
*
ptr
,
*
buf
;
*
p
=
*
pict
;
AVFrame
*
const
p
=
(
AVFrame
*
)
pict
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
key_frame
=
1
;
switch
(
avctx
->
pix_fmt
)
{
...
...
@@ -169,7 +163,6 @@ AVCodec ff_bmp_encoder = {
.
name
=
"bmp"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
id
=
AV_CODEC_ID_BMP
,
.
priv_data_size
=
sizeof
(
BMPContext
),
.
init
=
bmp_encode_init
,
.
encode2
=
bmp_encode_frame
,
.
pix_fmts
=
(
const
enum
AVPixelFormat
[]){
...
...
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