summaryrefslogtreecommitdiff
path: root/src/i965_encoder.c
diff options
context:
space:
mode:
authorXiang, Haihao <haihao.xiang@intel.com>2013-08-08 09:52:33 +0800
committerXiang, Haihao <haihao.xiang@intel.com>2013-09-06 15:30:02 +0800
commit496bd7f47f93ad4ac4f3510aa1c088c027bfe762 (patch)
treeff4fb7569bdcf5c6d99ba4e52eb8923eb88d53b2 /src/i965_encoder.c
parentf08afbabeade7403557413f4858548d9a91b0d3e (diff)
downloadlibva-intel-driver-496bd7f47f93ad4ac4f3510aa1c088c027bfe762.tar.gz
libva-intel-driver-496bd7f47f93ad4ac4f3510aa1c088c027bfe762.tar.bz2
libva-intel-driver-496bd7f47f93ad4ac4f3510aa1c088c027bfe762.zip
Cleanup profile tracking in encoder
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit edd25a94e92b9cec23594dc978691506a1c8cfab)
Diffstat (limited to 'src/i965_encoder.c')
-rw-r--r--src/i965_encoder.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/i965_encoder.c b/src/i965_encoder.c
index 4384619..73cd3e3 100644
--- a/src/i965_encoder.c
+++ b/src/i965_encoder.c
@@ -345,7 +345,24 @@ intel_enc_hw_context_init(VADriverContextP ctx,
encoder_context->input_yuv_surface = VA_INVALID_SURFACE;
encoder_context->is_tmp_id = 0;
encoder_context->rate_control_mode = VA_RC_NONE;
- encoder_context->profile = obj_config->profile;
+
+ switch (obj_config->profile) {
+ case VAProfileMPEG2Simple:
+ case VAProfileMPEG2Main:
+ encoder_context->codec = CODEC_MPEG2;
+ break;
+
+ case VAProfileH264Baseline:
+ case VAProfileH264Main:
+ case VAProfileH264High:
+ encoder_context->codec = CODEC_H264;
+ break;
+
+ default:
+ /* Never get here */
+ assert(0);
+ break;
+ }
for (i = 0; i < obj_config->num_attribs; i++) {
if (obj_config->attrib_list[i].type == VAConfigAttribRateControl) {