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
e7021c0e
Commit
e7021c0e
authored
Apr 12, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc: remove FF_API_HURRY_UP cruft
parent
73a4f7c2
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
2 additions
and
96 deletions
+2
-96
avcodec.h
libavcodec/avcodec.h
+0
-10
h261dec.c
libavcodec/h261dec.c
+0
-4
h263dec.c
libavcodec/h263dec.c
+0
-8
h264.c
libavcodec/h264.c
+2
-16
mpeg12.c
libavcodec/mpeg12.c
+0
-8
mpegvideo.c
libavcodec/mpegvideo.c
+0
-6
mpegvideo.h
libavcodec/mpegvideo.h
+0
-5
options.c
libavcodec/options.c
+0
-3
pthread.c
libavcodec/pthread.c
+0
-3
rv34.c
libavcodec/rv34.c
+0
-9
svq1dec.c
libavcodec/svq1dec.c
+0
-3
svq3.c
libavcodec/svq3.c
+0
-8
vc1dec.c
libavcodec/vc1dec.c
+0
-10
version.h
libavcodec/version.h
+0
-3
No files found.
libavcodec/avcodec.h
View file @
e7021c0e
...
...
@@ -1314,16 +1314,6 @@ typedef struct AVCodecContext {
int
b_frame_strategy
;
#if FF_API_HURRY_UP
/**
* hurry up amount
* - encoding: unused
* - decoding: Set by user. 1-> Skip B-frames, 2-> Skip IDCT/dequant too, 5-> Skip everything except header
* @deprecated Deprecated in favor of skip_idct and skip_frame.
*/
attribute_deprecated
int
hurry_up
;
#endif
struct
AVCodec
*
codec
;
void
*
priv_data
;
...
...
libavcodec/h261dec.c
View file @
e7021c0e
...
...
@@ -599,10 +599,6 @@ retry:
s
->
current_picture
.
pict_type
=
s
->
pict_type
;
s
->
current_picture
.
key_frame
=
s
->
pict_type
==
FF_I_TYPE
;
#if FF_API_HURRY_UP
/* skip everything if we are in a hurry>=5 */
if
(
avctx
->
hurry_up
>=
5
)
return
get_consumed_bytes
(
s
,
buf_size
);
#endif
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
FF_B_TYPE
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
FF_I_TYPE
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
...
...
libavcodec/h263dec.c
View file @
e7021c0e
...
...
@@ -597,18 +597,10 @@ retry:
/* skip B-frames if we don't have reference frames */
if
(
s
->
last_picture_ptr
==
NULL
&&
(
s
->
pict_type
==
FF_B_TYPE
||
s
->
dropable
))
return
get_consumed_bytes
(
s
,
buf_size
);
#if FF_API_HURRY_UP
/* skip b frames if we are in a hurry */
if
(
avctx
->
hurry_up
&&
s
->
pict_type
==
FF_B_TYPE
)
return
get_consumed_bytes
(
s
,
buf_size
);
#endif
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
FF_B_TYPE
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
FF_I_TYPE
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
return
get_consumed_bytes
(
s
,
buf_size
);
#if FF_API_HURRY_UP
/* skip everything if we are in a hurry>=5 */
if
(
avctx
->
hurry_up
>=
5
)
return
get_consumed_bytes
(
s
,
buf_size
);
#endif
if
(
s
->
next_p_frame_damaged
){
if
(
s
->
pict_type
==
FF_B_TYPE
)
...
...
libavcodec/h264.c
View file @
e7021c0e
...
...
@@ -2821,11 +2821,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
buf_index
+=
consumed
;
//FIXME do not discard SEI id
if
(
#if FF_API_HURRY_UP
(
s
->
hurry_up
==
1
&&
h
->
nal_ref_idc
==
0
)
||
#endif
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
h
->
nal_ref_idc
==
0
))
if
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
h
->
nal_ref_idc
==
0
)
continue
;
again
:
...
...
@@ -2857,9 +2853,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
(
hx
->
nal_unit_type
==
NAL_IDR_SLICE
)
||
(
h
->
sei_recovery_frame_cnt
>=
0
);
if
(
hx
->
redundant_pic_count
==
0
#if FF_API_HURRY_UP
&&
hx
->
s
.
hurry_up
<
5
#endif
&&
(
avctx
->
skip_frame
<
AVDISCARD_NONREF
||
hx
->
nal_ref_idc
)
&&
(
avctx
->
skip_frame
<
AVDISCARD_BIDIR
||
hx
->
slice_type_nos
!=
FF_B_TYPE
)
&&
(
avctx
->
skip_frame
<
AVDISCARD_NONKEY
||
hx
->
slice_type_nos
==
FF_I_TYPE
)
...
...
@@ -2897,9 +2890,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
if
(
hx
->
redundant_pic_count
==
0
&&
hx
->
intra_gb_ptr
&&
hx
->
s
.
data_partitioning
&&
s
->
context_initialized
#if FF_API_HURRY_UP
&&
s
->
hurry_up
<
5
#endif
&&
(
avctx
->
skip_frame
<
AVDISCARD_NONREF
||
hx
->
nal_ref_idc
)
&&
(
avctx
->
skip_frame
<
AVDISCARD_BIDIR
||
hx
->
slice_type_nos
!=
FF_B_TYPE
)
&&
(
avctx
->
skip_frame
<
AVDISCARD_NONKEY
||
hx
->
slice_type_nos
==
FF_I_TYPE
)
...
...
@@ -3020,11 +3010,7 @@ static int decode_frame(AVCodecContext *avctx,
}
if
(
!
(
s
->
flags2
&
CODEC_FLAG2_CHUNKS
)
&&
!
s
->
current_picture_ptr
){
if
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
#if FF_API_HURRY_UP
||
s
->
hurry_up
#endif
)
if
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
)
return
0
;
av_log
(
avctx
,
AV_LOG_ERROR
,
"no frame!
\n
"
);
return
-
1
;
...
...
libavcodec/mpeg12.c
View file @
e7021c0e
...
...
@@ -2398,18 +2398,10 @@ static int decode_chunks(AVCodecContext *avctx,
/* Skip P-frames if we do not have a reference frame or we have an invalid header. */
if
(
s2
->
pict_type
==
FF_P_TYPE
&&
!
s
->
sync
)
break
;
}
#if FF_API_HURRY_UP
/* Skip B-frames if we are in a hurry. */
if
(
avctx
->
hurry_up
&&
s2
->
pict_type
==
FF_B_TYPE
)
break
;
#endif
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s2
->
pict_type
==
FF_B_TYPE
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s2
->
pict_type
!=
FF_I_TYPE
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
break
;
#if FF_API_HURRY_UP
/* Skip everything if we are in a hurry>=5. */
if
(
avctx
->
hurry_up
>=
5
)
break
;
#endif
if
(
!
s
->
mpeg_enc_ctx_allocated
)
break
;
...
...
libavcodec/mpegvideo.c
View file @
e7021c0e
...
...
@@ -1025,9 +1025,6 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
}
#if FF_API_HURRY_UP
s
->
hurry_up
=
s
->
avctx
->
hurry_up
;
#endif
s
->
error_recognition
=
avctx
->
error_recognition
;
/* set dequantizer, we can't do it during init as it might change for mpeg4
...
...
@@ -1964,9 +1961,6 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
}
/* skip dequant / idct if we are really late ;) */
#if FF_API_HURRY_UP
if
(
s
->
hurry_up
>
1
)
goto
skip_idct
;
#endif
if
(
s
->
avctx
->
skip_idct
){
if
(
(
s
->
avctx
->
skip_idct
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
FF_B_TYPE
)
||
(
s
->
avctx
->
skip_idct
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
FF_I_TYPE
)
...
...
libavcodec/mpegvideo.h
View file @
e7021c0e
...
...
@@ -387,11 +387,6 @@ typedef struct MpegEncContext {
int
no_rounding
;
/**< apply no rounding to motion compensation (MPEG4, msmpeg4, ...)
for b-frames rounding mode is always 0 */
#if FF_API_HURRY_UP
int
hurry_up
;
/**< when set to 1 during decoding, b frames will be skipped
when set to 2 idct/dequant will be skipped too */
#endif
/* macroblock layer */
int
mb_x
,
mb_y
;
int
mb_skip_run
;
...
...
libavcodec/options.c
View file @
e7021c0e
...
...
@@ -124,9 +124,6 @@ static const AVOption options[]={
{
"rc_strategy"
,
"ratecontrol method"
,
OFFSET
(
rc_strategy
),
FF_OPT_TYPE_INT
,
DEFAULT
,
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"b_strategy"
,
"strategy to choose between I/P/B-frames"
,
OFFSET
(
b_frame_strategy
),
FF_OPT_TYPE_INT
,
0
,
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"wpredp"
,
"weighted prediction analysis method"
,
OFFSET
(
weighted_p_pred
),
FF_OPT_TYPE_INT
,
0
,
INT_MIN
,
INT_MAX
,
V
|
E
},
#if FF_API_HURRY_UP
{
"hurry_up"
,
"deprecated, use skip_idct/skip_frame instead"
,
OFFSET
(
hurry_up
),
FF_OPT_TYPE_INT
,
DEFAULT
,
INT_MIN
,
INT_MAX
,
V
|
D
},
#endif
{
"ps"
,
"rtp payload size in bytes"
,
OFFSET
(
rtp_payload_size
),
FF_OPT_TYPE_INT
,
DEFAULT
,
INT_MIN
,
INT_MAX
,
V
|
E
},
{
"mv_bits"
,
NULL
,
OFFSET
(
mv_bits
),
FF_OPT_TYPE_INT
,
DEFAULT
,
INT_MIN
,
INT_MAX
},
{
"header_bits"
,
NULL
,
OFFSET
(
header_bits
),
FF_OPT_TYPE_INT
,
DEFAULT
,
INT_MIN
,
INT_MAX
},
...
...
libavcodec/pthread.c
View file @
e7021c0e
...
...
@@ -380,9 +380,6 @@ static void update_context_from_user(AVCodecContext *dst, AVCodecContext *src)
dst
->
release_buffer
=
src
->
release_buffer
;
dst
->
opaque
=
src
->
opaque
;
#if FF_API_HURRY_UP
dst
->
hurry_up
=
src
->
hurry_up
;
#endif
dst
->
dsp_mask
=
src
->
dsp_mask
;
dst
->
debug
=
src
->
debug
;
dst
->
debug_mv
=
src
->
debug_mv
;
...
...
libavcodec/rv34.c
View file @
e7021c0e
...
...
@@ -1454,19 +1454,10 @@ int ff_rv34_decode_frame(AVCodecContext *avctx,
}
if
((
!
s
->
last_picture_ptr
||
!
s
->
last_picture_ptr
->
data
[
0
])
&&
si
.
type
==
FF_B_TYPE
)
return
-
1
;
#if FF_API_HURRY_UP
/* skip b frames if we are in a hurry */
if
(
avctx
->
hurry_up
&&
si
.
type
==
FF_B_TYPE
)
return
buf_size
;
#endif
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
si
.
type
==
FF_B_TYPE
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
si
.
type
!=
FF_I_TYPE
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
return
buf_size
;
#if FF_API_HURRY_UP
/* skip everything if we are in a hurry>=5 */
if
(
avctx
->
hurry_up
>=
5
)
return
buf_size
;
#endif
for
(
i
=
0
;
i
<
slice_count
;
i
++
){
int
offset
=
get_slice_offset
(
avctx
,
slices_hdr
,
i
);
...
...
libavcodec/svq1dec.c
View file @
e7021c0e
...
...
@@ -684,9 +684,6 @@ static int svq1_decode_frame(AVCodecContext *avctx,
//this should be removed after libavcodec can handle more flexible picture types & ordering
if
(
s
->
pict_type
==
FF_B_TYPE
&&
s
->
last_picture_ptr
==
NULL
)
return
buf_size
;
#if FF_API_HURRY_UP
if
(
avctx
->
hurry_up
&&
s
->
pict_type
==
FF_B_TYPE
)
return
buf_size
;
#endif
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
FF_B_TYPE
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
FF_I_TYPE
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
...
...
libavcodec/svq3.c
View file @
e7021c0e
...
...
@@ -952,14 +952,6 @@ static int svq3_decode_frame(AVCodecContext *avctx,
/* Skip B-frames if we do not have reference frames. */
if
(
s
->
last_picture_ptr
==
NULL
&&
s
->
pict_type
==
FF_B_TYPE
)
return
0
;
#if FF_API_HURRY_UP
/* Skip B-frames if we are in a hurry. */
if
(
avctx
->
hurry_up
&&
s
->
pict_type
==
FF_B_TYPE
)
return
0
;
/* Skip everything if we are in a hurry >= 5. */
if
(
avctx
->
hurry_up
>=
5
)
return
0
;
#endif
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
FF_B_TYPE
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
FF_I_TYPE
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
...
...
libavcodec/vc1dec.c
View file @
e7021c0e
...
...
@@ -3510,21 +3510,11 @@ static int vc1_decode_frame(AVCodecContext *avctx,
if
(
s
->
last_picture_ptr
==
NULL
&&
(
s
->
pict_type
==
FF_B_TYPE
||
s
->
dropable
)){
goto
err
;
}
#if FF_API_HURRY_UP
/* skip b frames if we are in a hurry */
if
(
avctx
->
hurry_up
&&
s
->
pict_type
==
FF_B_TYPE
)
return
-
1
;
//buf_size;
#endif
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
FF_B_TYPE
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
FF_I_TYPE
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
{
goto
end
;
}
#if FF_API_HURRY_UP
/* skip everything if we are in a hurry>=5 */
if
(
avctx
->
hurry_up
>=
5
)
{
goto
err
;
}
#endif
if
(
s
->
next_p_frame_damaged
){
if
(
s
->
pict_type
==
FF_B_TYPE
)
...
...
libavcodec/version.h
View file @
e7021c0e
...
...
@@ -47,9 +47,6 @@
#ifndef FF_API_OLD_AUDIOCONVERT
#define FF_API_OLD_AUDIOCONVERT (LIBAVCODEC_VERSION_MAJOR < 54)
#endif
#ifndef FF_API_HURRY_UP
#define FF_API_HURRY_UP (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
#ifndef FF_API_RATE_EMU
#define FF_API_RATE_EMU (LIBAVCODEC_VERSION_MAJOR < 53)
#endif
...
...
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