Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libva
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libva
Commits
29dfeb7e
Commit
29dfeb7e
authored
Nov 18, 2009
by
Gwenole Beauchesne
Committed by
Xiang, Haihao
Nov 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix subpicture association and deassociation
parent
7451873c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
12 deletions
+19
-12
i965_drv_video/i965_drv_video.c
i965_drv_video/i965_drv_video.c
+19
-12
No files found.
i965_drv_video/i965_drv_video.c
View file @
29dfeb7e
...
@@ -293,6 +293,7 @@ i965_CreateSurfaces(VADriverContextP ctx,
...
@@ -293,6 +293,7 @@ i965_CreateSurfaces(VADriverContextP ctx,
surfaces
[
i
]
=
surfaceID
;
surfaces
[
i
]
=
surfaceID
;
obj_surface
->
status
=
VASurfaceReady
;
obj_surface
->
status
=
VASurfaceReady
;
obj_surface
->
subpic
=
VA_INVALID_ID
;
obj_surface
->
width
=
width
;
obj_surface
->
width
=
width
;
obj_surface
->
height
=
height
;
obj_surface
->
height
=
height
;
obj_surface
->
size
=
SIZE_YUV420
(
width
,
height
);
obj_surface
->
size
=
SIZE_YUV420
(
width
,
height
);
...
@@ -495,22 +496,18 @@ i965_AssociateSubpicture(VADriverContextP ctx,
...
@@ -495,22 +496,18 @@ i965_AssociateSubpicture(VADriverContextP ctx,
unsigned
int
flags
)
unsigned
int
flags
)
{
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
VAStatus
vaStatus
=
VA_STATUS_SUCCESS
;
/*only ipicture*/
struct
object_surface
*
obj_surface
=
SURFACE
(
*
target_surfaces
);
struct
object_subpic
*
obj_subpic
=
SUBPIC
(
subpicture
);
struct
object_subpic
*
obj_subpic
=
SUBPIC
(
subpicture
);
int
i
;
if
(
NULL
==
obj_surface
)
{
vaStatus
=
VA_STATUS_ERROR_INVALID_CONFIG
;
return
vaStatus
;
}
obj_subpic
->
dstx
=
dest_x
;
obj_subpic
->
dstx
=
dest_x
;
obj_subpic
->
dsty
=
dest_y
;
obj_subpic
->
dsty
=
dest_y
;
obj_surface
->
subpic
=
subpicture
;
for
(
i
=
0
;
i
<
num_surfaces
;
i
++
)
{
struct
object_surface
*
obj_surface
=
SURFACE
(
target_surfaces
[
i
]);
if
(
!
obj_surface
)
return
VA_STATUS_ERROR_INVALID_SURFACE
;
obj_surface
->
subpic
=
subpicture
;
}
return
VA_STATUS_SUCCESS
;
return
VA_STATUS_SUCCESS
;
}
}
...
@@ -521,6 +518,16 @@ i965_DeassociateSubpicture(VADriverContextP ctx,
...
@@ -521,6 +518,16 @@ i965_DeassociateSubpicture(VADriverContextP ctx,
VASurfaceID
*
target_surfaces
,
VASurfaceID
*
target_surfaces
,
int
num_surfaces
)
int
num_surfaces
)
{
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
int
i
;
for
(
i
=
0
;
i
<
num_surfaces
;
i
++
)
{
struct
object_surface
*
obj_surface
=
SURFACE
(
target_surfaces
[
i
]);
if
(
!
obj_surface
)
return
VA_STATUS_ERROR_INVALID_SURFACE
;
if
(
obj_surface
->
subpic
==
subpicture
)
obj_surface
->
subpic
=
VA_INVALID_ID
;
}
return
VA_STATUS_SUCCESS
;
return
VA_STATUS_SUCCESS
;
}
}
...
@@ -1317,7 +1324,7 @@ i965_PutSurface(VADriverContextP ctx,
...
@@ -1317,7 +1324,7 @@ i965_PutSurface(VADriverContextP ctx,
srcx
,
srcy
,
srcw
,
srch
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
);
destx
,
desty
,
destw
,
desth
);
obj_surface
=
SURFACE
(
surface
);
obj_surface
=
SURFACE
(
surface
);
if
(
obj_surface
->
subpic
!=
0
)
{
if
(
obj_surface
->
subpic
!=
VA_INVALID_ID
)
{
i965_render_put_subpic
(
ctx
,
surface
,
i965_render_put_subpic
(
ctx
,
surface
,
srcx
,
srcy
,
srcw
,
srch
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
);
destx
,
desty
,
destw
,
desth
);
...
...
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