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
75af13a0
Commit
75af13a0
authored
Mar 04, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: directly use frames in ff_draw_horiz_band()
parent
3b1c9eb0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
mpegvideo.c
libavcodec/mpegvideo.c
+9
-8
mpegvideo.h
libavcodec/mpegvideo.h
+1
-1
svq3.c
libavcodec/svq3.c
+2
-2
No files found.
libavcodec/mpegvideo.c
View file @
75af13a0
...
@@ -2313,8 +2313,9 @@ void ff_MPV_decode_mb(MpegEncContext *s, int16_t block[12][64]){
...
@@ -2313,8 +2313,9 @@ void ff_MPV_decode_mb(MpegEncContext *s, int16_t block[12][64]){
/**
/**
* @param h is the normal height, this will be reduced automatically if needed for the last row
* @param h is the normal height, this will be reduced automatically if needed for the last row
*/
*/
void
ff_draw_horiz_band
(
AVCodecContext
*
avctx
,
Picture
*
cur
,
void
ff_draw_horiz_band
(
AVCodecContext
*
avctx
,
Picture
*
last
,
int
y
,
int
h
,
int
picture_structure
,
AVFrame
*
cur
,
AVFrame
*
last
,
int
y
,
int
h
,
int
picture_structure
,
int
first_field
,
int
low_delay
)
int
first_field
,
int
low_delay
)
{
{
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
...
@@ -2334,15 +2335,15 @@ void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur,
...
@@ -2334,15 +2335,15 @@ void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur,
int
offset
[
AV_NUM_DATA_POINTERS
];
int
offset
[
AV_NUM_DATA_POINTERS
];
int
i
;
int
i
;
if
(
cur
->
f
.
pict_type
==
AV_PICTURE_TYPE_B
||
low_delay
||
if
(
cur
->
pict_type
==
AV_PICTURE_TYPE_B
||
low_delay
||
(
avctx
->
slice_flags
&
SLICE_FLAG_CODED_ORDER
))
(
avctx
->
slice_flags
&
SLICE_FLAG_CODED_ORDER
))
src
=
&
cur
->
f
;
src
=
cur
;
else
if
(
last
)
else
if
(
last
)
src
=
&
last
->
f
;
src
=
last
;
else
else
return
;
return
;
if
(
cur
->
f
.
pict_type
==
AV_PICTURE_TYPE_B
&&
if
(
cur
->
pict_type
==
AV_PICTURE_TYPE_B
&&
picture_structure
==
PICT_FRAME
&&
picture_structure
==
PICT_FRAME
&&
avctx
->
codec_id
!=
AV_CODEC_ID_SVQ3
)
{
avctx
->
codec_id
!=
AV_CODEC_ID_SVQ3
)
{
for
(
i
=
0
;
i
<
AV_NUM_DATA_POINTERS
;
i
++
)
for
(
i
=
0
;
i
<
AV_NUM_DATA_POINTERS
;
i
++
)
...
@@ -2364,8 +2365,8 @@ void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur,
...
@@ -2364,8 +2365,8 @@ void ff_draw_horiz_band(AVCodecContext *avctx, Picture *cur,
void
ff_mpeg_draw_horiz_band
(
MpegEncContext
*
s
,
int
y
,
int
h
)
void
ff_mpeg_draw_horiz_band
(
MpegEncContext
*
s
,
int
y
,
int
h
)
{
{
ff_draw_horiz_band
(
s
->
avctx
,
&
s
->
current_picture
,
ff_draw_horiz_band
(
s
->
avctx
,
&
s
->
current_picture
.
f
,
&
s
->
last_picture
,
y
,
h
,
s
->
picture_structure
,
&
s
->
last_picture
.
f
,
y
,
h
,
s
->
picture_structure
,
s
->
first_field
,
s
->
low_delay
);
s
->
first_field
,
s
->
low_delay
);
}
}
...
...
libavcodec/mpegvideo.h
View file @
75af13a0
...
@@ -784,7 +784,7 @@ void ff_MPV_common_init_x86(MpegEncContext *s);
...
@@ -784,7 +784,7 @@ void ff_MPV_common_init_x86(MpegEncContext *s);
void
ff_MPV_common_init_arm
(
MpegEncContext
*
s
);
void
ff_MPV_common_init_arm
(
MpegEncContext
*
s
);
void
ff_MPV_common_init_ppc
(
MpegEncContext
*
s
);
void
ff_MPV_common_init_ppc
(
MpegEncContext
*
s
);
void
ff_clean_intra_table_entries
(
MpegEncContext
*
s
);
void
ff_clean_intra_table_entries
(
MpegEncContext
*
s
);
void
ff_draw_horiz_band
(
AVCodecContext
*
avctx
,
Picture
*
cur
,
Pictur
e
*
last
,
void
ff_draw_horiz_band
(
AVCodecContext
*
avctx
,
AVFrame
*
cur
,
AVFram
e
*
last
,
int
y
,
int
h
,
int
picture_structure
,
int
first_field
,
int
y
,
int
h
,
int
picture_structure
,
int
first_field
,
int
low_delay
);
int
low_delay
);
void
ff_mpeg_draw_horiz_band
(
MpegEncContext
*
s
,
int
y
,
int
h
);
void
ff_mpeg_draw_horiz_band
(
MpegEncContext
*
s
,
int
y
,
int
h
);
...
...
libavcodec/svq3.c
View file @
75af13a0
...
@@ -1267,8 +1267,8 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -1267,8 +1267,8 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data,
(
h
->
pict_type
==
AV_PICTURE_TYPE_P
&&
mb_type
<
8
)
?
(
mb_type
-
1
)
:
-
1
;
(
h
->
pict_type
==
AV_PICTURE_TYPE_P
&&
mb_type
<
8
)
?
(
mb_type
-
1
)
:
-
1
;
}
}
ff_draw_horiz_band
(
avctx
,
s
->
cur_pic
,
ff_draw_horiz_band
(
avctx
,
&
s
->
cur_pic
->
f
,
s
->
last_pic
->
f
.
data
[
0
]
?
s
->
last_pic
:
NULL
,
s
->
last_pic
->
f
.
data
[
0
]
?
&
s
->
last_pic
->
f
:
NULL
,
16
*
h
->
mb_y
,
16
,
h
->
picture_structure
,
0
,
16
*
h
->
mb_y
,
16
,
h
->
picture_structure
,
0
,
h
->
low_delay
);
h
->
low_delay
);
}
}
...
...
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