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
8b6136d3
Commit
8b6136d3
authored
Mar 20, 2014
by
wm4
Committed by
Anton Khirnov
Mar 20, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vaapi: switch ff_vaapi_get_surface_id from Picture to AVFrame
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
1b1094a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
vaapi.c
libavcodec/vaapi.c
+1
-1
vaapi_h264.c
libavcodec/vaapi_h264.c
+3
-3
vaapi_internal.h
libavcodec/vaapi_internal.h
+3
-3
vaapi_mpeg2.c
libavcodec/vaapi_mpeg2.c
+2
-2
vaapi_mpeg4.c
libavcodec/vaapi_mpeg4.c
+2
-2
vaapi_vc1.c
libavcodec/vaapi_vc1.c
+2
-2
No files found.
libavcodec/vaapi.c
View file @
8b6136d3
...
...
@@ -205,7 +205,7 @@ int ff_vaapi_mpeg_end_frame(AVCodecContext *avctx)
goto
finish
;
ret
=
ff_vaapi_render_picture
(
vactx
,
ff_vaapi_get_surface_id
(
s
->
current_picture_ptr
));
ff_vaapi_get_surface_id
(
&
s
->
current_picture_ptr
->
f
));
if
(
ret
<
0
)
goto
finish
;
...
...
libavcodec/vaapi_h264.c
View file @
8b6136d3
...
...
@@ -59,7 +59,7 @@ static void fill_vaapi_pic(VAPictureH264 *va_pic,
pic_structure
=
pic
->
reference
;
pic_structure
&=
PICT_FRAME
;
/* PICT_TOP_FIELD|PICT_BOTTOM_FIELD */
va_pic
->
picture_id
=
ff_vaapi_get_surface_id
(
pic
);
va_pic
->
picture_id
=
ff_vaapi_get_surface_id
(
&
pic
->
f
);
va_pic
->
frame_idx
=
pic
->
long_ref
?
pic
->
pic_id
:
pic
->
frame_num
;
va_pic
->
flags
=
0
;
...
...
@@ -99,7 +99,7 @@ static int dpb_add(DPB *dpb, H264Picture *pic)
for
(
i
=
0
;
i
<
dpb
->
size
;
i
++
)
{
VAPictureH264
*
const
va_pic
=
&
dpb
->
va_pics
[
i
];
if
(
va_pic
->
picture_id
==
ff_vaapi_get_surface_id
(
pic
))
{
if
(
va_pic
->
picture_id
==
ff_vaapi_get_surface_id
(
&
pic
->
f
))
{
VAPictureH264
temp_va_pic
;
fill_vaapi_pic
(
&
temp_va_pic
,
pic
,
0
);
...
...
@@ -298,7 +298,7 @@ static int vaapi_h264_end_frame(AVCodecContext *avctx)
if
(
ret
<
0
)
goto
finish
;
ret
=
ff_vaapi_render_picture
(
vactx
,
ff_vaapi_get_surface_id
(
h
->
cur_pic_ptr
));
ret
=
ff_vaapi_render_picture
(
vactx
,
ff_vaapi_get_surface_id
(
&
h
->
cur_pic_ptr
->
f
));
if
(
ret
<
0
)
goto
finish
;
...
...
libavcodec/vaapi_internal.h
View file @
8b6136d3
...
...
@@ -35,10 +35,10 @@
* @{
*/
/** Extract VASurfaceID from a
Pictur
e */
static
inline
VASurfaceID
ff_vaapi_get_surface_id
(
Pictur
e
*
pic
)
/** Extract VASurfaceID from a
n AVFram
e */
static
inline
VASurfaceID
ff_vaapi_get_surface_id
(
AVFram
e
*
pic
)
{
return
(
uintptr_t
)
pic
->
f
.
data
[
3
];
return
(
uintptr_t
)
pic
->
data
[
3
];
}
/** Common AVHWAccel.end_frame() implementation */
...
...
libavcodec/vaapi_mpeg2.c
View file @
8b6136d3
...
...
@@ -73,10 +73,10 @@ static int vaapi_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint8_
switch
(
s
->
pict_type
)
{
case
AV_PICTURE_TYPE_B
:
pic_param
->
backward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
next_picture
);
pic_param
->
backward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
next_picture
.
f
);
// fall-through
case
AV_PICTURE_TYPE_P
:
pic_param
->
forward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
last_picture
);
pic_param
->
forward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
last_picture
.
f
);
break
;
}
...
...
libavcodec/vaapi_mpeg4.c
View file @
8b6136d3
...
...
@@ -95,9 +95,9 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_
pic_param
->
TRD
=
s
->
pp_time
;
if
(
s
->
pict_type
==
AV_PICTURE_TYPE_B
)
pic_param
->
backward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
next_picture
);
pic_param
->
backward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
next_picture
.
f
);
if
(
s
->
pict_type
!=
AV_PICTURE_TYPE_I
)
pic_param
->
forward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
last_picture
);
pic_param
->
forward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
last_picture
.
f
);
/* Fill in VAIQMatrixBufferMPEG4 */
/* Only the first inverse quantisation method uses the weighting matrices */
...
...
libavcodec/vaapi_vc1.c
View file @
8b6136d3
...
...
@@ -258,10 +258,10 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
switch
(
s
->
pict_type
)
{
case
AV_PICTURE_TYPE_B
:
pic_param
->
backward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
next_picture
);
pic_param
->
backward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
next_picture
.
f
);
// fall-through
case
AV_PICTURE_TYPE_P
:
pic_param
->
forward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
last_picture
);
pic_param
->
forward_reference_picture
=
ff_vaapi_get_surface_id
(
&
s
->
last_picture
.
f
);
break
;
}
...
...
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