Skip to content

Commit 69703e3

Browse files
rootXinfengZhang
authored andcommitted
[Encode] Set correct entrypoint for lowpower
Set correct entrypoint to VAEntrypointEncSliceLP for HEVC lowpower insead of VAEntrypointEncSlice
1 parent 995d201 commit 69703e3

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

encode/hevcencode.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2031,6 +2031,12 @@ static int init_va(void)
20312031
for (i = 0; i < VAConfigAttribTypeMax; i++)
20322032
attrib[i].type = i;
20332033

2034+
if (lowpower)
2035+
{
2036+
entryPoint = VAEntrypointEncSliceLP;
2037+
LCU_SIZE = 64;
2038+
}
2039+
20342040
va_status = vaGetConfigAttributes(va_dpy, hevc_profile, entryPoint,
20352041
&attrib[0], VAConfigAttribTypeMax);
20362042
CHECK_VASTATUS(va_status, "vaGetConfigAttributes");
@@ -2173,11 +2179,6 @@ static int setup_encode()
21732179
VASurfaceID *tmp_surfaceid;
21742180
int codedbuf_size, i;
21752181

2176-
if (lowpower)
2177-
{
2178-
entryPoint = VAEntrypointEncSliceLP;
2179-
LCU_SIZE = 64;
2180-
}
21812182
va_status = vaCreateConfig(va_dpy, hevc_profile, entryPoint,
21822183
&config_attrib[0], config_attrib_num, &config_id);
21832184
CHECK_VASTATUS(va_status, "vaCreateConfig");

0 commit comments

Comments
 (0)