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
ba0c8981
Commit
ba0c8981
authored
Dec 07, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosmetics: Fix dropable --> droppable typo
parent
1dd1c1c8
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
28 deletions
+31
-28
flvdec.c
libavcodec/flvdec.c
+4
-3
h263dec.c
libavcodec/h263dec.c
+3
-1
h264.c
libavcodec/h264.c
+18
-18
mpegvideo.c
libavcodec/mpegvideo.c
+4
-4
mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
vc1dec.c
libavcodec/vc1dec.c
+1
-1
No files found.
libavcodec/flvdec.c
View file @
ba0c8981
...
@@ -89,8 +89,8 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
...
@@ -89,8 +89,8 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
s
->
height
=
height
;
s
->
height
=
height
;
s
->
pict_type
=
AV_PICTURE_TYPE_I
+
get_bits
(
&
s
->
gb
,
2
);
s
->
pict_type
=
AV_PICTURE_TYPE_I
+
get_bits
(
&
s
->
gb
,
2
);
s
->
drop
able
=
s
->
pict_type
>
AV_PICTURE_TYPE_P
;
s
->
drop
pable
=
s
->
pict_type
>
AV_PICTURE_TYPE_P
;
if
(
s
->
dropable
)
if
(
s
->
drop
p
able
)
s
->
pict_type
=
AV_PICTURE_TYPE_P
;
s
->
pict_type
=
AV_PICTURE_TYPE_P
;
skip_bits1
(
&
s
->
gb
);
/* deblocking flag */
skip_bits1
(
&
s
->
gb
);
/* deblocking flag */
...
@@ -109,7 +109,8 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
...
@@ -109,7 +109,8 @@ int ff_flv_decode_picture_header(MpegEncContext *s)
if
(
s
->
avctx
->
debug
&
FF_DEBUG_PICT_INFO
){
if
(
s
->
avctx
->
debug
&
FF_DEBUG_PICT_INFO
){
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"%c esc_type:%d, qp:%d num:%d
\n
"
,
av_log
(
s
->
avctx
,
AV_LOG_DEBUG
,
"%c esc_type:%d, qp:%d num:%d
\n
"
,
s
->
dropable
?
'D'
:
av_get_picture_type_char
(
s
->
pict_type
),
s
->
h263_flv
-
1
,
s
->
qscale
,
s
->
picture_number
);
s
->
droppable
?
'D'
:
av_get_picture_type_char
(
s
->
pict_type
),
s
->
h263_flv
-
1
,
s
->
qscale
,
s
->
picture_number
);
}
}
s
->
y_dc_scale_table
=
s
->
y_dc_scale_table
=
...
...
libavcodec/h263dec.c
View file @
ba0c8981
...
@@ -600,7 +600,9 @@ retry:
...
@@ -600,7 +600,9 @@ retry:
s
->
current_picture
.
f
.
key_frame
=
s
->
pict_type
==
AV_PICTURE_TYPE_I
;
s
->
current_picture
.
f
.
key_frame
=
s
->
pict_type
==
AV_PICTURE_TYPE_I
;
/* skip B-frames if we don't have reference frames */
/* skip B-frames if we don't have reference frames */
if
(
s
->
last_picture_ptr
==
NULL
&&
(
s
->
pict_type
==
AV_PICTURE_TYPE_B
||
s
->
dropable
))
return
get_consumed_bytes
(
s
,
buf_size
);
if
(
s
->
last_picture_ptr
==
NULL
&&
(
s
->
pict_type
==
AV_PICTURE_TYPE_B
||
s
->
droppable
))
return
get_consumed_bytes
(
s
,
buf_size
);
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
AV_PICTURE_TYPE_B
)
if
(
(
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
AV_PICTURE_TYPE_B
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
AV_PICTURE_TYPE_I
)
||
(
avctx
->
skip_frame
>=
AVDISCARD_NONKEY
&&
s
->
pict_type
!=
AV_PICTURE_TYPE_I
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
||
avctx
->
skip_frame
>=
AVDISCARD_ALL
)
...
...
libavcodec/h264.c
View file @
ba0c8981
...
@@ -1226,7 +1226,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
...
@@ -1226,7 +1226,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
if
(
!
s
->
current_picture_ptr
)
if
(
!
s
->
current_picture_ptr
)
return
0
;
return
0
;
if
(
!
s
->
dropable
)
{
if
(
!
s
->
drop
p
able
)
{
err
=
ff_h264_execute_ref_pic_marking
(
h
,
h
->
mmco
,
h
->
mmco_index
);
err
=
ff_h264_execute_ref_pic_marking
(
h
,
h
->
mmco
,
h
->
mmco_index
);
h
->
prev_poc_msb
=
h
->
poc_msb
;
h
->
prev_poc_msb
=
h
->
poc_msb
;
h
->
prev_poc_lsb
=
h
->
poc_lsb
;
h
->
prev_poc_lsb
=
h
->
poc_lsb
;
...
@@ -2235,7 +2235,7 @@ static int field_end(H264Context *h, int in_setup)
...
@@ -2235,7 +2235,7 @@ static int field_end(H264Context *h, int in_setup)
int
err
=
0
;
int
err
=
0
;
s
->
mb_y
=
0
;
s
->
mb_y
=
0
;
if
(
!
in_setup
&&
!
s
->
dropable
)
if
(
!
in_setup
&&
!
s
->
drop
p
able
)
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
INT_MAX
,
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
INT_MAX
,
s
->
picture_structure
==
PICT_BOTTOM_FIELD
);
s
->
picture_structure
==
PICT_BOTTOM_FIELD
);
...
@@ -2244,7 +2244,7 @@ static int field_end(H264Context *h, int in_setup)
...
@@ -2244,7 +2244,7 @@ static int field_end(H264Context *h, int in_setup)
ff_vdpau_h264_set_reference_frames
(
s
);
ff_vdpau_h264_set_reference_frames
(
s
);
if
(
in_setup
||
!
(
avctx
->
active_thread_type
&
FF_THREAD_FRAME
))
{
if
(
in_setup
||
!
(
avctx
->
active_thread_type
&
FF_THREAD_FRAME
))
{
if
(
!
s
->
dropable
)
{
if
(
!
s
->
drop
p
able
)
{
err
=
ff_h264_execute_ref_pic_marking
(
h
,
h
->
mmco
,
h
->
mmco_index
);
err
=
ff_h264_execute_ref_pic_marking
(
h
,
h
->
mmco
,
h
->
mmco_index
);
h
->
prev_poc_msb
=
h
->
poc_msb
;
h
->
prev_poc_msb
=
h
->
poc_msb
;
h
->
prev_poc_lsb
=
h
->
poc_lsb
;
h
->
prev_poc_lsb
=
h
->
poc_lsb
;
...
@@ -2359,7 +2359,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2359,7 +2359,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
int
num_ref_idx_active_override_flag
,
max_refs
;
int
num_ref_idx_active_override_flag
,
max_refs
;
unsigned
int
slice_type
,
tmp
,
i
,
j
;
unsigned
int
slice_type
,
tmp
,
i
,
j
;
int
default_ref_list_done
=
0
;
int
default_ref_list_done
=
0
;
int
last_pic_structure
,
last_pic_dropable
;
int
last_pic_structure
,
last_pic_drop
p
able
;
/* FIXME: 2tap qpel isn't implemented for high bit depth. */
/* FIXME: 2tap qpel isn't implemented for high bit depth. */
if
((
s
->
avctx
->
flags2
&
CODEC_FLAG2_FAST
)
&&
if
((
s
->
avctx
->
flags2
&
CODEC_FLAG2_FAST
)
&&
...
@@ -2380,7 +2380,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2380,7 +2380,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h0
->
current_slice
=
0
;
h0
->
current_slice
=
0
;
if
(
!
s0
->
first_field
)
{
if
(
!
s0
->
first_field
)
{
if
(
s
->
current_picture_ptr
&&
!
s
->
dropable
&&
if
(
s
->
current_picture_ptr
&&
!
s
->
drop
p
able
&&
s
->
current_picture_ptr
->
owner2
==
s
)
{
s
->
current_picture_ptr
->
owner2
==
s
)
{
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
INT_MAX
,
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
INT_MAX
,
s
->
picture_structure
==
PICT_BOTTOM_FIELD
);
s
->
picture_structure
==
PICT_BOTTOM_FIELD
);
...
@@ -2601,8 +2601,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2601,8 +2601,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
h
->
mb_mbaff
=
0
;
h
->
mb_mbaff
=
0
;
h
->
mb_aff_frame
=
0
;
h
->
mb_aff_frame
=
0
;
last_pic_structure
=
s0
->
picture_structure
;
last_pic_structure
=
s0
->
picture_structure
;
last_pic_drop
able
=
s0
->
dro
pable
;
last_pic_drop
pable
=
s0
->
drop
pable
;
s
->
drop
able
=
h
->
nal_ref_idc
==
0
;
s
->
drop
pable
=
h
->
nal_ref_idc
==
0
;
if
(
h
->
sps
.
frame_mbs_only_flag
)
{
if
(
h
->
sps
.
frame_mbs_only_flag
)
{
s
->
picture_structure
=
PICT_FRAME
;
s
->
picture_structure
=
PICT_FRAME
;
}
else
{
}
else
{
...
@@ -2617,12 +2617,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2617,12 +2617,12 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
if
(
h0
->
current_slice
!=
0
)
{
if
(
h0
->
current_slice
!=
0
)
{
if
(
last_pic_structure
!=
s
->
picture_structure
||
if
(
last_pic_structure
!=
s
->
picture_structure
||
last_pic_drop
able
!=
s
->
dro
pable
)
{
last_pic_drop
pable
!=
s
->
drop
pable
)
{
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
av_log
(
h
->
s
.
avctx
,
AV_LOG_ERROR
,
"Changing field mode (%d -> %d) between slices is not allowed
\n
"
,
"Changing field mode (%d -> %d) between slices is not allowed
\n
"
,
last_pic_structure
,
s
->
picture_structure
);
last_pic_structure
,
s
->
picture_structure
);
s
->
picture_structure
=
last_pic_structure
;
s
->
picture_structure
=
last_pic_structure
;
s
->
drop
able
=
last_pic_dro
pable
;
s
->
drop
pable
=
last_pic_drop
pable
;
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
else
if
(
!
s0
->
current_picture_ptr
)
{
}
else
if
(
!
s0
->
current_picture_ptr
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
...
@@ -2660,7 +2660,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2660,7 +2660,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
assert
(
s0
->
current_picture_ptr
->
f
.
reference
!=
DELAYED_PIC_REF
);
assert
(
s0
->
current_picture_ptr
->
f
.
reference
!=
DELAYED_PIC_REF
);
/* Mark old field/frame as completed */
/* Mark old field/frame as completed */
if
(
!
last_pic_dropable
&&
s0
->
current_picture_ptr
->
owner2
==
s0
)
{
if
(
!
last_pic_drop
p
able
&&
s0
->
current_picture_ptr
->
owner2
==
s0
)
{
ff_thread_report_progress
(
&
s0
->
current_picture_ptr
->
f
,
INT_MAX
,
ff_thread_report_progress
(
&
s0
->
current_picture_ptr
->
f
,
INT_MAX
,
last_pic_structure
==
PICT_BOTTOM_FIELD
);
last_pic_structure
==
PICT_BOTTOM_FIELD
);
}
}
...
@@ -2669,7 +2669,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2669,7 +2669,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
if
(
!
FIELD_PICTURE
||
s
->
picture_structure
==
last_pic_structure
)
{
if
(
!
FIELD_PICTURE
||
s
->
picture_structure
==
last_pic_structure
)
{
/* Previous field is unmatched. Don't display it, but let it
/* Previous field is unmatched. Don't display it, but let it
* remain for reference if marked as such. */
* remain for reference if marked as such. */
if
(
!
last_pic_dropable
&&
last_pic_structure
!=
PICT_FRAME
)
{
if
(
!
last_pic_drop
p
able
&&
last_pic_structure
!=
PICT_FRAME
)
{
ff_thread_report_progress
(
&
s0
->
current_picture_ptr
->
f
,
INT_MAX
,
ff_thread_report_progress
(
&
s0
->
current_picture_ptr
->
f
,
INT_MAX
,
last_pic_structure
==
PICT_TOP_FIELD
);
last_pic_structure
==
PICT_TOP_FIELD
);
}
}
...
@@ -2679,7 +2679,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2679,7 +2679,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
* different frame_nums. Consider this field first in
* different frame_nums. Consider this field first in
* pair. Throw away previous field except for reference
* pair. Throw away previous field except for reference
* purposes. */
* purposes. */
if
(
!
last_pic_dropable
&&
last_pic_structure
!=
PICT_FRAME
)
{
if
(
!
last_pic_drop
p
able
&&
last_pic_structure
!=
PICT_FRAME
)
{
ff_thread_report_progress
(
&
s0
->
current_picture_ptr
->
f
,
INT_MAX
,
ff_thread_report_progress
(
&
s0
->
current_picture_ptr
->
f
,
INT_MAX
,
last_pic_structure
==
PICT_TOP_FIELD
);
last_pic_structure
==
PICT_TOP_FIELD
);
}
}
...
@@ -2693,14 +2693,14 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
...
@@ -2693,14 +2693,14 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
"Invalid field mode combination %d/%d
\n
"
,
"Invalid field mode combination %d/%d
\n
"
,
last_pic_structure
,
s
->
picture_structure
);
last_pic_structure
,
s
->
picture_structure
);
s
->
picture_structure
=
last_pic_structure
;
s
->
picture_structure
=
last_pic_structure
;
s
->
drop
able
=
last_pic_dro
pable
;
s
->
drop
pable
=
last_pic_drop
pable
;
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
else
if
(
last_pic_drop
able
!=
s
->
dro
pable
)
{
}
else
if
(
last_pic_drop
pable
!=
s
->
drop
pable
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"Cannot combine reference and non-reference fields in the same frame
\n
"
);
"Cannot combine reference and non-reference fields in the same frame
\n
"
);
av_log_ask_for_sample
(
s
->
avctx
,
NULL
);
av_log_ask_for_sample
(
s
->
avctx
,
NULL
);
s
->
picture_structure
=
last_pic_structure
;
s
->
picture_structure
=
last_pic_structure
;
s
->
drop
able
=
last_pic_dro
pable
;
s
->
drop
pable
=
last_pic_drop
pable
;
return
AVERROR_INVALIDDATA
;
return
AVERROR_INVALIDDATA
;
}
}
...
@@ -3438,7 +3438,7 @@ static void decode_finish_row(H264Context *h)
...
@@ -3438,7 +3438,7 @@ static void decode_finish_row(H264Context *h)
ff_draw_horiz_band
(
s
,
top
,
height
);
ff_draw_horiz_band
(
s
,
top
,
height
);
if
(
s
->
dropable
)
if
(
s
->
drop
p
able
)
return
;
return
;
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
top
+
height
-
1
,
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
top
+
height
-
1
,
...
@@ -3641,7 +3641,7 @@ static int execute_decode_slices(H264Context *h, int context_count)
...
@@ -3641,7 +3641,7 @@ static int execute_decode_slices(H264Context *h, int context_count)
hx
=
h
->
thread_context
[
context_count
-
1
];
hx
=
h
->
thread_context
[
context_count
-
1
];
s
->
mb_x
=
hx
->
s
.
mb_x
;
s
->
mb_x
=
hx
->
s
.
mb_x
;
s
->
mb_y
=
hx
->
s
.
mb_y
;
s
->
mb_y
=
hx
->
s
.
mb_y
;
s
->
drop
able
=
hx
->
s
.
dro
pable
;
s
->
drop
pable
=
hx
->
s
.
drop
pable
;
s
->
picture_structure
=
hx
->
s
.
picture_structure
;
s
->
picture_structure
=
hx
->
s
.
picture_structure
;
for
(
i
=
1
;
i
<
context_count
;
i
++
)
for
(
i
=
1
;
i
<
context_count
;
i
++
)
h
->
s
.
error_count
+=
h
->
thread_context
[
i
]
->
s
.
error_count
;
h
->
s
.
error_count
+=
h
->
thread_context
[
i
]
->
s
.
error_count
;
...
@@ -3966,7 +3966,7 @@ again:
...
@@ -3966,7 +3966,7 @@ again:
end:
end:
/* clean up */
/* clean up */
if
(
s
->
current_picture_ptr
&&
s
->
current_picture_ptr
->
owner2
==
s
&&
if
(
s
->
current_picture_ptr
&&
s
->
current_picture_ptr
->
owner2
==
s
&&
!
s
->
dropable
)
{
!
s
->
drop
p
able
)
{
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
INT_MAX
,
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
f
,
INT_MAX
,
s
->
picture_structure
==
PICT_BOTTOM_FIELD
);
s
->
picture_structure
==
PICT_BOTTOM_FIELD
);
}
}
...
...
libavcodec/mpegvideo.c
View file @
ba0c8981
...
@@ -590,7 +590,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
...
@@ -590,7 +590,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
// B-frame info
// B-frame info
s
->
max_b_frames
=
s1
->
max_b_frames
;
s
->
max_b_frames
=
s1
->
max_b_frames
;
s
->
low_delay
=
s1
->
low_delay
;
s
->
low_delay
=
s1
->
low_delay
;
s
->
drop
able
=
s1
->
dro
pable
;
s
->
drop
pable
=
s1
->
drop
pable
;
// DivX handling (doesn't work)
// DivX handling (doesn't work)
s
->
divx_packed
=
s1
->
divx_packed
;
s
->
divx_packed
=
s1
->
divx_packed
;
...
@@ -1362,7 +1362,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
...
@@ -1362,7 +1362,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
}
pic
->
f
.
reference
=
0
;
pic
->
f
.
reference
=
0
;
if
(
!
s
->
dropable
)
{
if
(
!
s
->
drop
p
able
)
{
if
(
s
->
codec_id
==
AV_CODEC_ID_H264
)
if
(
s
->
codec_id
==
AV_CODEC_ID_H264
)
pic
->
f
.
reference
=
s
->
picture_structure
;
pic
->
f
.
reference
=
s
->
picture_structure
;
else
if
(
s
->
pict_type
!=
AV_PICTURE_TYPE_B
)
else
if
(
s
->
pict_type
!=
AV_PICTURE_TYPE_B
)
...
@@ -1397,7 +1397,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
...
@@ -1397,7 +1397,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
if
(
s
->
pict_type
!=
AV_PICTURE_TYPE_B
)
{
if
(
s
->
pict_type
!=
AV_PICTURE_TYPE_B
)
{
s
->
last_picture_ptr
=
s
->
next_picture_ptr
;
s
->
last_picture_ptr
=
s
->
next_picture_ptr
;
if
(
!
s
->
dropable
)
if
(
!
s
->
drop
p
able
)
s
->
next_picture_ptr
=
s
->
current_picture_ptr
;
s
->
next_picture_ptr
=
s
->
current_picture_ptr
;
}
}
av_dlog
(
s
->
avctx
,
"L%p N%p C%p L%p N%p C%p type:%d drop:%d
\n
"
,
av_dlog
(
s
->
avctx
,
"L%p N%p C%p L%p N%p C%p type:%d drop:%d
\n
"
,
...
@@ -1405,7 +1405,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
...
@@ -1405,7 +1405,7 @@ int ff_MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
s
->
last_picture_ptr
?
s
->
last_picture_ptr
->
f
.
data
[
0
]
:
NULL
,
s
->
last_picture_ptr
?
s
->
last_picture_ptr
->
f
.
data
[
0
]
:
NULL
,
s
->
next_picture_ptr
?
s
->
next_picture_ptr
->
f
.
data
[
0
]
:
NULL
,
s
->
next_picture_ptr
?
s
->
next_picture_ptr
->
f
.
data
[
0
]
:
NULL
,
s
->
current_picture_ptr
?
s
->
current_picture_ptr
->
f
.
data
[
0
]
:
NULL
,
s
->
current_picture_ptr
?
s
->
current_picture_ptr
->
f
.
data
[
0
]
:
NULL
,
s
->
pict_type
,
s
->
dropable
);
s
->
pict_type
,
s
->
drop
p
able
);
if
(
s
->
codec_id
!=
AV_CODEC_ID_H264
)
{
if
(
s
->
codec_id
!=
AV_CODEC_ID_H264
)
{
if
((
s
->
last_picture_ptr
==
NULL
||
if
((
s
->
last_picture_ptr
==
NULL
||
...
...
libavcodec/mpegvideo.h
View file @
ba0c8981
...
@@ -342,7 +342,7 @@ typedef struct MpegEncContext {
...
@@ -342,7 +342,7 @@ typedef struct MpegEncContext {
int
pict_type
;
///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
int
pict_type
;
///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
int
last_pict_type
;
//FIXME removes
int
last_pict_type
;
//FIXME removes
int
last_non_b_pict_type
;
///< used for mpeg4 gmc b-frames & ratecontrol
int
last_non_b_pict_type
;
///< used for mpeg4 gmc b-frames & ratecontrol
int
dropable
;
int
drop
p
able
;
int
frame_rate_index
;
int
frame_rate_index
;
int
last_lambda_for
[
5
];
///< last lambda for a specific pict type
int
last_lambda_for
[
5
];
///< last lambda for a specific pict type
int
skipdct
;
///< skip dct and code zero residual
int
skipdct
;
///< skip dct and code zero residual
...
...
libavcodec/vc1dec.c
View file @
ba0c8981
...
@@ -5520,7 +5520,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -5520,7 +5520,7 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data,
s
->
current_picture
.
f
.
key_frame
=
s
->
pict_type
==
AV_PICTURE_TYPE_I
;
s
->
current_picture
.
f
.
key_frame
=
s
->
pict_type
==
AV_PICTURE_TYPE_I
;
/* skip B-frames if we don't have reference frames */
/* skip B-frames if we don't have reference frames */
if
(
s
->
last_picture_ptr
==
NULL
&&
(
s
->
pict_type
==
AV_PICTURE_TYPE_B
||
s
->
dropable
))
{
if
(
s
->
last_picture_ptr
==
NULL
&&
(
s
->
pict_type
==
AV_PICTURE_TYPE_B
||
s
->
drop
p
able
))
{
goto
err
;
goto
err
;
}
}
if
((
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
AV_PICTURE_TYPE_B
)
||
if
((
avctx
->
skip_frame
>=
AVDISCARD_NONREF
&&
s
->
pict_type
==
AV_PICTURE_TYPE_B
)
||
...
...
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