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
24ffa0da
Commit
24ffa0da
authored
Jun 27, 2011
by
Gwenole Beauchesne
Committed by
Xiang, Haihao
Jun 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i965_drv_video: add support for VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD.
parent
6b7f6b5e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
16 deletions
+21
-16
i965_drv_video/i965_drv_video.c
i965_drv_video/i965_drv_video.c
+5
-4
i965_drv_video/i965_drv_video.h
i965_drv_video/i965_drv_video.h
+1
-0
i965_drv_video/i965_render.c
i965_drv_video/i965_render.c
+15
-12
No files found.
i965_drv_video/i965_drv_video.c
View file @
24ffa0da
...
@@ -104,18 +104,18 @@ static const i965_subpic_format_map_t
...
@@ -104,18 +104,18 @@ static const i965_subpic_format_map_t
i965_subpic_formats_map
[
I965_MAX_SUBPIC_FORMATS
+
1
]
=
{
i965_subpic_formats_map
[
I965_MAX_SUBPIC_FORMATS
+
1
]
=
{
{
I965_SURFACETYPE_INDEXED
,
I965_SURFACEFORMAT_P4A4_UNORM
,
{
I965_SURFACETYPE_INDEXED
,
I965_SURFACEFORMAT_P4A4_UNORM
,
{
VA_FOURCC
(
'I'
,
'A'
,
'4'
,
'4'
),
VA_MSB_FIRST
,
8
,
},
{
VA_FOURCC
(
'I'
,
'A'
,
'4'
,
'4'
),
VA_MSB_FIRST
,
8
,
},
0
},
VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD
},
{
I965_SURFACETYPE_INDEXED
,
I965_SURFACEFORMAT_A4P4_UNORM
,
{
I965_SURFACETYPE_INDEXED
,
I965_SURFACEFORMAT_A4P4_UNORM
,
{
VA_FOURCC
(
'A'
,
'I'
,
'4'
,
'4'
),
VA_MSB_FIRST
,
8
,
},
{
VA_FOURCC
(
'A'
,
'I'
,
'4'
,
'4'
),
VA_MSB_FIRST
,
8
,
},
0
},
VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD
},
{
I965_SURFACETYPE_RGBA
,
I965_SURFACEFORMAT_B8G8R8A8_UNORM
,
{
I965_SURFACETYPE_RGBA
,
I965_SURFACEFORMAT_B8G8R8A8_UNORM
,
{
VA_FOURCC
(
'B'
,
'G'
,
'R'
,
'A'
),
VA_LSB_FIRST
,
32
,
{
VA_FOURCC
(
'B'
,
'G'
,
'R'
,
'A'
),
VA_LSB_FIRST
,
32
,
32
,
0x00ff0000
,
0x0000ff00
,
0x000000ff
,
0xff000000
},
32
,
0x00ff0000
,
0x0000ff00
,
0x000000ff
,
0xff000000
},
0
},
VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD
},
{
I965_SURFACETYPE_RGBA
,
I965_SURFACEFORMAT_R8G8B8A8_UNORM
,
{
I965_SURFACETYPE_RGBA
,
I965_SURFACEFORMAT_R8G8B8A8_UNORM
,
{
VA_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
),
VA_LSB_FIRST
,
32
,
{
VA_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
),
VA_LSB_FIRST
,
32
,
32
,
0x000000ff
,
0x0000ff00
,
0x00ff0000
,
0xff000000
},
32
,
0x000000ff
,
0x0000ff00
,
0x00ff0000
,
0xff000000
},
0
},
VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD
},
};
};
static
const
i965_subpic_format_map_t
*
static
const
i965_subpic_format_map_t
*
...
@@ -695,6 +695,7 @@ i965_AssociateSubpicture(VADriverContextP ctx,
...
@@ -695,6 +695,7 @@ i965_AssociateSubpicture(VADriverContextP ctx,
obj_subpic
->
dst_rect
.
y
=
dest_y
;
obj_subpic
->
dst_rect
.
y
=
dest_y
;
obj_subpic
->
dst_rect
.
width
=
dest_width
;
obj_subpic
->
dst_rect
.
width
=
dest_width
;
obj_subpic
->
dst_rect
.
height
=
dest_height
;
obj_subpic
->
dst_rect
.
height
=
dest_height
;
obj_subpic
->
flags
=
flags
;
for
(
i
=
0
;
i
<
num_surfaces
;
i
++
)
{
for
(
i
=
0
;
i
<
num_surfaces
;
i
++
)
{
struct
object_surface
*
obj_surface
=
SURFACE
(
target_surfaces
[
i
]);
struct
object_surface
*
obj_surface
=
SURFACE
(
target_surfaces
[
i
]);
...
...
i965_drv_video/i965_drv_video.h
View file @
24ffa0da
...
@@ -196,6 +196,7 @@ struct object_subpic
...
@@ -196,6 +196,7 @@ struct object_subpic
int
height
;
int
height
;
int
pitch
;
int
pitch
;
dri_bo
*
bo
;
dri_bo
*
bo
;
unsigned
int
flags
;
};
};
struct
hw_codec_info
struct
hw_codec_info
...
...
i965_drv_video/i965_render.c
View file @
24ffa0da
...
@@ -883,26 +883,29 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
...
@@ -883,26 +883,29 @@ i965_subpic_render_upload_vertex(VADriverContextP ctx,
struct
i965_render_state
*
render_state
=
&
i965
->
render_state
;
struct
i965_render_state
*
render_state
=
&
i965
->
render_state
;
struct
object_surface
*
obj_surface
=
SURFACE
(
surface
);
struct
object_surface
*
obj_surface
=
SURFACE
(
surface
);
struct
object_subpic
*
obj_subpic
=
SUBPIC
(
obj_surface
->
subpic
);
struct
object_subpic
*
obj_subpic
=
SUBPIC
(
obj_surface
->
subpic
);
VARectangle
dst_rect
;
const
float
sx
=
(
float
)
output_rect
->
width
/
(
float
)
obj_surface
->
orig_width
;
const
float
sy
=
(
float
)
output_rect
->
height
/
(
float
)
obj_surface
->
orig_height
;
float
*
vb
,
tx1
,
tx2
,
ty1
,
ty2
,
x1
,
x2
,
y1
,
y2
;
float
*
vb
,
tx1
,
tx2
,
ty1
,
ty2
,
x1
,
x2
,
y1
,
y2
;
int
i
=
0
;
int
i
=
0
;
VARectangle
dst_rect
;
if
(
obj_subpic
->
flags
&
VA_SUBPICTURE_DESTINATION_IS_SCREEN_COORD
)
dst_rect
.
x
=
output_rect
->
x
+
sx
*
(
float
)
obj_subpic
->
dst_rect
.
x
;
dst_rect
=
obj_subpic
->
dst_rect
;
dst_rect
.
y
=
output_rect
->
y
+
sy
*
(
float
)
obj_subpic
->
dst_rect
.
y
;
else
{
dst_rect
.
width
=
sx
*
(
float
)
obj_subpic
->
dst_rect
.
width
;
const
float
sx
=
(
float
)
output_rect
->
width
/
obj_surface
->
orig_width
;
dst_rect
.
height
=
sy
*
(
float
)
obj_subpic
->
dst_rect
.
height
;
const
float
sy
=
(
float
)
output_rect
->
height
/
obj_surface
->
orig_height
;
dst_rect
.
x
=
output_rect
->
x
+
sx
*
obj_subpic
->
dst_rect
.
x
;
dst_rect
.
y
=
output_rect
->
y
+
sy
*
obj_subpic
->
dst_rect
.
y
;
dst_rect
.
width
=
sx
*
obj_subpic
->
dst_rect
.
width
;
dst_rect
.
height
=
sy
*
obj_subpic
->
dst_rect
.
height
;
}
dri_bo_map
(
render_state
->
vb
.
vertex_buffer
,
1
);
dri_bo_map
(
render_state
->
vb
.
vertex_buffer
,
1
);
assert
(
render_state
->
vb
.
vertex_buffer
->
virtual
);
assert
(
render_state
->
vb
.
vertex_buffer
->
virtual
);
vb
=
render_state
->
vb
.
vertex_buffer
->
virtual
;
vb
=
render_state
->
vb
.
vertex_buffer
->
virtual
;
tx1
=
(
float
)
obj_subpic
->
src_rect
.
x
/
(
float
)
obj_subpic
->
width
;
tx1
=
(
float
)
obj_subpic
->
src_rect
.
x
/
obj_subpic
->
width
;
ty1
=
(
float
)
obj_subpic
->
src_rect
.
y
/
(
float
)
obj_subpic
->
height
;
ty1
=
(
float
)
obj_subpic
->
src_rect
.
y
/
obj_subpic
->
height
;
tx2
=
(
float
)(
obj_subpic
->
src_rect
.
x
+
obj_subpic
->
src_rect
.
width
)
/
(
float
)
obj_subpic
->
width
;
tx2
=
(
float
)(
obj_subpic
->
src_rect
.
x
+
obj_subpic
->
src_rect
.
width
)
/
obj_subpic
->
width
;
ty2
=
(
float
)(
obj_subpic
->
src_rect
.
y
+
obj_subpic
->
src_rect
.
height
)
/
(
float
)
obj_subpic
->
height
;
ty2
=
(
float
)(
obj_subpic
->
src_rect
.
y
+
obj_subpic
->
src_rect
.
height
)
/
obj_subpic
->
height
;
x1
=
(
float
)
dst_rect
.
x
;
x1
=
(
float
)
dst_rect
.
x
;
y1
=
(
float
)
dst_rect
.
y
;
y1
=
(
float
)
dst_rect
.
y
;
...
...
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