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
562b6c74
Commit
562b6c74
authored
Feb 27, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unnecessary AVFrame pointer casts.
parent
2f4b476e
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
42 additions
and
42 deletions
+42
-42
a64multienc.c
libavcodec/a64multienc.c
+1
-1
avs.c
libavcodec/avs.c
+1
-1
bmp.c
libavcodec/bmp.c
+2
-2
bmpenc.c
libavcodec/bmpenc.c
+3
-3
fraps.c
libavcodec/fraps.c
+2
-2
gif.c
libavcodec/gif.c
+1
-1
indeo2.c
libavcodec/indeo2.c
+1
-1
jpeglsenc.c
libavcodec/jpeglsenc.c
+1
-1
loco.c
libavcodec/loco.c
+1
-1
mdec.c
libavcodec/mdec.c
+1
-1
pamenc.c
libavcodec/pamenc.c
+1
-1
pnm.c
libavcodec/pnm.c
+2
-2
pnmdec.c
libavcodec/pnmdec.c
+1
-1
pnmenc.c
libavcodec/pnmenc.c
+1
-1
qdrw.c
libavcodec/qdrw.c
+1
-1
qpeg.c
libavcodec/qpeg.c
+2
-2
rawdec.c
libavcodec/rawdec.c
+2
-2
rawenc.c
libavcodec/rawenc.c
+1
-1
svq1enc.c
libavcodec/svq1enc.c
+2
-2
targa.c
libavcodec/targa.c
+3
-3
tiff.c
libavcodec/tiff.c
+3
-3
tiffenc.c
libavcodec/tiffenc.c
+1
-1
truemotion2.c
libavcodec/truemotion2.c
+1
-1
ulti.c
libavcodec/ulti.c
+1
-1
vcr1.c
libavcodec/vcr1.c
+3
-3
wnv1.c
libavcodec/wnv1.c
+1
-1
xl.c
libavcodec/xl.c
+1
-1
zmbvenc.c
libavcodec/zmbvenc.c
+1
-1
No files found.
libavcodec/a64multienc.c
View file @
562b6c74
...
...
@@ -246,7 +246,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
A64Context
*
c
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
c
->
picture
;
AVFrame
*
const
p
=
&
c
->
picture
;
int
frame
;
int
x
,
y
;
...
...
libavcodec/avs.c
View file @
562b6c74
...
...
@@ -51,7 +51,7 @@ avs_decode_frame(AVCodecContext * avctx,
int
buf_size
=
avpkt
->
size
;
AvsContext
*
const
avs
=
avctx
->
priv_data
;
AVFrame
*
picture
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
avs
->
picture
;
AVFrame
*
const
p
=
&
avs
->
picture
;
const
uint8_t
*
table
,
*
vect
;
uint8_t
*
out
;
int
i
,
j
,
x
,
y
,
stride
,
vect_w
=
3
,
vect_h
=
3
;
...
...
libavcodec/bmp.c
View file @
562b6c74
...
...
@@ -27,8 +27,8 @@
static
av_cold
int
bmp_decode_init
(
AVCodecContext
*
avctx
){
BMPContext
*
s
=
avctx
->
priv_data
;
avcodec_get_frame_defaults
(
(
AVFrame
*
)
&
s
->
picture
);
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
picture
;
avcodec_get_frame_defaults
(
&
s
->
picture
);
avctx
->
coded_frame
=
&
s
->
picture
;
return
0
;
}
...
...
libavcodec/bmpenc.c
View file @
562b6c74
...
...
@@ -33,8 +33,8 @@ 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
(
(
AVFrame
*
)
&
s
->
picture
);
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
picture
;
avcodec_get_frame_defaults
(
&
s
->
picture
);
avctx
->
coded_frame
=
&
s
->
picture
;
switch
(
avctx
->
pix_fmt
)
{
case
PIX_FMT_BGR24
:
...
...
@@ -68,7 +68,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
BMPContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
int
n_bytes_image
,
n_bytes_per_row
,
n_bytes
,
i
,
n
,
hsize
,
ret
;
const
uint32_t
*
pal
=
NULL
;
int
pad_bytes_per_row
,
pal_entries
=
0
,
compression
=
BMP_RGB
;
...
...
libavcodec/fraps.c
View file @
562b6c74
...
...
@@ -60,7 +60,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
{
FrapsContext
*
const
s
=
avctx
->
priv_data
;
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
frame
;
avctx
->
coded_frame
=
&
s
->
frame
;
avctx
->
pix_fmt
=
PIX_FMT_NONE
;
/* set in decode_frame */
s
->
avctx
=
avctx
;
...
...
@@ -131,7 +131,7 @@ static int decode_frame(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
FrapsContext
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
frame
=
data
;
AVFrame
*
const
f
=
(
AVFrame
*
)
&
s
->
frame
;
AVFrame
*
const
f
=
&
s
->
frame
;
uint32_t
header
;
unsigned
int
version
,
header_size
;
unsigned
int
x
,
y
;
...
...
libavcodec/gif.c
View file @
562b6c74
...
...
@@ -146,7 +146,7 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
GIFContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
uint8_t
*
outbuf_ptr
,
*
end
;
int
ret
;
...
...
libavcodec/indeo2.c
View file @
562b6c74
...
...
@@ -143,7 +143,7 @@ static int ir2_decode_frame(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
Ir2Context
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
picture
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
int
start
;
if
(
p
->
data
[
0
])
...
...
libavcodec/jpeglsenc.c
View file @
562b6c74
...
...
@@ -232,7 +232,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
JpeglsContext
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
const
int
near
=
avctx
->
prediction_method
;
PutBitContext
pb
,
pb2
;
GetBitContext
gb
;
...
...
libavcodec/loco.c
View file @
562b6c74
...
...
@@ -163,7 +163,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
LOCOContext
*
const
l
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
l
->
pic
;
AVFrame
*
const
p
=
&
l
->
pic
;
int
decoded
;
if
(
p
->
data
[
0
])
...
...
libavcodec/mdec.c
View file @
562b6c74
...
...
@@ -242,7 +242,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
static
av_cold
int
decode_init_thread_copy
(
AVCodecContext
*
avctx
){
MDECContext
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
p
=
(
AVFrame
*
)
&
a
->
picture
;
AVFrame
*
p
=
&
a
->
picture
;
avctx
->
coded_frame
=
p
;
a
->
avctx
=
avctx
;
...
...
libavcodec/pamenc.c
View file @
562b6c74
...
...
@@ -29,7 +29,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
PNMContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
int
i
,
h
,
w
,
n
,
linesize
,
depth
,
maxval
,
ret
;
const
char
*
tuple_type
;
uint8_t
*
ptr
;
...
...
libavcodec/pnm.c
View file @
562b6c74
...
...
@@ -189,8 +189,8 @@ av_cold int ff_pnm_init(AVCodecContext *avctx)
{
PNMContext
*
s
=
avctx
->
priv_data
;
avcodec_get_frame_defaults
(
(
AVFrame
*
)
&
s
->
picture
);
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
picture
;
avcodec_get_frame_defaults
(
&
s
->
picture
);
avctx
->
coded_frame
=
&
s
->
picture
;
return
0
;
}
libavcodec/pnmdec.c
View file @
562b6c74
...
...
@@ -32,7 +32,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
int
buf_size
=
avpkt
->
size
;
PNMContext
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
picture
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
int
i
,
j
,
n
,
linesize
,
h
,
upgrade
=
0
;
unsigned
char
*
ptr
;
int
components
,
sample_len
;
...
...
libavcodec/pnmenc.c
View file @
562b6c74
...
...
@@ -29,7 +29,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
PNMContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
int
i
,
h
,
h1
,
c
,
n
,
linesize
,
ret
;
uint8_t
*
ptr
,
*
ptr1
,
*
ptr2
;
...
...
libavcodec/qdrw.c
View file @
562b6c74
...
...
@@ -40,7 +40,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf_end
=
avpkt
->
data
+
avpkt
->
size
;
int
buf_size
=
avpkt
->
size
;
QdrawContext
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
a
->
pic
;
AVFrame
*
const
p
=
&
a
->
pic
;
uint8_t
*
outdata
;
int
colors
;
int
i
;
...
...
libavcodec/qpeg.c
View file @
562b6c74
...
...
@@ -254,7 +254,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
QpegContext
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
a
->
pic
;
AVFrame
*
const
p
=
&
a
->
pic
;
uint8_t
*
outdata
;
int
delta
;
const
uint8_t
*
pal
=
av_packet_get_side_data
(
avpkt
,
AV_PKT_DATA_PALETTE
,
NULL
);
...
...
@@ -297,7 +297,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
static
av_cold
int
decode_end
(
AVCodecContext
*
avctx
){
QpegContext
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
a
->
pic
;
AVFrame
*
const
p
=
&
a
->
pic
;
if
(
p
->
data
[
0
])
avctx
->
release_buffer
(
avctx
,
p
);
...
...
libavcodec/rawdec.c
View file @
562b6c74
...
...
@@ -120,8 +120,8 @@ static int raw_decode(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
RawVideoContext
*
context
=
avctx
->
priv_data
;
AVFrame
*
frame
=
(
AVFrame
*
)
data
;
AVPicture
*
picture
=
(
AVPicture
*
)
data
;
AVFrame
*
frame
=
data
;
AVPicture
*
picture
=
data
;
frame
->
pict_type
=
avctx
->
coded_frame
->
pict_type
;
frame
->
interlaced_frame
=
avctx
->
coded_frame
->
interlaced_frame
;
...
...
libavcodec/rawenc.c
View file @
562b6c74
...
...
@@ -32,7 +32,7 @@
static
av_cold
int
raw_init_encoder
(
AVCodecContext
*
avctx
)
{
avctx
->
coded_frame
=
(
AVFrame
*
)
avctx
->
priv_data
;
avctx
->
coded_frame
=
avctx
->
priv_data
;
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
avctx
->
coded_frame
->
key_frame
=
1
;
avctx
->
bits_per_coded_sample
=
av_get_bits_per_pixel
(
&
av_pix_fmt_descriptors
[
avctx
->
pix_fmt
]);
...
...
libavcodec/svq1enc.c
View file @
562b6c74
...
...
@@ -473,7 +473,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx)
SVQ1Context
*
const
s
=
avctx
->
priv_data
;
ff_dsputil_init
(
&
s
->
dsp
,
avctx
);
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
picture
;
avctx
->
coded_frame
=
&
s
->
picture
;
s
->
frame_width
=
avctx
->
width
;
s
->
frame_height
=
avctx
->
height
;
...
...
@@ -501,7 +501,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
SVQ1Context
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
AVFrame
temp
;
int
i
,
ret
;
...
...
libavcodec/targa.c
View file @
562b6c74
...
...
@@ -106,7 +106,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf_end
=
avpkt
->
data
+
avpkt
->
size
;
TargaContext
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
picture
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
uint8_t
*
dst
;
int
stride
;
int
idlen
,
compr
,
y
,
w
,
h
,
bpp
,
flags
;
...
...
@@ -257,8 +257,8 @@ static int decode_frame(AVCodecContext *avctx,
static
av_cold
int
targa_init
(
AVCodecContext
*
avctx
){
TargaContext
*
s
=
avctx
->
priv_data
;
avcodec_get_frame_defaults
(
(
AVFrame
*
)
&
s
->
picture
);
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
picture
;
avcodec_get_frame_defaults
(
&
s
->
picture
);
avctx
->
coded_frame
=
&
s
->
picture
;
return
0
;
}
...
...
libavcodec/tiff.c
View file @
562b6c74
...
...
@@ -506,7 +506,7 @@ static int decode_frame(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
TiffContext
*
const
s
=
avctx
->
priv_data
;
AVFrame
*
picture
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
const
uint8_t
*
orig_buf
=
buf
,
*
end_buf
=
buf
+
buf_size
;
unsigned
off
;
int
id
,
le
,
ret
;
...
...
@@ -619,8 +619,8 @@ static av_cold int tiff_init(AVCodecContext *avctx){
s
->
width
=
0
;
s
->
height
=
0
;
s
->
avctx
=
avctx
;
avcodec_get_frame_defaults
(
(
AVFrame
*
)
&
s
->
picture
);
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
picture
;
avcodec_get_frame_defaults
(
&
s
->
picture
);
avctx
->
coded_frame
=
&
s
->
picture
;
ff_lzw_decode_open
(
&
s
->
lzw
);
ff_ccitt_unpack_init
();
...
...
libavcodec/tiffenc.c
View file @
562b6c74
...
...
@@ -204,7 +204,7 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt,
const
AVFrame
*
pict
,
int
*
got_packet
)
{
TiffEncoderContext
*
s
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
s
->
picture
;
AVFrame
*
const
p
=
&
s
->
picture
;
int
i
;
uint8_t
*
ptr
;
uint8_t
*
offset
;
...
...
libavcodec/truemotion2.c
View file @
562b6c74
...
...
@@ -764,7 +764,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
TM2Context
*
const
l
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
l
->
pic
;
AVFrame
*
const
p
=
&
l
->
pic
;
int
i
,
skip
,
t
;
uint8_t
*
swbuf
;
...
...
libavcodec/ulti.c
View file @
562b6c74
...
...
@@ -50,7 +50,7 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx)
s
->
height
=
avctx
->
height
;
s
->
blocks
=
(
s
->
width
/
8
)
*
(
s
->
height
/
8
);
avctx
->
pix_fmt
=
PIX_FMT_YUV410P
;
avctx
->
coded_frame
=
(
AVFrame
*
)
&
s
->
frame
;
avctx
->
coded_frame
=
&
s
->
frame
;
s
->
ulti_codebook
=
ulti_codebook
;
return
0
;
...
...
libavcodec/vcr1.c
View file @
562b6c74
...
...
@@ -49,7 +49,7 @@ static int decode_frame(AVCodecContext *avctx,
int
buf_size
=
avpkt
->
size
;
VCR1Context
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
picture
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
a
->
picture
;
AVFrame
*
const
p
=
&
a
->
picture
;
const
uint8_t
*
bytestream
=
buf
;
int
i
,
x
,
y
;
...
...
@@ -121,7 +121,7 @@ static int decode_frame(AVCodecContext *avctx,
static
int
encode_frame
(
AVCodecContext
*
avctx
,
unsigned
char
*
buf
,
int
buf_size
,
void
*
data
){
VCR1Context
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
pict
=
data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
a
->
picture
;
AVFrame
*
const
p
=
&
a
->
picture
;
int
size
;
*
p
=
*
pict
;
...
...
@@ -141,7 +141,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
static
av_cold
void
common_init
(
AVCodecContext
*
avctx
){
VCR1Context
*
const
a
=
avctx
->
priv_data
;
avctx
->
coded_frame
=
(
AVFrame
*
)
&
a
->
picture
;
avctx
->
coded_frame
=
&
a
->
picture
;
a
->
avctx
=
avctx
;
}
...
...
libavcodec/wnv1.c
View file @
562b6c74
...
...
@@ -64,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
WNV1Context
*
const
l
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
l
->
pic
;
AVFrame
*
const
p
=
&
l
->
pic
;
unsigned
char
*
Y
,
*
U
,
*
V
;
int
i
,
j
;
int
prev_y
=
0
,
prev_u
=
0
,
prev_v
=
0
;
...
...
libavcodec/xl.c
View file @
562b6c74
...
...
@@ -45,7 +45,7 @@ static int decode_frame(AVCodecContext *avctx,
const
uint8_t
*
buf
=
avpkt
->
data
;
int
buf_size
=
avpkt
->
size
;
VideoXLContext
*
const
a
=
avctx
->
priv_data
;
AVFrame
*
const
p
=
(
AVFrame
*
)
&
a
->
pic
;
AVFrame
*
const
p
=
&
a
->
pic
;
uint8_t
*
Y
,
*
U
,
*
V
;
int
i
,
j
;
int
stride
;
...
...
libavcodec/zmbvenc.c
View file @
562b6c74
...
...
@@ -313,7 +313,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
return
-
1
;
}
avctx
->
coded_frame
=
(
AVFrame
*
)
&
c
->
pic
;
avctx
->
coded_frame
=
&
c
->
pic
;
return
0
;
}
...
...
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