OSDN Git Service

Enc: add max ref number query for AVC encoder on SKL+
authorPengfei Qu <Pengfei.Qu@intel.com>
Fri, 23 Jun 2017 01:54:36 +0000 (09:54 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 30 Jun 2017 15:01:38 +0000 (23:01 +0800)
Fixes #199

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
src/i965_drv_video.c

index aab16e8..fd38045 100644 (file)
@@ -1022,9 +1022,17 @@ i965_GetConfigAttributes(VADriverContextP ctx,
             break;
 
         case VAConfigAttribEncMaxRefFrames:
-            if (entrypoint == VAEntrypointEncSlice)
+            if (entrypoint == VAEntrypointEncSlice) {
                 attrib_list[i].value = (1 << 16) | (1 << 0);
-            else if (entrypoint == VAEntrypointEncSliceLP) {
+                if (profile == VAProfileH264ConstrainedBaseline ||
+                    profile == VAProfileH264Main ||
+                    profile == VAProfileH264High ||
+                    profile == VAProfileH264StereoHigh ||
+                    profile == VAProfileH264MultiviewHigh) {
+                    if (IS_GEN9(i965->intel.device_info))
+                        attrib_list[i].value = (2 << 16) | (8 << 0);
+                }
+            } else if (entrypoint == VAEntrypointEncSliceLP) {
                 /* Don't support B frame for low power mode */
                 if (profile == VAProfileH264ConstrainedBaseline ||
                     profile == VAProfileH264Main ||