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
a3f4c930
Commit
a3f4c930
authored
Apr 27, 2015
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: Have ff_mpeg_ref_picture use AVCodecContext directly
parent
d5280455
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
mpegvideo.c
libavcodec/mpegvideo.c
+7
-7
mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
mpegvideo_enc.c
libavcodec/mpegvideo_enc.c
+5
-5
No files found.
libavcodec/mpegvideo.c
View file @
a3f4c930
...
...
@@ -727,7 +727,7 @@ do {\
return
0
;
}
int
ff_mpeg_ref_picture
(
MpegEncContext
*
s
,
Picture
*
dst
,
Picture
*
src
)
int
ff_mpeg_ref_picture
(
AVCodecContext
*
avctx
,
Picture
*
dst
,
Picture
*
src
)
{
int
ret
;
...
...
@@ -761,7 +761,7 @@ int ff_mpeg_ref_picture(MpegEncContext *s, Picture *dst, Picture *src)
return
0
;
fail:
ff_mpeg_unref_picture
(
s
->
avctx
,
dst
);
ff_mpeg_unref_picture
(
avctx
,
dst
);
return
ret
;
}
...
...
@@ -937,7 +937,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
for
(
i
=
0
;
i
<
MAX_PICTURE_COUNT
;
i
++
)
{
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
picture
[
i
]);
if
(
s1
->
picture
[
i
].
f
->
buf
[
0
]
&&
(
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
picture
[
i
],
&
s1
->
picture
[
i
]))
<
0
)
(
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
picture
[
i
],
&
s1
->
picture
[
i
]))
<
0
)
return
ret
;
}
...
...
@@ -945,7 +945,7 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
do {\
ff_mpeg_unref_picture(s->avctx, &s->pic);\
if (s1->pic.f->buf[0])\
ret = ff_mpeg_ref_picture(s, &s->pic, &s1->pic);\
ret = ff_mpeg_ref_picture(s
->avctx
, &s->pic, &s1->pic);\
else\
ret = update_picture_tables(&s->pic, &s1->pic);\
if (ret < 0)\
...
...
@@ -1741,7 +1741,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
// s->current_picture_ptr->quality = s->new_picture_ptr->quality;
s
->
current_picture_ptr
->
f
->
key_frame
=
s
->
pict_type
==
AV_PICTURE_TYPE_I
;
if
((
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
current_picture
,
if
((
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
current_picture
,
s
->
current_picture_ptr
))
<
0
)
return
ret
;
...
...
@@ -1822,14 +1822,14 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
if
(
s
->
last_picture_ptr
)
{
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
last_picture
);
if
(
s
->
last_picture_ptr
->
f
->
buf
[
0
]
&&
(
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
last_picture
,
(
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
last_picture
,
s
->
last_picture_ptr
))
<
0
)
return
ret
;
}
if
(
s
->
next_picture_ptr
)
{
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
next_picture
);
if
(
s
->
next_picture_ptr
->
f
->
buf
[
0
]
&&
(
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
next_picture
,
(
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
next_picture
,
s
->
next_picture_ptr
))
<
0
)
return
ret
;
}
...
...
libavcodec/mpegvideo.h
View file @
a3f4c930
...
...
@@ -863,7 +863,7 @@ void ff_wmv2_encode_mb(MpegEncContext * s,
int16_t
block
[
6
][
64
],
int
motion_x
,
int
motion_y
);
int
ff_mpeg_ref_picture
(
MpegEncContext
*
s
,
Picture
*
dst
,
Picture
*
src
);
int
ff_mpeg_ref_picture
(
AVCodecContext
*
avctx
,
Picture
*
dst
,
Picture
*
src
);
void
ff_mpeg_unref_picture
(
AVCodecContext
*
avctx
,
Picture
*
picture
);
void
ff_free_picture_tables
(
Picture
*
pic
);
...
...
libavcodec/mpegvideo_enc.c
View file @
a3f4c930
...
...
@@ -1371,7 +1371,7 @@ no_output_pic:
AV_PICTURE_TYPE_B
?
3
:
0
;
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
new_picture
);
if
((
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
new_picture
,
s
->
reordered_input_picture
[
0
])))
if
((
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
new_picture
,
s
->
reordered_input_picture
[
0
])))
return
ret
;
if
(
s
->
reordered_input_picture
[
0
]
->
shared
||
s
->
avctx
->
rc_buffer_size
)
{
...
...
@@ -1406,7 +1406,7 @@ no_output_pic:
}
}
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
current_picture
);
if
((
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
current_picture
,
if
((
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
current_picture
,
s
->
current_picture_ptr
))
<
0
)
return
ret
;
...
...
@@ -1500,7 +1500,7 @@ static int frame_start(MpegEncContext *s)
s
->
current_picture_ptr
->
f
->
key_frame
=
s
->
pict_type
==
AV_PICTURE_TYPE_I
;
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
current_picture
);
if
((
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
current_picture
,
if
((
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
current_picture
,
s
->
current_picture_ptr
))
<
0
)
return
ret
;
...
...
@@ -1513,14 +1513,14 @@ static int frame_start(MpegEncContext *s)
if
(
s
->
last_picture_ptr
)
{
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
last_picture
);
if
(
s
->
last_picture_ptr
->
f
->
buf
[
0
]
&&
(
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
last_picture
,
(
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
last_picture
,
s
->
last_picture_ptr
))
<
0
)
return
ret
;
}
if
(
s
->
next_picture_ptr
)
{
ff_mpeg_unref_picture
(
s
->
avctx
,
&
s
->
next_picture
);
if
(
s
->
next_picture_ptr
->
f
->
buf
[
0
]
&&
(
ret
=
ff_mpeg_ref_picture
(
s
,
&
s
->
next_picture
,
(
ret
=
ff_mpeg_ref_picture
(
s
->
avctx
,
&
s
->
next_picture
,
s
->
next_picture_ptr
))
<
0
)
return
ret
;
}
...
...
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