Lines Matching refs:thiz
134 gst_msdkh264enc_insert_sei (GstMsdkH264Enc * thiz, GstVideoCodecFrame * frame, in gst_msdkh264enc_insert_sei() argument
139 if (!thiz->parser) in gst_msdkh264enc_insert_sei()
140 thiz->parser = gst_h264_nal_parser_new (); in gst_msdkh264enc_insert_sei()
142 new_buffer = gst_h264_parser_insert_sei (thiz->parser, in gst_msdkh264enc_insert_sei()
146 GST_WARNING_OBJECT (thiz, "Cannot insert SEI nal into AU buffer"); in gst_msdkh264enc_insert_sei()
155 gst_msdkh264enc_add_cc (GstMsdkH264Enc * thiz, GstVideoCodecFrame * frame) in gst_msdkh264enc_add_cc() argument
162 if (thiz->cc_sei_array) in gst_msdkh264enc_add_cc()
163 g_array_set_size (thiz->cc_sei_array, 0); in gst_msdkh264enc_add_cc()
204 if (!thiz->cc_sei_array) { in gst_msdkh264enc_add_cc()
205 thiz->cc_sei_array = in gst_msdkh264enc_add_cc()
207 g_array_set_clear_func (thiz->cc_sei_array, in gst_msdkh264enc_add_cc()
211 g_array_append_val (thiz->cc_sei_array, sei); in gst_msdkh264enc_add_cc()
214 if (!thiz->cc_sei_array || !thiz->cc_sei_array->len) in gst_msdkh264enc_add_cc()
217 mem = gst_h264_create_sei_memory (4, thiz->cc_sei_array); in gst_msdkh264enc_add_cc()
220 GST_WARNING_OBJECT (thiz, "Cannot create SEI nal unit"); in gst_msdkh264enc_add_cc()
224 GST_DEBUG_OBJECT (thiz, in gst_msdkh264enc_add_cc()
225 "Inserting %d closed caption SEI message(s)", thiz->cc_sei_array->len); in gst_msdkh264enc_add_cc()
227 gst_msdkh264enc_insert_sei (thiz, frame, mem); in gst_msdkh264enc_add_cc()
234 GstMsdkH264Enc *thiz = GST_MSDKH264ENC (encoder); in gst_msdkh264enc_pre_push() local
236 if (GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame) && thiz->frame_packing_sei) { in gst_msdkh264enc_pre_push()
242 GST_DEBUG_OBJECT (thiz, "Inserting SEI Frame Packing for multiview"); in gst_msdkh264enc_pre_push()
243 gst_msdkh264enc_insert_sei (thiz, frame, thiz->frame_packing_sei); in gst_msdkh264enc_pre_push()
246 gst_msdkh264enc_add_cc (thiz, frame); in gst_msdkh264enc_pre_push()
254 GstMsdkH264Enc *thiz = GST_MSDKH264ENC (encoder); in gst_msdkh264enc_set_format() local
258 thiz->profile = 0; in gst_msdkh264enc_set_format()
259 thiz->level = 0; in gst_msdkh264enc_set_format()
266 GST_INFO_OBJECT (thiz, in gst_msdkh264enc_set_format()
286 thiz->profile = MFX_PROFILE_AVC_HIGH; in gst_msdkh264enc_set_format()
288 thiz->profile = MFX_PROFILE_AVC_MAIN; in gst_msdkh264enc_set_format()
290 thiz->profile = MFX_PROFILE_AVC_BASELINE; in gst_msdkh264enc_set_format()
292 thiz->profile = MFX_PROFILE_AVC_CONSTRAINED_BASELINE; in gst_msdkh264enc_set_format()
300 thiz->level = gst_codec_utils_h264_get_level_idc (level); in gst_msdkh264enc_set_format()
308 if (thiz->frame_packing_sei) { in gst_msdkh264enc_set_format()
309 gst_memory_unref (thiz->frame_packing_sei); in gst_msdkh264enc_set_format()
310 thiz->frame_packing_sei = NULL; in gst_msdkh264enc_set_format()
318 if (thiz->frame_packing != GST_VIDEO_MULTIVIEW_MODE_NONE) { in gst_msdkh264enc_set_format()
319 mode = (GstVideoMultiviewMode) thiz->frame_packing; in gst_msdkh264enc_set_format()
330 g_array_set_clear_func (thiz->cc_sei_array, in gst_msdkh264enc_set_format()
333 GST_DEBUG_OBJECT (thiz, in gst_msdkh264enc_set_format()
372 thiz->frame_packing_sei = gst_h264_create_sei_memory (4, array); in gst_msdkh264enc_set_format()
383 GstMsdkH264Enc *thiz = GST_MSDKH264ENC (encoder); in gst_msdkh264enc_configure() local
385 encoder->param.mfx.LowPower = thiz->tune_mode; in gst_msdkh264enc_configure()
387 encoder->param.mfx.CodecProfile = thiz->profile; in gst_msdkh264enc_configure()
388 encoder->param.mfx.CodecLevel = thiz->level; in gst_msdkh264enc_configure()
390 thiz->option.Header.BufferId = MFX_EXTBUFF_CODING_OPTION; in gst_msdkh264enc_configure()
391 thiz->option.Header.BufferSz = sizeof (thiz->option); in gst_msdkh264enc_configure()
392 if (thiz->profile == MFX_PROFILE_AVC_CONSTRAINED_BASELINE || in gst_msdkh264enc_configure()
393 thiz->profile == MFX_PROFILE_AVC_BASELINE || in gst_msdkh264enc_configure()
394 thiz->profile == MFX_PROFILE_AVC_EXTENDED) { in gst_msdkh264enc_configure()
395 thiz->option.CAVLC = MFX_CODINGOPTION_ON; in gst_msdkh264enc_configure()
397 thiz->option.CAVLC = in gst_msdkh264enc_configure()
398 (thiz->cabac ? MFX_CODINGOPTION_OFF : MFX_CODINGOPTION_ON); in gst_msdkh264enc_configure()
401 gst_msdkenc_add_extra_param (encoder, (mfxExtBuffer *) & thiz->option); in gst_msdkh264enc_configure()
403 encoder->option2.Trellis = thiz->trellis ? thiz->trellis : MFX_TRELLIS_OFF; in gst_msdkh264enc_configure()
404 encoder->option2.MaxSliceSize = thiz->max_slice_size; in gst_msdkh264enc_configure()
406 thiz->min_qp; in gst_msdkh264enc_configure()
408 thiz->max_qp; in gst_msdkh264enc_configure()
409 encoder->option2.IntRefType = thiz->intra_refresh_type; in gst_msdkh264enc_configure()
410 encoder->option2.DisableDeblockingIdc = thiz->dblk_idc; in gst_msdkh264enc_configure()
415 encoder->option2.LookAheadDS = thiz->lookahead_ds; in gst_msdkh264enc_configure()
417 if (thiz->b_pyramid) { in gst_msdkh264enc_configure()
424 if (thiz->p_pyramid) { in gst_msdkh264enc_configure()
533 GstMsdkH264Enc *thiz = GST_MSDKH264ENC (object); in gst_msdkh264enc_dispose() local
535 if (thiz->frame_packing_sei) { in gst_msdkh264enc_dispose()
536 gst_memory_unref (thiz->frame_packing_sei); in gst_msdkh264enc_dispose()
537 thiz->frame_packing_sei = NULL; in gst_msdkh264enc_dispose()
546 GstMsdkH264Enc *thiz = GST_MSDKH264ENC (object); in gst_msdkh264enc_finalize() local
548 if (thiz->parser) in gst_msdkh264enc_finalize()
549 gst_h264_nal_parser_free (thiz->parser); in gst_msdkh264enc_finalize()
550 if (thiz->cc_sei_array) in gst_msdkh264enc_finalize()
551 g_array_unref (thiz->cc_sei_array); in gst_msdkh264enc_finalize()
560 GstMsdkH264Enc *thiz = GST_MSDKH264ENC (object); in gst_msdkh264enc_set_property() local
565 GST_OBJECT_LOCK (thiz); in gst_msdkh264enc_set_property()
569 thiz->cabac = g_value_get_boolean (value); in gst_msdkh264enc_set_property()
573 thiz->lowpower = g_value_get_boolean (value); in gst_msdkh264enc_set_property()
574 thiz->prop_flag |= GST_MSDK_FLAG_LOW_POWER; in gst_msdkh264enc_set_property()
577 if (!(thiz->prop_flag & GST_MSDK_FLAG_TUNE_MODE)) in gst_msdkh264enc_set_property()
578 thiz->tune_mode = in gst_msdkh264enc_set_property()
579 thiz->lowpower ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF; in gst_msdkh264enc_set_property()
584 thiz->frame_packing = g_value_get_enum (value); in gst_msdkh264enc_set_property()
587 thiz->lookahead_ds = g_value_get_enum (value); in gst_msdkh264enc_set_property()
590 thiz->trellis = g_value_get_flags (value); in gst_msdkh264enc_set_property()
593 thiz->max_slice_size = g_value_get_uint (value); in gst_msdkh264enc_set_property()
596 thiz->b_pyramid = g_value_get_boolean (value); in gst_msdkh264enc_set_property()
599 thiz->tune_mode = g_value_get_enum (value); in gst_msdkh264enc_set_property()
600 thiz->prop_flag |= GST_MSDK_FLAG_TUNE_MODE; in gst_msdkh264enc_set_property()
603 thiz->p_pyramid = g_value_get_boolean (value); in gst_msdkh264enc_set_property()
606 thiz->min_qp = g_value_get_uint (value); in gst_msdkh264enc_set_property()
609 thiz->max_qp = g_value_get_uint (value); in gst_msdkh264enc_set_property()
612 thiz->intra_refresh_type = g_value_get_enum (value); in gst_msdkh264enc_set_property()
615 thiz->dblk_idc = g_value_get_uint (value); in gst_msdkh264enc_set_property()
621 GST_OBJECT_UNLOCK (thiz); in gst_msdkh264enc_set_property()
629 GstMsdkH264Enc *thiz = GST_MSDKH264ENC (object); in gst_msdkh264enc_get_property() local
634 GST_OBJECT_LOCK (thiz); in gst_msdkh264enc_get_property()
637 g_value_set_boolean (value, thiz->cabac); in gst_msdkh264enc_get_property()
641 g_value_set_boolean (value, thiz->lowpower); in gst_msdkh264enc_get_property()
645 g_value_set_enum (value, thiz->frame_packing); in gst_msdkh264enc_get_property()
648 g_value_set_enum (value, thiz->lookahead_ds); in gst_msdkh264enc_get_property()
651 g_value_set_flags (value, thiz->trellis); in gst_msdkh264enc_get_property()
654 g_value_set_uint (value, thiz->max_slice_size); in gst_msdkh264enc_get_property()
657 g_value_set_boolean (value, thiz->b_pyramid); in gst_msdkh264enc_get_property()
660 g_value_set_enum (value, thiz->tune_mode); in gst_msdkh264enc_get_property()
663 g_value_set_boolean (value, thiz->p_pyramid); in gst_msdkh264enc_get_property()
666 g_value_set_uint (value, thiz->min_qp); in gst_msdkh264enc_get_property()
669 g_value_set_uint (value, thiz->max_qp); in gst_msdkh264enc_get_property()
672 g_value_set_enum (value, thiz->intra_refresh_type); in gst_msdkh264enc_get_property()
675 g_value_set_uint (value, thiz->dblk_idc); in gst_msdkh264enc_get_property()
681 GST_OBJECT_UNLOCK (thiz); in gst_msdkh264enc_get_property()
816 gst_msdkh264enc_init (GstMsdkH264Enc * thiz) in gst_msdkh264enc_init() argument
818 thiz->cabac = PROP_CABAC_DEFAULT; in gst_msdkh264enc_init()
819 thiz->lowpower = PROP_LOWPOWER_DEFAULT; in gst_msdkh264enc_init()
820 thiz->frame_packing = PROP_FRAME_PACKING_DEFAULT; in gst_msdkh264enc_init()
821 thiz->lookahead_ds = PROP_RC_LA_DOWNSAMPLING_DEFAULT; in gst_msdkh264enc_init()
822 thiz->trellis = PROP_TRELLIS_DEFAULT; in gst_msdkh264enc_init()
823 thiz->max_slice_size = PROP_MAX_SLICE_SIZE_DEFAULT; in gst_msdkh264enc_init()
824 thiz->b_pyramid = PROP_B_PYRAMID_DEFAULT; in gst_msdkh264enc_init()
825 thiz->tune_mode = PROP_TUNE_MODE_DEFAULT; in gst_msdkh264enc_init()
826 thiz->p_pyramid = PROP_P_PYRAMID_DEFAULT; in gst_msdkh264enc_init()
827 thiz->min_qp = PROP_MIN_QP_DEFAULT; in gst_msdkh264enc_init()
828 thiz->max_qp = PROP_MAX_QP_DEFAULT; in gst_msdkh264enc_init()
829 thiz->intra_refresh_type = PROP_INTRA_REFRESH_TYPE_DEFAULT; in gst_msdkh264enc_init()
830 thiz->dblk_idc = PROP_DBLK_IDC_DEFAULT; in gst_msdkh264enc_init()