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
252dd7c6
Commit
252dd7c6
authored
Jul 12, 2010
by
Xiang, Haihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i965_drv_video: use original widht/height for rendering
parent
dd9c332d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
12 deletions
+19
-12
i965_drv_video/i965_drv_video.c
i965_drv_video/i965_drv_video.c
+4
-2
i965_drv_video/i965_drv_video.h
i965_drv_video/i965_drv_video.h
+2
-0
i965_drv_video/i965_render.c
i965_drv_video/i965_render.c
+13
-10
No files found.
i965_drv_video/i965_drv_video.c
View file @
252dd7c6
...
...
@@ -384,8 +384,10 @@ i965_CreateSurfaces(VADriverContextP ctx,
surfaces
[
i
]
=
surfaceID
;
obj_surface
->
status
=
VASurfaceReady
;
obj_surface
->
subpic
=
VA_INVALID_ID
;
obj_surface
->
width
=
ALIGN
(
width
,
16
);
obj_surface
->
height
=
ALIGN
(
height
,
16
);
obj_surface
->
orig_width
=
width
;
obj_surface
->
orig_height
=
height
;
obj_surface
->
width
=
ALIGN
(
obj_surface
->
orig_width
,
16
);
obj_surface
->
height
=
ALIGN
(
obj_surface
->
orig_height
,
16
);
obj_surface
->
size
=
SIZE_YUV420
(
obj_surface
->
width
,
obj_surface
->
height
);
obj_surface
->
flags
=
SURFACE_REFERENCED
;
obj_surface
->
bo
=
NULL
;
...
...
i965_drv_video/i965_drv_video.h
View file @
252dd7c6
...
...
@@ -105,6 +105,8 @@ struct object_surface
int
width
;
int
height
;
int
size
;
int
orig_width
;
int
orig_height
;
int
flags
;
dri_bo
*
bo
;
void
(
*
free_private_data
)(
void
**
data
);
...
...
i965_drv_video/i965_render.c
View file @
252dd7c6
...
...
@@ -650,6 +650,7 @@ i965_render_src_surfaces_state(VADriverContextP ctx,
struct
i965_render_state
*
render_state
=
&
i965
->
render_state
;
struct
object_surface
*
obj_surface
;
int
w
,
h
;
int
rw
,
rh
;
dri_bo
*
region
;
obj_surface
=
SURFACE
(
surface
);
...
...
@@ -657,19 +658,21 @@ i965_render_src_surfaces_state(VADriverContextP ctx,
assert
(
obj_surface
->
bo
);
w
=
obj_surface
->
width
;
h
=
obj_surface
->
height
;
rw
=
obj_surface
->
orig_width
;
rh
=
obj_surface
->
orig_height
;
region
=
obj_surface
->
bo
;
i965_render_src_surface_state
(
ctx
,
1
,
region
,
0
,
w
,
h
,
w
,
I965_SURFACEFORMAT_R8_UNORM
);
/* Y */
i965_render_src_surface_state
(
ctx
,
2
,
region
,
0
,
w
,
h
,
w
,
I965_SURFACEFORMAT_R8_UNORM
);
i965_render_src_surface_state
(
ctx
,
1
,
region
,
0
,
rw
,
r
h
,
w
,
I965_SURFACEFORMAT_R8_UNORM
);
/* Y */
i965_render_src_surface_state
(
ctx
,
2
,
region
,
0
,
rw
,
r
h
,
w
,
I965_SURFACEFORMAT_R8_UNORM
);
if
(
render_state
->
interleaved_uv
)
{
i965_render_src_surface_state
(
ctx
,
3
,
region
,
w
*
h
,
w
/
2
,
h
/
2
,
w
,
I965_SURFACEFORMAT_R8G8_UNORM
);
/* UV */
i965_render_src_surface_state
(
ctx
,
4
,
region
,
w
*
h
,
w
/
2
,
h
/
2
,
w
,
I965_SURFACEFORMAT_R8G8_UNORM
);
i965_render_src_surface_state
(
ctx
,
3
,
region
,
w
*
h
,
rw
/
2
,
r
h
/
2
,
w
,
I965_SURFACEFORMAT_R8G8_UNORM
);
/* UV */
i965_render_src_surface_state
(
ctx
,
4
,
region
,
w
*
h
,
rw
/
2
,
r
h
/
2
,
w
,
I965_SURFACEFORMAT_R8G8_UNORM
);
}
else
{
i965_render_src_surface_state
(
ctx
,
3
,
region
,
w
*
h
,
w
/
2
,
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* U */
i965_render_src_surface_state
(
ctx
,
4
,
region
,
w
*
h
,
w
/
2
,
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
i965_render_src_surface_state
(
ctx
,
5
,
region
,
w
*
h
+
w
*
h
/
4
,
w
/
2
,
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* V */
i965_render_src_surface_state
(
ctx
,
6
,
region
,
w
*
h
+
w
*
h
/
4
,
w
/
2
,
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
i965_render_src_surface_state
(
ctx
,
3
,
region
,
w
*
h
,
rw
/
2
,
r
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* U */
i965_render_src_surface_state
(
ctx
,
4
,
region
,
w
*
h
,
rw
/
2
,
r
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
i965_render_src_surface_state
(
ctx
,
5
,
region
,
w
*
h
+
w
*
h
/
4
,
rw
/
2
,
r
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
/* V */
i965_render_src_surface_state
(
ctx
,
6
,
region
,
w
*
h
+
w
*
h
/
4
,
rw
/
2
,
r
h
/
2
,
w
/
2
,
I965_SURFACEFORMAT_R8_UNORM
);
}
}
...
...
@@ -883,8 +886,8 @@ i965_render_upload_vertex(VADriverContextP ctx,
obj_surface
=
SURFACE
(
surface
);
assert
(
surface
);
width
=
obj_surface
->
width
;
height
=
obj_surface
->
height
;
width
=
obj_surface
->
orig_
width
;
height
=
obj_surface
->
orig_
height
;
u1
=
(
float
)
srcx
/
width
;
v1
=
(
float
)
srcy
/
height
;
...
...
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