summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSun, Mingruo <mingruo.sun@intel.com>2015-08-04 19:26:33 +0800
committerAustin Yuan <shengquan.yuan@intel.com>2015-08-05 10:56:27 +0800
commitd19d0a419f5b6b563a293e860ae90159b86c29b0 (patch)
tree5b4966813f101ac2048131dad8e0a6e8b098921c
parentbae9819c57989f8dd3e6f55e9d812f7e3fd744dd (diff)
vaenc: set target_usage=7 as default and fix potential issue of reference frame
Signed-off-by: Sun, Mingruo <mingruo.sun@intel.com>
-rw-r--r--vaenc/h264encode.c6
-rw-r--r--vaenc/va_encode.c8
-rw-r--r--vaenc/va_encode.h4
3 files changed, 9 insertions, 9 deletions
diff --git a/vaenc/h264encode.c b/vaenc/h264encode.c
index aa4a897..906e253 100644
--- a/vaenc/h264encode.c
+++ b/vaenc/h264encode.c
@@ -616,15 +616,15 @@ static int render_sequence(void)
va_status = vaRenderPicture(va_dpy,context_id, &seq_param_buf, 1);
CHECK_VASTATUS(va_status,"vaRenderPicture");;
- if (misc_priv_type != 0) {
+ if (misc_tu_type != 0) {
va_status = vaCreateBuffer(va_dpy, context_id,
VAEncMiscParameterBufferType,
sizeof(VAEncMiscParameterBuffer),
1, NULL, &misc_param_tmpbuf);
CHECK_VASTATUS(va_status,"vaCreateBuffer");
vaMapBuffer(va_dpy, misc_param_tmpbuf,(void **)&misc_param_tmp);
- misc_param_tmp->type = misc_priv_type;
- misc_param_tmp->data[0] = misc_priv_value;
+ misc_param_tmp->type = misc_tu_type;
+ misc_param_tmp->data[0] = misc_tu_value;
vaUnmapBuffer(va_dpy, misc_param_tmpbuf);
va_status = vaRenderPicture(va_dpy,context_id, &misc_param_tmpbuf, 1);
diff --git a/vaenc/va_encode.c b/vaenc/va_encode.c
index 5eb8929..29f9986 100644
--- a/vaenc/va_encode.c
+++ b/vaenc/va_encode.c
@@ -116,8 +116,8 @@ unsigned int current_IDR_display = 0;
unsigned int current_frame_num = 0;
unsigned int current_frame_type;
-unsigned int misc_priv_type = 0;
-unsigned int misc_priv_value = 0;
+unsigned int misc_tu_type = 6;
+unsigned int misc_tu_value = 7;
int pm_active = 0;
int interactive_mode = 0; /* stop at every vaEndPicture */
@@ -591,10 +591,10 @@ static int process_cmdline(int argc, char *argv[])
calc_psnr = 1;
break;
case 14:
- misc_priv_type = strtol(optarg, NULL, 0);
+ misc_tu_type = strtol(optarg, NULL, 0);
break;
case 15:
- misc_priv_value = strtol(optarg, NULL, 0);
+ misc_tu_value = strtol(optarg, NULL, 0);
break;
case 17:
h264_entropy_mode = atoi(optarg) ? 1: 0;
diff --git a/vaenc/va_encode.h b/vaenc/va_encode.h
index 6b1e254..30676d4 100644
--- a/vaenc/va_encode.h
+++ b/vaenc/va_encode.h
@@ -131,8 +131,8 @@ extern unsigned int current_IDR_display;
extern unsigned int current_frame_num;
extern unsigned int current_frame_type;
-extern unsigned int misc_priv_type;
-extern unsigned int misc_priv_value;
+extern unsigned int misc_tu_type;
+extern unsigned int misc_tu_value;
extern unsigned int surface_type;