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
bcb8dc4a
Commit
bcb8dc4a
authored
Apr 11, 2011
by
Xiang, Haihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i965_drv_video: fix the format of a derived image for MPEG2 on ILK
The native format used for MPEG2 decoding on ILK is I420
parent
23868d8b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
29 deletions
+50
-29
i965_drv_video/i965_drv_video.c
i965_drv_video/i965_drv_video.c
+34
-19
i965_drv_video/i965_render.c
i965_drv_video/i965_render.c
+14
-9
i965_drv_video/i965_render.h
i965_drv_video/i965_render.h
+2
-1
No files found.
i965_drv_video/i965_drv_video.c
View file @
bcb8dc4a
...
...
@@ -775,6 +775,8 @@ i965_CreateContext(VADriverContextP ctx,
return
vaStatus
;
}
render_state
->
inited
=
1
;
switch
(
obj_config
->
profile
)
{
case
VAProfileH264Baseline
:
case
VAProfileH264Main
:
...
...
@@ -1572,6 +1574,18 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
image
->
height
=
obj_surface
->
orig_height
;
image
->
data_size
=
data_size
;
if
(
!
render_state
->
inited
)
{
image
->
format
.
fourcc
=
VA_FOURCC
(
'Y'
,
'V'
,
'1'
,
'2'
);
image
->
format
.
byte_order
=
VA_LSB_FIRST
;
image
->
format
.
bits_per_pixel
=
12
;
image
->
num_planes
=
3
;
image
->
pitches
[
0
]
=
w_pitch
;
image
->
offsets
[
0
]
=
0
;
image
->
pitches
[
1
]
=
w_pitch
/
2
;
image
->
offsets
[
1
]
=
w_pitch
*
h_pitch
;
image
->
pitches
[
2
]
=
w_pitch
/
2
;
image
->
offsets
[
2
]
=
w_pitch
*
h_pitch
+
(
w_pitch
/
2
)
*
(
h_pitch
/
2
);
}
else
{
if
(
render_state
->
interleaved_uv
)
{
image
->
format
.
fourcc
=
VA_FOURCC
(
'N'
,
'V'
,
'1'
,
'2'
);
image
->
format
.
byte_order
=
VA_LSB_FIRST
;
...
...
@@ -1582,7 +1596,7 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
image
->
pitches
[
1
]
=
w_pitch
;
image
->
offsets
[
1
]
=
w_pitch
*
h_pitch
;
}
else
{
image
->
format
.
fourcc
=
VA_FOURCC
(
'Y'
,
'V'
,
'1'
,
'2
'
);
image
->
format
.
fourcc
=
VA_FOURCC
(
'I'
,
'4'
,
'2'
,
'0
'
);
image
->
format
.
byte_order
=
VA_LSB_FIRST
;
image
->
format
.
bits_per_pixel
=
12
;
image
->
num_planes
=
3
;
...
...
@@ -1593,6 +1607,7 @@ VAStatus i965_DeriveImage(VADriverContextP ctx,
image
->
pitches
[
2
]
=
w_pitch
/
2
;
image
->
offsets
[
2
]
=
w_pitch
*
h_pitch
+
(
w_pitch
/
2
)
*
(
h_pitch
/
2
);
}
}
if
(
obj_surface
->
bo
==
NULL
)
{
if
(
HAS_TILED_SURFACE
(
i965
))
{
...
...
i965_drv_video/i965_render.c
View file @
bcb8dc4a
...
...
@@ -681,21 +681,26 @@ i965_render_src_surfaces_state(VADriverContextP ctx,
i965_render_src_surface_state
(
ctx
,
1
,
region
,
0
,
rw
,
rh
,
w
,
I965_SURFACEFORMAT_R8_UNORM
);
/* Y */
i965_render_src_surface_state
(
ctx
,
2
,
region
,
0
,
rw
,
rh
,
w
,
I965_SURFACEFORMAT_R8_UNORM
);
if
(
!
render_state
->
inited
)
{
int
u3
=
5
,
u4
=
6
,
v5
=
3
,
v6
=
4
;
i965_render_src_surface_state
(
ctx
,
u3
,
region
,
w
*
h
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* U */
i965_render_src_surface_state
(
ctx
,
u4
,
region
,
w
*
h
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
i965_render_src_surface_state
(
ctx
,
v5
,
region
,
w
*
h
+
w
*
h
/
4
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* V */
i965_render_src_surface_state
(
ctx
,
v6
,
region
,
w
*
h
+
w
*
h
/
4
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
}
else
{
if
(
render_state
->
interleaved_uv
)
{
i965_render_src_surface_state
(
ctx
,
3
,
region
,
w
*
h
,
rw
/
2
,
rh
/
2
,
w
,
I965_SURFACEFORMAT_R8G8_UNORM
);
/* UV */
i965_render_src_surface_state
(
ctx
,
4
,
region
,
w
*
h
,
rw
/
2
,
rh
/
2
,
w
,
I965_SURFACEFORMAT_R8G8_UNORM
);
}
else
{
int
u3
=
3
,
u4
=
4
,
v5
=
5
,
v6
=
6
;
if
(
obj_surface
->
flags
&
SURFACE_DERIVED
)
{
u3
=
5
,
u4
=
6
,
v5
=
3
,
v6
=
4
;
}
i965_render_src_surface_state
(
ctx
,
u3
,
region
,
w
*
h
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* U */
i965_render_src_surface_state
(
ctx
,
u4
,
region
,
w
*
h
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
i965_render_src_surface_state
(
ctx
,
v5
,
region
,
w
*
h
+
w
*
h
/
4
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* V */
i965_render_src_surface_state
(
ctx
,
v6
,
region
,
w
*
h
+
w
*
h
/
4
,
rw
/
2
,
rh
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
}
}
}
static
void
...
...
i965_drv_video/i965_render.h
View file @
bcb8dc4a
...
...
@@ -66,7 +66,8 @@ struct i965_render_state
int
upload
;
}
curbe
;
int
interleaved_uv
;
unsigned
short
interleaved_uv
;
unsigned
short
inited
;
struct
intel_region
*
draw_region
;
int
pp_flag
;
/* 0: disable, 1: enable */
...
...
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