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
141a6f72
Commit
141a6f72
authored
Nov 04, 2009
by
Gwenole Beauchesne
Committed by
Xiang, Haihao
Jul 12, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add RGBA subpictures.
parent
5ab4bfbf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
5 deletions
+24
-5
i965_drv_video/i965_drv_video.c
i965_drv_video/i965_drv_video.c
+18
-0
i965_drv_video/i965_drv_video.h
i965_drv_video/i965_drv_video.h
+2
-1
i965_drv_video/i965_render.c
i965_drv_video/i965_render.c
+4
-4
No files found.
i965_drv_video/i965_drv_video.c
View file @
141a6f72
...
@@ -70,6 +70,14 @@ i965_subpic_formats_map[I965_MAX_SUBPIC_FORMATS + 1] = {
...
@@ -70,6 +70,14 @@ i965_subpic_formats_map[I965_MAX_SUBPIC_FORMATS + 1] = {
{
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
},
0
},
{
I965_SURFACETYPE_RGBA
,
I965_SURFACEFORMAT_B8G8R8A8_UNORM
,
{
VA_FOURCC
(
'B'
,
'G'
,
'R'
,
'A'
),
VA_LSB_FIRST
,
32
,
32
,
0x00ff0000
,
0x0000ff00
,
0x000000ff
,
0xff000000
},
0
},
{
I965_SURFACETYPE_RGBA
,
I965_SURFACEFORMAT_R8G8B8A8_UNORM
,
{
VA_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
),
VA_LSB_FIRST
,
32
,
32
,
0x000000ff
,
0x0000ff00
,
0x00ff0000
,
0xff000000
},
0
},
};
};
static
const
i965_subpic_format_map_t
*
static
const
i965_subpic_format_map_t
*
...
@@ -488,6 +496,7 @@ i965_CreateSubpicture(VADriverContextP ctx,
...
@@ -488,6 +496,7 @@ i965_CreateSubpicture(VADriverContextP ctx,
obj_subpic
->
format
=
m
->
format
;
obj_subpic
->
format
=
m
->
format
;
obj_subpic
->
width
=
obj_image
->
image
.
width
;
obj_subpic
->
width
=
obj_image
->
image
.
width
;
obj_subpic
->
height
=
obj_image
->
image
.
height
;
obj_subpic
->
height
=
obj_image
->
image
.
height
;
obj_subpic
->
pitch
=
obj_image
->
image
.
pitches
[
0
];
obj_subpic
->
bo
=
obj_image
->
bo
;
obj_subpic
->
bo
=
obj_image
->
bo
;
return
VA_STATUS_SUCCESS
;
return
VA_STATUS_SUCCESS
;
}
}
...
@@ -1299,6 +1308,15 @@ i965_CreateImage(VADriverContextP ctx,
...
@@ -1299,6 +1308,15 @@ i965_CreateImage(VADriverContextP ctx,
image
->
component_order
[
1
]
=
'G'
;
image
->
component_order
[
1
]
=
'G'
;
image
->
component_order
[
2
]
=
'B'
;
image
->
component_order
[
2
]
=
'B'
;
break
;
break
;
case
VA_FOURCC
(
'A'
,
'R'
,
'G'
,
'B'
):
case
VA_FOURCC
(
'A'
,
'B'
,
'G'
,
'R'
):
case
VA_FOURCC
(
'B'
,
'G'
,
'R'
,
'A'
):
case
VA_FOURCC
(
'R'
,
'G'
,
'B'
,
'A'
):
image
->
num_planes
=
1
;
image
->
pitches
[
0
]
=
width
*
4
;
image
->
offsets
[
0
]
=
0
;
image
->
data_size
=
image
->
offsets
[
0
]
+
image
->
pitches
[
0
]
*
height
;
break
;
default:
default:
goto
error
;
goto
error
;
}
}
...
...
i965_drv_video/i965_drv_video.h
View file @
141a6f72
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
#define I965_MAX_ENTRYPOINTS 5
#define I965_MAX_ENTRYPOINTS 5
#define I965_MAX_CONFIG_ATTRIBUTES 10
#define I965_MAX_CONFIG_ATTRIBUTES 10
#define I965_MAX_IMAGE_FORMATS 10
#define I965_MAX_IMAGE_FORMATS 10
#define I965_MAX_SUBPIC_FORMATS
2
#define I965_MAX_SUBPIC_FORMATS
4
#define I965_MAX_DISPLAY_ATTRIBUTES 4
#define I965_MAX_DISPLAY_ATTRIBUTES 4
#define I965_STR_VENDOR "i965 Driver 0.1"
#define I965_STR_VENDOR "i965 Driver 0.1"
...
@@ -138,6 +138,7 @@ struct object_subpic
...
@@ -138,6 +138,7 @@ struct object_subpic
unsigned
int
format
;
unsigned
int
format
;
int
width
;
int
width
;
int
height
;
int
height
;
int
pitch
;
dri_bo
*
bo
;
dri_bo
*
bo
;
};
};
...
...
i965_drv_video/i965_render.c
View file @
141a6f72
...
@@ -592,7 +592,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
...
@@ -592,7 +592,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
int
index
,
int
index
,
dri_bo
*
region
,
dri_bo
*
region
,
unsigned
long
offset
,
unsigned
long
offset
,
int
w
,
int
h
,
int
format
)
int
w
,
int
h
,
int
p
,
int
format
)
{
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
i965_render_state
*
render_state
=
&
i965
->
render_state
;
struct
i965_render_state
*
render_state
=
&
i965
->
render_state
;
...
@@ -626,7 +626,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
...
@@ -626,7 +626,7 @@ i965_subpic_render_src_surface_state(VADriverContextP ctx,
ss
->
ss2
.
mip_count
=
0
;
ss
->
ss2
.
mip_count
=
0
;
ss
->
ss2
.
render_target_rotation
=
0
;
ss
->
ss2
.
render_target_rotation
=
0
;
ss
->
ss3
.
pitch
=
w
-
1
;
ss
->
ss3
.
pitch
=
p
-
1
;
dri_bo_emit_reloc
(
ss_bo
,
dri_bo_emit_reloc
(
ss_bo
,
I915_GEM_DOMAIN_SAMPLER
,
0
,
I915_GEM_DOMAIN_SAMPLER
,
0
,
...
@@ -691,8 +691,8 @@ i965_subpic_render_src_surfaces_state(VADriverContextP ctx,
...
@@ -691,8 +691,8 @@ i965_subpic_render_src_surfaces_state(VADriverContextP ctx,
region
=
obj_surface
->
bo
;
region
=
obj_surface
->
bo
;
subpic_region
=
obj_image
->
bo
;
subpic_region
=
obj_image
->
bo
;
/*subpicture surface*/
/*subpicture surface*/
i965_subpic_render_src_surface_state
(
ctx
,
1
,
subpic_region
,
0
,
obj_subpic
->
width
,
obj_subpic
->
height
,
obj_subpic
->
format
);
i965_subpic_render_src_surface_state
(
ctx
,
1
,
subpic_region
,
0
,
obj_subpic
->
width
,
obj_subpic
->
height
,
obj_subpic
->
pitch
,
obj_subpic
->
format
);
i965_subpic_render_src_surface_state
(
ctx
,
2
,
subpic_region
,
0
,
obj_subpic
->
width
,
obj_subpic
->
height
,
obj_subpic
->
format
);
i965_subpic_render_src_surface_state
(
ctx
,
2
,
subpic_region
,
0
,
obj_subpic
->
width
,
obj_subpic
->
height
,
obj_subpic
->
pitch
,
obj_subpic
->
format
);
}
}
static
void
static
void
...
...
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