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
4012cd6c
Commit
4012cd6c
authored
Dec 05, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: fix decode_frame() third parameter semantics for rest of video decoders
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
835fd779
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
64 additions
and
63 deletions
+64
-63
avrndec.c
libavcodec/avrndec.c
+4
-3
avuidec.c
libavcodec/avuidec.c
+2
-2
bintext.c
libavcodec/bintext.c
+2
-2
brender_pix.c
libavcodec/brender_pix.c
+2
-2
cpia.c
libavcodec/cpia.c
+3
-3
crystalhd.c
libavcodec/crystalhd.c
+11
-11
diracdec.c
libavcodec/diracdec.c
+8
-8
escape130.c
libavcodec/escape130.c
+3
-3
exr.c
libavcodec/exr.c
+2
-2
j2kdec.c
libavcodec/j2kdec.c
+2
-2
libstagefright.cpp
libavcodec/libstagefright.cpp
+2
-2
libutvideodec.cpp
libavcodec/libutvideodec.cpp
+2
-2
paf.c
libavcodec/paf.c
+2
-2
proresdec2.c
libavcodec/proresdec2.c
+2
-2
targa_y216dec.c
libavcodec/targa_y216dec.c
+2
-2
v308dec.c
libavcodec/v308dec.c
+2
-2
v408dec.c
libavcodec/v408dec.c
+2
-2
vda_h264_dec.c
libavcodec/vda_h264_dec.c
+3
-3
xbmdec.c
libavcodec/xbmdec.c
+2
-2
xfacedec.c
libavcodec/xfacedec.c
+2
-2
y41pdec.c
libavcodec/y41pdec.c
+2
-2
yuv4dec.c
libavcodec/yuv4dec.c
+2
-2
No files found.
libavcodec/avrndec.c
View file @
4012cd6c
...
@@ -80,7 +80,8 @@ static av_cold int end(AVCodecContext *avctx)
...
@@ -80,7 +80,8 @@ static av_cold int end(AVCodecContext *avctx)
return
0
;
return
0
;
}
}
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
AVPacket
*
avpkt
)
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
got_frame
,
AVPacket
*
avpkt
)
{
{
AVRnContext
*
a
=
avctx
->
priv_data
;
AVRnContext
*
a
=
avctx
->
priv_data
;
AVFrame
*
p
=
&
a
->
frame
;
AVFrame
*
p
=
&
a
->
frame
;
...
@@ -89,7 +90,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
...
@@ -89,7 +90,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
int
y
,
ret
,
true_height
;
int
y
,
ret
,
true_height
;
if
(
a
->
is_mjpeg
)
if
(
a
->
is_mjpeg
)
return
ff_mjpeg_decode_frame
(
avctx
,
data
,
data_siz
e
,
avpkt
);
return
ff_mjpeg_decode_frame
(
avctx
,
data
,
got_fram
e
,
avpkt
);
true_height
=
buf_size
/
(
2
*
avctx
->
width
);
true_height
=
buf_size
/
(
2
*
avctx
->
width
);
if
(
p
->
data
[
0
])
if
(
p
->
data
[
0
])
...
@@ -123,7 +124,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
...
@@ -123,7 +124,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
}
}
*
(
AVFrame
*
)
data
=
a
->
frame
;
*
(
AVFrame
*
)
data
=
a
->
frame
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
return
buf_size
;
return
buf_size
;
}
}
...
...
libavcodec/avuidec.c
View file @
4012cd6c
...
@@ -39,7 +39,7 @@ static av_cold int avui_decode_init(AVCodecContext *avctx)
...
@@ -39,7 +39,7 @@ static av_cold int avui_decode_init(AVCodecContext *avctx)
}
}
static
int
avui_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
avui_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
AVFrame
*
pic
=
avctx
->
coded_frame
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
const
uint8_t
*
src
=
avpkt
->
data
,
*
extradata
=
avctx
->
extradata
;
const
uint8_t
*
src
=
avpkt
->
data
,
*
extradata
=
avctx
->
extradata
;
...
@@ -128,7 +128,7 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -128,7 +128,7 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
src
+=
4
;
src
+=
4
;
srca
+=
4
;
srca
+=
4
;
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
pic
;
*
(
AVFrame
*
)
data
=
*
pic
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/bintext.c
View file @
4012cd6c
...
@@ -129,7 +129,7 @@ static void draw_char(AVCodecContext *avctx, int c, int a)
...
@@ -129,7 +129,7 @@ static void draw_char(AVCodecContext *avctx, int c, int a)
}
}
static
int
decode_frame
(
AVCodecContext
*
avctx
,
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
XbinContext
*
s
=
avctx
->
priv_data
;
XbinContext
*
s
=
avctx
->
priv_data
;
...
@@ -201,7 +201,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -201,7 +201,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
s
->
frame
;
*
(
AVFrame
*
)
data
=
s
->
frame
;
return
buf_size
;
return
buf_size
;
}
}
...
...
libavcodec/brender_pix.c
View file @
4012cd6c
...
@@ -70,7 +70,7 @@ static int brpix_decode_header(BRPixHeader *out, GetByteContext *pgb)
...
@@ -70,7 +70,7 @@ static int brpix_decode_header(BRPixHeader *out, GetByteContext *pgb)
}
}
static
int
brpix_decode_frame
(
AVCodecContext
*
avctx
,
static
int
brpix_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size_out
,
void
*
data
,
int
*
got_frame
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
BRPixContext
*
s
=
avctx
->
priv_data
;
BRPixContext
*
s
=
avctx
->
priv_data
;
...
@@ -217,7 +217,7 @@ static int brpix_decode_frame(AVCodecContext *avctx,
...
@@ -217,7 +217,7 @@ static int brpix_decode_frame(AVCodecContext *avctx,
}
}
*
frame_out
=
s
->
frame
;
*
frame_out
=
s
->
frame
;
*
data_size_out
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
return
avpkt
->
size
;
return
avpkt
->
size
;
}
}
...
...
libavcodec/cpia.c
View file @
4012cd6c
...
@@ -46,8 +46,8 @@ typedef struct {
...
@@ -46,8 +46,8 @@ typedef struct {
}
CpiaContext
;
}
CpiaContext
;
static
int
cpia_decode_frame
(
AVCodecContext
*
avctx
,
static
int
cpia_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
CpiaContext
*
const
cpia
=
avctx
->
priv_data
;
CpiaContext
*
const
cpia
=
avctx
->
priv_data
;
int
i
,
j
,
ret
;
int
i
,
j
,
ret
;
...
@@ -183,7 +183,7 @@ static int cpia_decode_frame(AVCodecContext* avctx,
...
@@ -183,7 +183,7 @@ static int cpia_decode_frame(AVCodecContext* avctx,
}
}
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
frame
;
*
(
AVFrame
*
)
data
=
*
frame
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/crystalhd.c
View file @
4012cd6c
...
@@ -536,7 +536,7 @@ static av_cold int init(AVCodecContext *avctx)
...
@@ -536,7 +536,7 @@ static av_cold int init(AVCodecContext *avctx)
static
inline
CopyRet
copy_frame
(
AVCodecContext
*
avctx
,
static
inline
CopyRet
copy_frame
(
AVCodecContext
*
avctx
,
BC_DTS_PROC_OUT
*
output
,
BC_DTS_PROC_OUT
*
output
,
void
*
data
,
int
*
data_siz
e
)
void
*
data
,
int
*
got_fram
e
)
{
{
BC_STATUS
ret
;
BC_STATUS
ret
;
BC_DTS_STATUS
decoder_status
=
{
0
,
};
BC_DTS_STATUS
decoder_status
=
{
0
,
};
...
@@ -696,7 +696,7 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
...
@@ -696,7 +696,7 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
priv
->
pic
.
pkt_pts
=
pkt_pts
;
priv
->
pic
.
pkt_pts
=
pkt_pts
;
if
(
!
priv
->
need_second_field
)
{
if
(
!
priv
->
need_second_field
)
{
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
priv
->
pic
;
*
(
AVFrame
*
)
data
=
priv
->
pic
;
}
}
...
@@ -733,7 +733,7 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
...
@@ -733,7 +733,7 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
static
inline
CopyRet
receive_frame
(
AVCodecContext
*
avctx
,
static
inline
CopyRet
receive_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
)
void
*
data
,
int
*
got_fram
e
)
{
{
BC_STATUS
ret
;
BC_STATUS
ret
;
BC_DTS_PROC_OUT
output
=
{
BC_DTS_PROC_OUT
output
=
{
...
@@ -743,7 +743,7 @@ static inline CopyRet receive_frame(AVCodecContext *avctx,
...
@@ -743,7 +743,7 @@ static inline CopyRet receive_frame(AVCodecContext *avctx,
CHDContext
*
priv
=
avctx
->
priv_data
;
CHDContext
*
priv
=
avctx
->
priv_data
;
HANDLE
dev
=
priv
->
dev
;
HANDLE
dev
=
priv
->
dev
;
*
data_siz
e
=
0
;
*
got_fram
e
=
0
;
// Request decoded data from the driver
// Request decoded data from the driver
ret
=
DtsProcOutputNoCopy
(
dev
,
OUTPUT_PROC_TIMEOUT
,
&
output
);
ret
=
DtsProcOutputNoCopy
(
dev
,
OUTPUT_PROC_TIMEOUT
,
&
output
);
...
@@ -840,8 +840,8 @@ static inline CopyRet receive_frame(AVCodecContext *avctx,
...
@@ -840,8 +840,8 @@ static inline CopyRet receive_frame(AVCodecContext *avctx,
priv
->
last_picture
=
output
.
PicInfo
.
picture_number
-
1
;
priv
->
last_picture
=
output
.
PicInfo
.
picture_number
-
1
;
}
}
copy_ret
=
copy_frame
(
avctx
,
&
output
,
data
,
data_siz
e
);
copy_ret
=
copy_frame
(
avctx
,
&
output
,
data
,
got_fram
e
);
if
(
*
data_siz
e
>
0
)
{
if
(
*
got_fram
e
>
0
)
{
avctx
->
has_b_frames
--
;
avctx
->
has_b_frames
--
;
priv
->
last_picture
++
;
priv
->
last_picture
++
;
av_log
(
avctx
,
AV_LOG_VERBOSE
,
"CrystalHD: Pipeline length: %u
\n
"
,
av_log
(
avctx
,
AV_LOG_VERBOSE
,
"CrystalHD: Pipeline length: %u
\n
"
,
...
@@ -868,7 +868,7 @@ static inline CopyRet receive_frame(AVCodecContext *avctx,
...
@@ -868,7 +868,7 @@ static inline CopyRet receive_frame(AVCodecContext *avctx,
}
}
static
int
decode
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
static
int
decode
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
BC_STATUS
ret
;
BC_STATUS
ret
;
BC_DTS_STATUS
decoder_status
=
{
0
,
};
BC_DTS_STATUS
decoder_status
=
{
0
,
};
...
@@ -1026,8 +1026,8 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *a
...
@@ -1026,8 +1026,8 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *a
}
}
do
{
do
{
rec_ret
=
receive_frame
(
avctx
,
data
,
data_siz
e
);
rec_ret
=
receive_frame
(
avctx
,
data
,
got_fram
e
);
if
(
rec_ret
==
RET_OK
&&
*
data_siz
e
==
0
)
{
if
(
rec_ret
==
RET_OK
&&
*
got_fram
e
==
0
)
{
/*
/*
* This case is for when the encoded fields are stored
* This case is for when the encoded fields are stored
* separately and we get a separate avpkt for each one. To keep
* separately and we get a separate avpkt for each one. To keep
...
@@ -1052,8 +1052,8 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *a
...
@@ -1052,8 +1052,8 @@ static int decode(AVCodecContext *avctx, void *data, int *data_size, AVPacket *a
ret
=
DtsGetDriverStatus
(
dev
,
&
decoder_status
);
ret
=
DtsGetDriverStatus
(
dev
,
&
decoder_status
);
if
(
ret
==
BC_STS_SUCCESS
&&
if
(
ret
==
BC_STS_SUCCESS
&&
decoder_status
.
ReadyListCount
>
0
)
{
decoder_status
.
ReadyListCount
>
0
)
{
rec_ret
=
receive_frame
(
avctx
,
data
,
data_siz
e
);
rec_ret
=
receive_frame
(
avctx
,
data
,
got_fram
e
);
if
((
rec_ret
==
RET_OK
&&
*
data_siz
e
>
0
)
||
if
((
rec_ret
==
RET_OK
&&
*
got_fram
e
>
0
)
||
rec_ret
==
RET_ERROR
)
rec_ret
==
RET_ERROR
)
break
;
break
;
}
}
...
...
libavcodec/diracdec.c
View file @
4012cd6c
...
@@ -1706,7 +1706,7 @@ static int dirac_decode_picture_header(DiracContext *s)
...
@@ -1706,7 +1706,7 @@ static int dirac_decode_picture_header(DiracContext *s)
return
0
;
return
0
;
}
}
static
int
get_delayed_pic
(
DiracContext
*
s
,
AVFrame
*
picture
,
int
*
data_siz
e
)
static
int
get_delayed_pic
(
DiracContext
*
s
,
AVFrame
*
picture
,
int
*
got_fram
e
)
{
{
DiracFrame
*
out
=
s
->
delay_frames
[
0
];
DiracFrame
*
out
=
s
->
delay_frames
[
0
];
int
i
,
out_idx
=
0
;
int
i
,
out_idx
=
0
;
...
@@ -1723,7 +1723,7 @@ static int get_delayed_pic(DiracContext *s, AVFrame *picture, int *data_size)
...
@@ -1723,7 +1723,7 @@ static int get_delayed_pic(DiracContext *s, AVFrame *picture, int *data_size)
if
(
out
)
{
if
(
out
)
{
out
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
out
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
picture
=
out
->
avframe
;
*
(
AVFrame
*
)
picture
=
out
->
avframe
;
}
}
...
@@ -1827,7 +1827,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
...
@@ -1827,7 +1827,7 @@ static int dirac_decode_data_unit(AVCodecContext *avctx, const uint8_t *buf, int
return
0
;
return
0
;
}
}
static
int
dirac_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
pkt
)
static
int
dirac_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
pkt
)
{
{
DiracContext
*
s
=
avctx
->
priv_data
;
DiracContext
*
s
=
avctx
->
priv_data
;
DiracFrame
*
picture
=
data
;
DiracFrame
*
picture
=
data
;
...
@@ -1843,11 +1843,11 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
...
@@ -1843,11 +1843,11 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
}
}
s
->
current_picture
=
NULL
;
s
->
current_picture
=
NULL
;
*
data_siz
e
=
0
;
*
got_fram
e
=
0
;
/* end of stream, so flush delayed pics */
/* end of stream, so flush delayed pics */
if
(
buf_size
==
0
)
if
(
buf_size
==
0
)
return
get_delayed_pic
(
s
,
(
AVFrame
*
)
data
,
data_siz
e
);
return
get_delayed_pic
(
s
,
(
AVFrame
*
)
data
,
got_fram
e
);
for
(;;)
{
for
(;;)
{
/*[DIRAC_STD] Here starts the code from parse_info() defined in 9.6
/*[DIRAC_STD] Here starts the code from parse_info() defined in 9.6
...
@@ -1905,15 +1905,15 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
...
@@ -1905,15 +1905,15 @@ static int dirac_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
if
(
delayed_frame
)
{
if
(
delayed_frame
)
{
delayed_frame
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
delayed_frame
->
avframe
.
reference
^=
DELAYED_PIC_REF
;
*
(
AVFrame
*
)
data
=
delayed_frame
->
avframe
;
*
(
AVFrame
*
)
data
=
delayed_frame
->
avframe
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
}
}
}
else
if
(
s
->
current_picture
->
avframe
.
display_picture_number
==
s
->
frame_number
)
{
}
else
if
(
s
->
current_picture
->
avframe
.
display_picture_number
==
s
->
frame_number
)
{
/* The right frame at the right time :-) */
/* The right frame at the right time :-) */
*
(
AVFrame
*
)
data
=
s
->
current_picture
->
avframe
;
*
(
AVFrame
*
)
data
=
s
->
current_picture
->
avframe
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
}
}
if
(
*
data_siz
e
)
if
(
*
got_fram
e
)
s
->
frame_number
=
picture
->
avframe
.
display_picture_number
+
1
;
s
->
frame_number
=
picture
->
avframe
.
display_picture_number
+
1
;
return
buf_idx
;
return
buf_idx
;
...
...
libavcodec/escape130.c
View file @
4012cd6c
...
@@ -93,13 +93,13 @@ static unsigned decode_skip_count(GetBitContext* gb) {
...
@@ -93,13 +93,13 @@ static unsigned decode_skip_count(GetBitContext* gb) {
* Decode a single frame
* Decode a single frame
* @param avctx decoder context
* @param avctx decoder context
* @param data decoded frame
* @param data decoded frame
* @param
data_size size of th
e decoded frame
* @param
got_frame hav
e decoded frame
* @param buf input buffer
* @param buf input buffer
* @param buf_size input buffer size
* @param buf_size input buffer size
* @return 0 success, -1 on error
* @return 0 success, -1 on error
*/
*/
static
int
escape130_decode_frame
(
AVCodecContext
*
avctx
,
static
int
escape130_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
const
uint8_t
*
buf
=
avpkt
->
data
;
const
uint8_t
*
buf
=
avpkt
->
data
;
...
@@ -302,7 +302,7 @@ static int escape130_decode_frame(AVCodecContext *avctx,
...
@@ -302,7 +302,7 @@ static int escape130_decode_frame(AVCodecContext *avctx,
avctx
->
release_buffer
(
avctx
,
&
s
->
frame
);
avctx
->
release_buffer
(
avctx
,
&
s
->
frame
);
*
(
AVFrame
*
)
data
=
s
->
frame
=
new_frame
;
*
(
AVFrame
*
)
data
=
s
->
frame
=
new_frame
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
return
buf_size
;
return
buf_size
;
}
}
...
...
libavcodec/exr.c
View file @
4012cd6c
...
@@ -223,7 +223,7 @@ static int rle_uncompress(const uint8_t *src, int ssize, uint8_t *dst, int dsize
...
@@ -223,7 +223,7 @@ static int rle_uncompress(const uint8_t *src, int ssize, uint8_t *dst, int dsize
static
int
decode_frame
(
AVCodecContext
*
avctx
,
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
void
*
data
,
int
*
data_siz
e
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
const
uint8_t
*
buf
=
avpkt
->
data
;
const
uint8_t
*
buf
=
avpkt
->
data
;
...
@@ -633,7 +633,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -633,7 +633,7 @@ static int decode_frame(AVCodecContext *avctx,
}
}
*
picture
=
s
->
picture
;
*
picture
=
s
->
picture
;
*
data_size
=
sizeof
(
AVPicture
)
;
*
got_frame
=
1
;
return
buf_size
;
return
buf_size
;
}
}
...
...
libavcodec/j2kdec.c
View file @
4012cd6c
...
@@ -1018,7 +1018,7 @@ static int jp2_find_codestream(J2kDecoderContext *s)
...
@@ -1018,7 +1018,7 @@ static int jp2_find_codestream(J2kDecoderContext *s)
}
}
static
int
decode_frame
(
AVCodecContext
*
avctx
,
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
J2kDecoderContext
*
s
=
avctx
->
priv_data
;
J2kDecoderContext
*
s
=
avctx
->
priv_data
;
...
@@ -1061,7 +1061,7 @@ static int decode_frame(AVCodecContext *avctx,
...
@@ -1061,7 +1061,7 @@ static int decode_frame(AVCodecContext *avctx,
cleanup
(
s
);
cleanup
(
s
);
*
data_size
=
sizeof
(
AVPicture
)
;
*
got_frame
=
1
;
*
picture
=
s
->
picture
;
*
picture
=
s
->
picture
;
return
bytestream2_tell
(
&
s
->
g
);
return
bytestream2_tell
(
&
s
->
g
);
...
...
libavcodec/libstagefright.cpp
View file @
4012cd6c
...
@@ -354,7 +354,7 @@ fail:
...
@@ -354,7 +354,7 @@ fail:
}
}
static
int
Stagefright_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
Stagefright_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
StagefrightContext
*
s
=
(
StagefrightContext
*
)
avctx
->
priv_data
;
StagefrightContext
*
s
=
(
StagefrightContext
*
)
avctx
->
priv_data
;
Frame
*
frame
;
Frame
*
frame
;
...
@@ -463,7 +463,7 @@ static int Stagefright_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -463,7 +463,7 @@ static int Stagefright_decode_frame(AVCodecContext *avctx, void *data,
}
}
s
->
prev_frame
=
ret_frame
;
s
->
prev_frame
=
ret_frame
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
ret_frame
;
*
(
AVFrame
*
)
data
=
*
ret_frame
;
return
orig_size
;
return
orig_size
;
}
}
...
...
libavcodec/libutvideodec.cpp
View file @
4012cd6c
...
@@ -115,7 +115,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
...
@@ -115,7 +115,7 @@ static av_cold int utvideo_decode_init(AVCodecContext *avctx)
}
}
static
int
utvideo_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
utvideo_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
UtVideoContext
*
utv
=
(
UtVideoContext
*
)
avctx
->
priv_data
;
UtVideoContext
*
utv
=
(
UtVideoContext
*
)
avctx
->
priv_data
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
...
@@ -150,7 +150,7 @@ static int utvideo_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -150,7 +150,7 @@ static int utvideo_decode_frame(AVCodecContext *avctx, void *data,
break
;
break
;
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
pic
;
*
(
AVFrame
*
)
data
=
*
pic
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/paf.c
View file @
4012cd6c
...
@@ -245,7 +245,7 @@ static int decode_0(AVCodecContext *avctx, uint8_t code, uint8_t *pkt)
...
@@ -245,7 +245,7 @@ static int decode_0(AVCodecContext *avctx, uint8_t code, uint8_t *pkt)
}
}
static
int
paf_vid_decode
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
paf_vid_decode
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
pkt
)
int
*
got_fram
e
,
AVPacket
*
pkt
)
{
{
PAFVideoDecContext
*
c
=
avctx
->
priv_data
;
PAFVideoDecContext
*
c
=
avctx
->
priv_data
;
uint8_t
code
,
*
dst
,
*
src
,
*
end
;
uint8_t
code
,
*
dst
,
*
src
,
*
end
;
...
@@ -357,7 +357,7 @@ static int paf_vid_decode(AVCodecContext *avctx, void *data,
...
@@ -357,7 +357,7 @@ static int paf_vid_decode(AVCodecContext *avctx, void *data,
c
->
current_frame
=
(
c
->
current_frame
+
1
)
&
3
;
c
->
current_frame
=
(
c
->
current_frame
+
1
)
&
3
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
c
->
pic
;
*
(
AVFrame
*
)
data
=
c
->
pic
;
return
pkt
->
size
;
return
pkt
->
size
;
...
...
libavcodec/proresdec2.c
View file @
4012cd6c
...
@@ -522,7 +522,7 @@ static int decode_picture(AVCodecContext *avctx)
...
@@ -522,7 +522,7 @@ static int decode_picture(AVCodecContext *avctx)
return
0
;
return
0
;
}
}
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
static
int
decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
ProresContext
*
ctx
=
avctx
->
priv_data
;
ProresContext
*
ctx
=
avctx
->
priv_data
;
...
@@ -574,7 +574,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
...
@@ -574,7 +574,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
goto
decode_picture
;
goto
decode_picture
;
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
frame
;
*
(
AVFrame
*
)
data
=
*
frame
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/targa_y216dec.c
View file @
4012cd6c
...
@@ -38,7 +38,7 @@ static av_cold int y216_decode_init(AVCodecContext *avctx)
...
@@ -38,7 +38,7 @@ static av_cold int y216_decode_init(AVCodecContext *avctx)
}
}
static
int
y216_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
y216_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
AVFrame
*
pic
=
avctx
->
coded_frame
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
const
uint16_t
*
src
=
(
uint16_t
*
)
avpkt
->
data
;
const
uint16_t
*
src
=
(
uint16_t
*
)
avpkt
->
data
;
...
@@ -81,7 +81,7 @@ static int y216_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -81,7 +81,7 @@ static int y216_decode_frame(AVCodecContext *avctx, void *data,
src
+=
aligned_width
<<
1
;
src
+=
aligned_width
<<
1
;
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
pic
;
*
(
AVFrame
*
)
data
=
*
pic
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/v308dec.c
View file @
4012cd6c
...
@@ -40,7 +40,7 @@ static av_cold int v308_decode_init(AVCodecContext *avctx)
...
@@ -40,7 +40,7 @@ static av_cold int v308_decode_init(AVCodecContext *avctx)
}
}
static
int
v308_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
v308_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
AVFrame
*
pic
=
avctx
->
coded_frame
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
const
uint8_t
*
src
=
avpkt
->
data
;
const
uint8_t
*
src
=
avpkt
->
data
;
...
@@ -81,7 +81,7 @@ static int v308_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -81,7 +81,7 @@ static int v308_decode_frame(AVCodecContext *avctx, void *data,
v
+=
pic
->
linesize
[
2
];
v
+=
pic
->
linesize
[
2
];
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
pic
;
*
(
AVFrame
*
)
data
=
*
pic
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/v408dec.c
View file @
4012cd6c
...
@@ -37,7 +37,7 @@ static av_cold int v408_decode_init(AVCodecContext *avctx)
...
@@ -37,7 +37,7 @@ static av_cold int v408_decode_init(AVCodecContext *avctx)
}
}
static
int
v408_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
v408_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
AVFrame
*
pic
=
avctx
->
coded_frame
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
const
uint8_t
*
src
=
avpkt
->
data
;
const
uint8_t
*
src
=
avpkt
->
data
;
...
@@ -88,7 +88,7 @@ static int v408_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -88,7 +88,7 @@ static int v408_decode_frame(AVCodecContext *avctx, void *data,
a
+=
pic
->
linesize
[
3
];
a
+=
pic
->
linesize
[
3
];
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
pic
;
*
(
AVFrame
*
)
data
=
*
pic
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/vda_h264_dec.c
View file @
4012cd6c
...
@@ -84,14 +84,14 @@ static void release_buffer(AVCodecContext *avctx, AVFrame *pic)
...
@@ -84,14 +84,14 @@ static void release_buffer(AVCodecContext *avctx, AVFrame *pic)
}
}
static
int
vdadec_decode
(
AVCodecContext
*
avctx
,
static
int
vdadec_decode
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
VDADecoderContext
*
ctx
=
avctx
->
priv_data
;
VDADecoderContext
*
ctx
=
avctx
->
priv_data
;
AVFrame
*
pic
=
data
;
AVFrame
*
pic
=
data
;
int
ret
;
int
ret
;
ret
=
ff_h264_decoder
.
decode
(
avctx
,
data
,
data_siz
e
,
avpkt
);
ret
=
ff_h264_decoder
.
decode
(
avctx
,
data
,
got_fram
e
,
avpkt
);
if
(
*
data_siz
e
)
{
if
(
*
got_fram
e
)
{
CVPixelBufferRef
cv_buffer
=
(
CVPixelBufferRef
)
pic
->
data
[
3
];
CVPixelBufferRef
cv_buffer
=
(
CVPixelBufferRef
)
pic
->
data
[
3
];
CVPixelBufferLockBaseAddress
(
cv_buffer
,
0
);
CVPixelBufferLockBaseAddress
(
cv_buffer
,
0
);
pic
->
format
=
ctx
->
pix_fmt
;
pic
->
format
=
ctx
->
pix_fmt
;
...
...
libavcodec/xbmdec.c
View file @
4012cd6c
...
@@ -45,7 +45,7 @@ static int convert(uint8_t x)
...
@@ -45,7 +45,7 @@ static int convert(uint8_t x)
}
}
static
int
xbm_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
xbm_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
AVFrame
*
p
=
avctx
->
coded_frame
;
AVFrame
*
p
=
avctx
->
coded_frame
;
const
uint8_t
*
end
,
*
ptr
=
avpkt
->
data
;
const
uint8_t
*
end
,
*
ptr
=
avpkt
->
data
;
...
@@ -110,7 +110,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -110,7 +110,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
p
->
key_frame
=
1
;
p
->
key_frame
=
1
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
p
->
pict_type
=
AV_PICTURE_TYPE_I
;
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
p
;
*
(
AVFrame
*
)
data
=
*
p
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/xfacedec.c
View file @
4012cd6c
...
@@ -124,7 +124,7 @@ static av_cold int xface_decode_close(AVCodecContext *avctx)
...
@@ -124,7 +124,7 @@ static av_cold int xface_decode_close(AVCodecContext *avctx)
}
}
static
int
xface_decode_frame
(
AVCodecContext
*
avctx
,
static
int
xface_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
void
*
data
,
int
*
got_fram
e
,
AVPacket
*
avpkt
)
AVPacket
*
avpkt
)
{
{
XFaceContext
*
xface
=
avctx
->
priv_data
;
XFaceContext
*
xface
=
avctx
->
priv_data
;
...
@@ -189,7 +189,7 @@ static int xface_decode_frame(AVCodecContext *avctx,
...
@@ -189,7 +189,7 @@ static int xface_decode_frame(AVCodecContext *avctx,
}
}
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
xface
->
frame
;
*
(
AVFrame
*
)
data
=
xface
->
frame
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/y41pdec.c
View file @
4012cd6c
...
@@ -42,7 +42,7 @@ static av_cold int y41p_decode_init(AVCodecContext *avctx)
...
@@ -42,7 +42,7 @@ static av_cold int y41p_decode_init(AVCodecContext *avctx)
}
}
static
int
y41p_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
y41p_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
AVFrame
*
pic
=
avctx
->
coded_frame
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
uint8_t
*
src
=
avpkt
->
data
;
uint8_t
*
src
=
avpkt
->
data
;
...
@@ -89,7 +89,7 @@ static int y41p_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -89,7 +89,7 @@ static int y41p_decode_frame(AVCodecContext *avctx, void *data,
}
}
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
pic
;
*
(
AVFrame
*
)
data
=
*
pic
;
return
avpkt
->
size
;
return
avpkt
->
size
;
...
...
libavcodec/yuv4dec.c
View file @
4012cd6c
...
@@ -38,7 +38,7 @@ static av_cold int yuv4_decode_init(AVCodecContext *avctx)
...
@@ -38,7 +38,7 @@ static av_cold int yuv4_decode_init(AVCodecContext *avctx)
}
}
static
int
yuv4_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
static
int
yuv4_decode_frame
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_siz
e
,
AVPacket
*
avpkt
)
int
*
got_fram
e
,
AVPacket
*
avpkt
)
{
{
AVFrame
*
pic
=
avctx
->
coded_frame
;
AVFrame
*
pic
=
avctx
->
coded_frame
;
const
uint8_t
*
src
=
avpkt
->
data
;
const
uint8_t
*
src
=
avpkt
->
data
;
...
@@ -82,7 +82,7 @@ static int yuv4_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -82,7 +82,7 @@ static int yuv4_decode_frame(AVCodecContext *avctx, void *data,
v
+=
pic
->
linesize
[
2
];
v
+=
pic
->
linesize
[
2
];
}
}
*
data_size
=
sizeof
(
AVFrame
)
;
*
got_frame
=
1
;
*
(
AVFrame
*
)
data
=
*
pic
;
*
(
AVFrame
*
)
data
=
*
pic
;
return
avpkt
->
size
;
return
avpkt
->
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