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
3179d67e
Commit
3179d67e
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: simplify put_surface() and put_subpicture() args.
parent
5b5dfd0e
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
221 additions
and
371 deletions
+221
-371
i965_drv_video/i965_drv_video.c
i965_drv_video/i965_drv_video.c
+15
-8
i965_drv_video/i965_post_processing.c
i965_drv_video/i965_post_processing.c
+61
-94
i965_drv_video/i965_post_processing.h
i965_drv_video/i965_post_processing.h
+8
-11
i965_drv_video/i965_render.c
i965_drv_video/i965_render.c
+122
-237
i965_drv_video/i965_render.h
i965_drv_video/i965_render.h
+15
-21
No files found.
i965_drv_video/i965_drv_video.c
View file @
3179d67e
...
...
@@ -2244,10 +2244,12 @@ i965_PutSurface(VADriverContextP ctx,
union
dri_buffer
*
buffer
;
struct
intel_region
*
dest_region
;
struct
object_surface
*
obj_surface
;
VARectangle
src_rect
,
dst_rect
;
int
ret
;
uint32_t
name
;
Bool
new_region
=
False
;
int
pp_flag
=
0
;
/* Currently don't support DRI1 */
if
(
dri_state
->
driConnectedFlag
!=
VA_DRI2
)
return
VA_STATUS_ERROR_UNKNOWN
;
...
...
@@ -2305,16 +2307,21 @@ i965_PutSurface(VADriverContextP ctx,
if
(
flags
&
(
VA_BOTTOM_FIELD
|
VA_TOP_FIELD
))
pp_flag
|=
I965_PP_FLAG_DEINTERLACING
;
intel_render_put_surface
(
ctx
,
surface
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
pp_flag
);
src_rect
.
x
=
srcx
;
src_rect
.
y
=
srcy
;
src_rect
.
width
=
srcw
;
src_rect
.
height
=
srch
;
dst_rect
.
x
=
destx
;
dst_rect
.
y
=
desty
;
dst_rect
.
width
=
destw
;
dst_rect
.
height
=
desth
;
intel_render_put_surface
(
ctx
,
surface
,
&
src_rect
,
&
dst_rect
,
pp_flag
);
if
(
obj_surface
->
subpic
!=
VA_INVALID_ID
)
{
intel_render_put_subpicture
(
ctx
,
surface
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
);
}
intel_render_put_subpicture
(
ctx
,
surface
,
&
src_rect
,
&
dst_rect
);
}
dri_swap_buffer
(
ctx
,
dri_drawable
);
obj_surface
->
flags
|=
SURFACE_DISPLAYED
;
...
...
i965_drv_video/i965_post_processing.c
View file @
3179d67e
...
...
@@ -1748,18 +1748,14 @@ void pp_nv12_dndi_initialize(VADriverContextP ctx, VASurfaceID surface, int inpu
}
static
void
ironlake_pp_initialize
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
int
pp_index
)
ironlake_pp_initialize
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
int
pp_index
)
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
i965_post_processing_context
*
pp_context
=
i965
->
pp_context
;
...
...
@@ -1842,44 +1838,35 @@ ironlake_pp_initialize(VADriverContextP ctx,
pp_module
=
&
pp_context
->
pp_modules
[
pp_index
];
if
(
pp_module
->
initialize
)
pp_module
->
initialize
(
ctx
,
surface
,
input
,
srcw
,
srch
,
destw
,
desth
);
pp_module
->
initialize
(
ctx
,
surface
,
input
,
src_rect
->
width
,
src_rect
->
height
,
dst_rect
->
width
,
dst_rect
->
height
);
}
static
void
ironlake_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
int
pp_index
)
ironlake_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
int
pp_index
)
{
ironlake_pp_initialize
(
ctx
,
surface
,
input
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
pp_index
);
ironlake_pp_initialize
(
ctx
,
surface
,
input
,
src_rect
,
dst_rect
,
pp_index
);
ironlake_pp_states_setup
(
ctx
);
ironlake_pp_pipeline_setup
(
ctx
);
}
static
void
gen6_pp_initialize
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
int
pp_index
)
gen6_pp_initialize
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
int
pp_index
)
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
i965_post_processing_context
*
pp_context
=
i965
->
pp_context
;
...
...
@@ -1962,7 +1949,9 @@ gen6_pp_initialize(VADriverContextP ctx,
pp_module
=
&
pp_context
->
pp_modules
[
pp_index
];
if
(
pp_module
->
initialize
)
pp_module
->
initialize
(
ctx
,
surface
,
input
,
srcw
,
srch
,
destw
,
desth
);
pp_module
->
initialize
(
ctx
,
surface
,
input
,
src_rect
->
width
,
src_rect
->
height
,
dst_rect
->
width
,
dst_rect
->
height
);
}
static
void
...
...
@@ -2206,68 +2195,48 @@ gen6_pp_pipeline_setup(VADriverContextP ctx)
}
static
void
gen6_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
int
pp_index
)
gen6_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
int
pp_index
)
{
gen6_pp_initialize
(
ctx
,
surface
,
input
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
pp_index
);
gen6_pp_initialize
(
ctx
,
surface
,
input
,
src_rect
,
dst_rect
,
pp_index
);
gen6_pp_states_setup
(
ctx
);
gen6_pp_pipeline_setup
(
ctx
);
}
static
void
i965_post_processing_internal
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
int
pp_index
)
i965_post_processing_internal
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
int
input
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
int
pp_index
)
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
if
(
IS_GEN6
(
i965
->
intel
.
device_id
)
||
IS_GEN7
(
i965
->
intel
.
device_id
))
gen6_post_processing
(
ctx
,
surface
,
input
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
pp_index
);
gen6_post_processing
(
ctx
,
surface
,
input
,
src_rect
,
dst_rect
,
pp_index
);
else
ironlake_post_processing
(
ctx
,
surface
,
input
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
ironlake_post_processing
(
ctx
,
surface
,
input
,
src_rect
,
dst_rect
,
pp_index
);
}
void
i965_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
unsigned
int
flag
)
i965_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
unsigned
int
flags
)
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
...
...
@@ -2276,18 +2245,16 @@ i965_post_processing(VADriverContextP ctx,
if
(
i965
->
render_state
.
interleaved_uv
)
{
int
internal_input
=
0
;
if
(
flag
&
I965_PP_FLAG_DEINTERLACING
)
{
if
(
flag
s
&
I965_PP_FLAG_DEINTERLACING
)
{
i965_post_processing_internal
(
ctx
,
surface
,
internal_input
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
src_rect
,
dst_rect
,
PP_NV12_DNDI
);
internal_input
=
1
;
}
if
(
flag
&
I965_PP_FLAG_AVS
)
{
if
(
flag
s
&
I965_PP_FLAG_AVS
)
{
i965_post_processing_internal
(
ctx
,
surface
,
internal_input
,
srcx
,
srcy
,
srcw
,
srch
,
destx
,
desty
,
destw
,
desth
,
src_rect
,
dst_rect
,
PP_NV12_AVS
);
}
}
...
...
i965_drv_video/i965_post_processing.h
View file @
3179d67e
...
...
@@ -351,17 +351,14 @@ struct i965_post_processing_context
};
void
i965_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
unsigned
int
pp_index
);
i965_post_processing
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
unsigned
int
flags
);
Bool
i965_post_processing_terminate
(
VADriverContextP
ctx
);
Bool
...
...
i965_drv_video/i965_render.c
View file @
3179d67e
This diff is collapsed.
Click to expand it.
i965_drv_video/i965_render.h
View file @
3179d67e
...
...
@@ -81,28 +81,22 @@ struct i965_render_state
Bool
i965_render_init
(
VADriverContextP
ctx
);
Bool
i965_render_terminate
(
VADriverContextP
ctx
);
void
intel_render_put_surface
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
,
unsigned
int
flag
);
void
intel_render_put_surface
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
,
unsigned
int
flags
);
void
intel_render_put_subpicture
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
short
srcx
,
short
srcy
,
unsigned
short
srcw
,
unsigned
short
srch
,
short
destx
,
short
desty
,
unsigned
short
destw
,
unsigned
short
desth
);
intel_render_put_subpicture
(
VADriverContextP
ctx
,
VASurfaceID
surface
,
const
VARectangle
*
src_rect
,
const
VARectangle
*
dst_rect
);
#endif
/* _I965_RENDER_H_ */
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