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
14e2a940
Commit
14e2a940
authored
Apr 17, 2004
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flv dropable p frame support
Originally committed as revision 3027 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
068f2a22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
6 deletions
+15
-6
h263.c
libavcodec/h263.c
+3
-1
mpegvideo.c
libavcodec/mpegvideo.c
+10
-4
mpegvideo.h
libavcodec/mpegvideo.h
+2
-1
No files found.
libavcodec/h263.c
View file @
14e2a940
...
...
@@ -6054,8 +6054,10 @@ int flv_h263_decode_picture_header(MpegEncContext *s)
s
->
height
=
height
;
s
->
pict_type
=
I_TYPE
+
get_bits
(
&
s
->
gb
,
2
);
if
(
s
->
pict_type
>
P_TYPE
)
s
->
dropable
=
s
->
pict_type
>
P_TYPE
;
if
(
s
->
dropable
)
s
->
pict_type
=
P_TYPE
;
skip_bits1
(
&
s
->
gb
);
/* deblocking flag */
s
->
chroma_qscale
=
s
->
qscale
=
get_bits
(
&
s
->
gb
,
5
);
...
...
libavcodec/mpegvideo.c
View file @
14e2a940
...
...
@@ -1338,7 +1338,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
assert
(
s
->
last_picture_ptr
==
NULL
||
s
->
out_format
!=
FMT_H264
||
s
->
codec_id
==
CODEC_ID_SVQ3
);
/* mark&release old frames */
if
(
s
->
pict_type
!=
B_TYPE
&&
s
->
last_picture_ptr
&&
s
->
last_picture_ptr
->
data
[
0
])
{
if
(
s
->
pict_type
!=
B_TYPE
&&
s
->
last_picture_ptr
&&
s
->
last_picture_ptr
!=
s
->
next_picture_ptr
&&
s
->
last_picture_ptr
->
data
[
0
])
{
avctx
->
release_buffer
(
avctx
,
(
AVFrame
*
)
s
->
last_picture_ptr
);
/* release forgotten pictures */
...
...
@@ -1368,7 +1368,7 @@ alloc:
pic
=
(
AVFrame
*
)
&
s
->
picture
[
i
];
}
pic
->
reference
=
s
->
pict_type
!=
B_TYPE
?
3
:
0
;
pic
->
reference
=
s
->
pict_type
!=
B_TYPE
&&
!
s
->
dropable
?
3
:
0
;
pic
->
coded_picture_number
=
s
->
coded_picture_number
++
;
...
...
@@ -1390,8 +1390,14 @@ alloc:
if
(
s
->
out_format
!=
FMT_H264
||
s
->
codec_id
==
CODEC_ID_SVQ3
){
if
(
s
->
pict_type
!=
B_TYPE
)
{
s
->
last_picture_ptr
=
s
->
next_picture_ptr
;
s
->
next_picture_ptr
=
s
->
current_picture_ptr
;
}
if
(
!
s
->
dropable
)
s
->
next_picture_ptr
=
s
->
current_picture_ptr
;
}
/* av_log(s->avctx, AV_LOG_DEBUG, "L%p N%p C%p L%p N%p C%p type:%d drop:%d\n", s->last_picture_ptr, s->next_picture_ptr,s->current_picture_ptr,
s->last_picture_ptr ? s->last_picture_ptr->data[0] : NULL,
s->next_picture_ptr ? s->next_picture_ptr->data[0] : NULL,
s->current_picture_ptr ? s->current_picture_ptr->data[0] : NULL,
s->pict_type, s->dropable);*/
if
(
s
->
last_picture_ptr
)
copy_picture
(
&
s
->
last_picture
,
s
->
last_picture_ptr
);
if
(
s
->
next_picture_ptr
)
copy_picture
(
&
s
->
next_picture
,
s
->
next_picture_ptr
);
...
...
libavcodec/mpegvideo.h
View file @
14e2a940
...
...
@@ -355,8 +355,9 @@ typedef struct MpegEncContext {
int
adaptive_quant
;
///< use adaptive quantization
int
dquant
;
///< qscale difference to prev qscale
int
pict_type
;
///< I_TYPE, P_TYPE, B_TYPE, ...
int
last_pict_type
;
int
last_pict_type
;
//FIXME removes
int
last_non_b_pict_type
;
///< used for mpeg4 gmc b-frames & ratecontrol
int
dropable
;
int
frame_rate_index
;
int
frame_rate_ext_n
;
///< MPEG-2 specific framerate modificators (numerator)
int
frame_rate_ext_d
;
///< MPEG-2 specific framerate modificators (denominator)
...
...
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