Android-x86
Fork
Faire un don

  • R/O
  • HTTP
  • SSH
  • HTTPS

hardware-intel-common-vaapi: Commit

hardware/intel/common/vaapi


Commit MetaInfo

Révisionc6da3489fba6d400dd89959cace9db8d25e6a6b6 (tree)
l'heure2018-05-18 17:35:35
Auteurottingerg <g.ottinger@gmx....>
CommiterXiang, Haihao

Message de Log

vp8 encoder parameter check - do not check for ref frames if no no_ref_X flag is set

In VP8 encoding not always all reference frames (last, golden, altref) are provided.
This is indicated with the flags ref_flags.bits.no_ref_last, ref_flags.bits.no_ref_gf
and ref_flags.bits.no_ref_arf in VAEncPictureParameterBufferVP8.
While checking picture parameters, make sure that assert errors concerning invalid
reference frame only occure if no_ref_X is not set.

Change Summary

Modification

--- a/src/i965_encoder.c
+++ b/src/i965_encoder.c
@@ -1154,32 +1154,39 @@ intel_encoder_check_vp8_parameter(VADriverContextP ctx,
11541154 encode_state->coded_buf_object = obj_buffer;
11551155
11561156 if (!is_key_frame) {
1157- assert(pic_param->ref_last_frame != VA_INVALID_SURFACE);
1158- obj_surface = SURFACE(pic_param->ref_last_frame);
1159- assert(obj_surface && obj_surface->bo);
11601157
1161- if (!obj_surface || !obj_surface->bo)
1162- goto error;
1158+ if(!pic_param->ref_flags.bits.no_ref_last) {
1159+ assert(pic_param->ref_last_frame != VA_INVALID_SURFACE);
1160+ obj_surface = SURFACE(pic_param->ref_last_frame);
1161+ assert(obj_surface && obj_surface->bo);
11631162
1164- encode_state->reference_objects[i++] = obj_surface;
1163+ if (!obj_surface || !obj_surface->bo)
1164+ goto error;
11651165
1166- assert(pic_param->ref_gf_frame != VA_INVALID_SURFACE);
1167- obj_surface = SURFACE(pic_param->ref_gf_frame);
1168- assert(obj_surface && obj_surface->bo);
1166+ encode_state->reference_objects[i++] = obj_surface;
1167+ }
11691168
1170- if (!obj_surface || !obj_surface->bo)
1171- goto error;
1169+ if(!pic_param->ref_flags.bits.no_ref_gf) {
1170+ assert(pic_param->ref_gf_frame != VA_INVALID_SURFACE);
1171+ obj_surface = SURFACE(pic_param->ref_gf_frame);
1172+ assert(obj_surface && obj_surface->bo);
11721173
1173- encode_state->reference_objects[i++] = obj_surface;
1174+ if (!obj_surface || !obj_surface->bo)
1175+ goto error;
11741176
1175- assert(pic_param->ref_arf_frame != VA_INVALID_SURFACE);
1176- obj_surface = SURFACE(pic_param->ref_arf_frame);
1177- assert(obj_surface && obj_surface->bo);
1177+ encode_state->reference_objects[i++] = obj_surface;
1178+ }
11781179
1179- if (!obj_surface || !obj_surface->bo)
1180- goto error;
1180+ if(!pic_param->ref_flags.bits.no_ref_arf) {
1181+ assert(pic_param->ref_arf_frame != VA_INVALID_SURFACE);
1182+ obj_surface = SURFACE(pic_param->ref_arf_frame);
1183+ assert(obj_surface && obj_surface->bo);
11811184
1182- encode_state->reference_objects[i++] = obj_surface;
1185+ if (!obj_surface || !obj_surface->bo)
1186+ goto error;
1187+
1188+ encode_state->reference_objects[i++] = obj_surface;
1189+ }
11831190 }
11841191
11851192 for (; i < 16; i++)
Afficher sur ancien navigateur de dépôt.