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
ecfc3b45
Commit
ecfc3b45
authored
Apr 22, 2011
by
Xiang, Haihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
i965_drv_video/encode: merge the object command for intra/inter frame
Signed-off-by:
Xiang, Haihao
<
haihao.xiang@intel.com
>
parent
2c52a008
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
36 deletions
+7
-36
i965_drv_video/gen6_vme.c
i965_drv_video/gen6_vme.c
+7
-36
No files found.
i965_drv_video/gen6_vme.c
View file @
ecfc3b45
...
...
@@ -519,10 +519,11 @@ static void gen6_vme_idrt(VADriverContextP ctx)
ADVANCE_BATCH
(
ctx
);
}
static
int
gen6_vme_media_object_intra
(
VADriverContextP
ctx
,
VAContextID
context
,
struct
mfc_encode_state
*
encode_state
,
int
mb_x
,
int
mb_y
)
static
int
gen6_vme_media_object
(
VADriverContextP
ctx
,
VAContextID
context
,
struct
mfc_encode_state
*
encode_state
,
int
mb_x
,
int
mb_y
,
int
kernel
)
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
object_surface
*
obj_surface
=
SURFACE
(
encode_state
->
current_render_target
);
...
...
@@ -532,7 +533,7 @@ static int gen6_vme_media_object_intra(VADriverContextP ctx,
BEGIN_BATCH
(
ctx
,
len_in_dowrds
);
OUT_BATCH
(
ctx
,
CMD_MEDIA_OBJECT
|
(
len_in_dowrds
-
2
));
OUT_BATCH
(
ctx
,
VME_INTRA_SHADER
);
/*Interface Descriptor Offset*/
OUT_BATCH
(
ctx
,
kernel
);
/*Interface Descriptor Offset*/
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
...
...
@@ -545,32 +546,6 @@ static int gen6_vme_media_object_intra(VADriverContextP ctx,
return
len_in_dowrds
*
4
;
}
static
int
gen6_vme_media_object_inter
(
VADriverContextP
ctx
,
VAContextID
context
,
struct
mfc_encode_state
*
encode_state
,
int
mb_x
,
int
mb_y
)
{
struct
i965_driver_data
*
i965
=
i965_driver_data
(
ctx
);
struct
object_surface
*
obj_surface
=
SURFACE
(
encode_state
->
current_render_target
);
int
mb_width
=
ALIGN
(
obj_surface
->
orig_width
,
16
)
/
16
;
int
len_in_dowrds
=
6
+
1
;
BEGIN_BATCH
(
ctx
,
len_in_dowrds
);
OUT_BATCH
(
ctx
,
CMD_MEDIA_OBJECT
|
(
len_in_dowrds
-
2
));
OUT_BATCH
(
ctx
,
VME_INTER_SHADER
);
/*Interface Descriptor Offset*/
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
OUT_BATCH
(
ctx
,
0
);
/*inline data */
OUT_BATCH
(
ctx
,
mb_width
<<
16
|
mb_y
<<
8
|
mb_x
);
ADVANCE_BATCH
(
ctx
);
return
len_in_dowrds
*
4
;
}
static
void
gen6_vme_media_init
(
VADriverContextP
ctx
)
{
int
i
;
...
...
@@ -667,11 +642,7 @@ static void gen6_vme_pipeline_programing(VADriverContextP ctx,
}
/*Step4: Primitive commands*/
if
(
is_intra
)
{
object_len_in_bytes
=
gen6_vme_media_object_intra
(
ctx
,
context
,
encode_state
,
x
,
y
);
}
else
{
object_len_in_bytes
=
gen6_vme_media_object_inter
(
ctx
,
context
,
encode_state
,
x
,
y
);
}
object_len_in_bytes
=
gen6_vme_media_object
(
ctx
,
context
,
encode_state
,
x
,
y
,
is_intra
?
VME_INTRA_SHADER
:
VME_INTER_SHADER
);
if
(
intel_batchbuffer_check_free_space
(
ctx
,
object_len_in_bytes
)
==
0
)
{
intel_batchbuffer_end_atomic
(
ctx
);
...
...
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