当前位置: 首页>>代码示例>>C++>>正文


C++ DDL_MSG_HIGH函数代码示例

本文整理汇总了C++中DDL_MSG_HIGH函数的典型用法代码示例。如果您正苦于以下问题:C++ DDL_MSG_HIGH函数的具体用法?C++ DDL_MSG_HIGH怎么用?C++ DDL_MSG_HIGH使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了DDL_MSG_HIGH函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ddl_get_decoded_frame

static u32 ddl_get_decoded_frame(struct vcd_frame_data  *frame,
	enum vidc_1080p_decode_frame frame_type)
{
	u32 status = true;

	switch (frame_type) {
	case VIDC_1080P_DECODE_FRAMETYPE_I:
		frame->flags |= VCD_FRAME_FLAG_SYNCFRAME;
		frame->frame = VCD_FRAME_I;
	break;
	case VIDC_1080P_DECODE_FRAMETYPE_P:
		frame->frame = VCD_FRAME_P;
	break;
	case VIDC_1080P_DECODE_FRAMETYPE_B:
		frame->frame = VCD_FRAME_B;
	break;
	case VIDC_1080P_DECODE_FRAMETYPE_NOT_CODED:
		frame->frame = VCD_FRAME_NOTCODED;
		frame->data_len = 0;
		DDL_MSG_HIGH("DDL_INFO:Decoder:NotCodedFrame>");
	break;
	case VIDC_1080P_DECODE_FRAMETYPE_OTHERS:
		frame->frame = VCD_FRAME_YUV;
	break;
	case VIDC_1080P_DECODE_FRAMETYPE_32BIT:
	default:
		DDL_MSG_ERROR("UNKNOWN-FRAMETYPE");
		status = false;
	break;
	}
	return status;
}
开发者ID:nickcttm,项目名称:HTC-JetStream-HC-Kernel,代码行数:32,代码来源:vcd_ddl_interrupt_handler.c

示例2: ddl_set_property

u32 ddl_set_property(u32 *ddl_handle,
	struct vcd_property_hdr *property_hdr, void *property_value)
{
	struct ddl_context *ddl_context;
	struct ddl_client_context *ddl =
		(struct ddl_client_context *) ddl_handle;
	u32 vcd_status;

	DDL_MSG_HIGH("ddl_set_property");
	if (!property_hdr || !property_value) {
		DDL_MSG_ERROR("ddl_set_prop:Bad_argument");
		return VCD_ERR_ILLEGAL_PARM;
	}
	ddl_context = ddl_get_context();
	if (!DDL_IS_INITIALIZED(ddl_context)) {
		DDL_MSG_ERROR("ddl_set_prop:Not_inited");
		return VCD_ERR_ILLEGAL_OP;
	}
	if (!ddl) {
		DDL_MSG_ERROR("ddl_set_prop:Bad_handle");
		return VCD_ERR_BAD_HANDLE;
	}
	if (ddl->decoding)
		vcd_status = ddl_set_dec_property(ddl, property_hdr,
				property_value);
	else
		vcd_status = ddl_set_enc_property(ddl, property_hdr,
				property_value);
	if (vcd_status)
		DDL_MSG_ERROR("ddl_set_prop:FAILED");
	return vcd_status;
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:32,代码来源:vcd_ddl_properties.c

示例3: ddl_encode_start

u32 ddl_encode_start(u32 *ddl_handle, void *client_data)
{
	struct ddl_client_context *ddl =
		(struct ddl_client_context *) ddl_handle;
	struct ddl_context *ddl_context;
	struct ddl_encoder_data *encoder;
	void *ptr;
	u32 status = VCD_S_SUCCESS;

	DDL_MSG_HIGH("ddl_encode_start");
#ifdef DDL_PROFILE
	if (first_time < 2) {
		ddl_reset_time_variables(1);
		first_time++;
	 }
	ddl_get_core_start_time(1);
#endif
	ddl_context = ddl_get_context();
	if (!DDL_IS_INITIALIZED(ddl_context)) {
		DDL_MSG_ERROR("ddl_enc_start:Not_inited");
		return VCD_ERR_ILLEGAL_OP;
	}
	if (DDL_IS_BUSY(ddl_context)) {
		DDL_MSG_ERROR("ddl_enc_start:Ddl_busy");
		return VCD_ERR_BUSY;
	}
	if (!ddl || ddl->decoding) {
		DDL_MSG_ERROR("ddl_enc_start:Bad_handle");
		return VCD_ERR_BAD_HANDLE;
	}
	if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_OPEN)) {
		DDL_MSG_ERROR("ddl_enc_start:Not_opened");
		return VCD_ERR_ILLEGAL_OP;
	}
	if (!ddl_encoder_ready_to_start(ddl)) {
		DDL_MSG_ERROR("ddl_enc_start:Err_param_settings");
		return VCD_ERR_ILLEGAL_OP;
	}
	encoder = &ddl->codec_data.encoder;
	status = ddl_allocate_enc_hw_buffers(ddl);
	if (status)
		return status;
#ifdef DDL_BUF_LOG
	ddl_list_buffers(ddl);
#endif

	ptr = ddl_pmem_alloc(&encoder->seq_header,
		DDL_ENC_SEQHEADER_SIZE, DDL_LINEAR_BUFFER_ALIGN_BYTES);
	if (!ptr) {
		ddl_free_enc_hw_buffers(ddl);
		DDL_MSG_ERROR("ddl_enc_start:Seq_hdr_alloc_failed");
		return VCD_ERR_ALLOC_FAIL;
	}
	if (!ddl_take_command_channel(ddl_context, ddl, client_data))
		return VCD_ERR_BUSY;
	ddl_vidc_channel_set(ddl);
	return status;
}
开发者ID:LeeDroid-,项目名称:Shooter-2.6.35-MR,代码行数:58,代码来源:vcd_ddl.c

示例4: ddl_frame_run_callback

static u32 ddl_frame_run_callback(struct ddl_context *ddl_context)
{
	struct ddl_client_context *ddl;
	u32 channel_inst_id;
	u32 return_status = true;

	vidc_1080p_get_returned_channel_inst_id(&channel_inst_id);
	vidc_1080p_clear_returned_channel_inst_id();
	ddl = ddl_get_current_ddl_client_for_channel_id(ddl_context,
			ddl_context->response_cmd_ch_id);
	if (ddl) {
		if (ddl_context->pix_cache_enable) {
			struct vidc_1080P_pix_cache_statistics
			pixel_cache_stats;
			vidc_pix_cache_get_statistics(&pixel_cache_stats);

			DDL_MSG_HIGH(" pixel cache hits = %d,"
				"miss = %d", pixel_cache_stats.access_hit,
				pixel_cache_stats.access_miss);
			DDL_MSG_HIGH(" pixel cache core reqs = %d,"
				"axi reqs = %d", pixel_cache_stats.core_req,
				pixel_cache_stats.axi_req);
			DDL_MSG_HIGH(" pixel cache core bus stats = %d,"
			"axi bus stats = %d", pixel_cache_stats.core_bus,
				pixel_cache_stats.axi_bus);
		}

		if (ddl->cmd_state == DDL_CMD_DECODE_FRAME)
			return_status = ddl_decoder_frame_run_callback(ddl);
		else if (ddl->cmd_state == DDL_CMD_ENCODE_FRAME)
			ddl_encoder_frame_run_callback(ddl);
		else if (ddl->cmd_state == DDL_CMD_EOS)
			return_status = ddl_eos_frame_done_callback(ddl);
		else {
			DDL_MSG_ERROR("UNKWN_FRAME_DONE");
			return_status = false;
		}
	} else
		return_status = false;

	return return_status;
}
开发者ID:nickcttm,项目名称:HTC-JetStream-HC-Kernel,代码行数:42,代码来源:vcd_ddl_interrupt_handler.c

示例5: ddl_get_property

u32 ddl_get_property(u32 *ddl_handle,
	struct vcd_property_hdr *property_hdr, void *property_value)
{
	struct ddl_context *ddl_context;
	struct ddl_client_context *ddl =
		(struct ddl_client_context *) ddl_handle;
	u32 vcd_status = VCD_ERR_ILLEGAL_PARM;

	DDL_MSG_HIGH("ddl_get_property");
	if (!property_hdr || !property_value)
		return VCD_ERR_ILLEGAL_PARM;
	if (property_hdr->prop_id == DDL_I_CAPABILITY) {
		if (sizeof(struct ddl_property_capability) ==
			property_hdr->sz) {
			struct ddl_property_capability *ddl_capability =
				(struct ddl_property_capability *)
				property_value;

			ddl_capability->max_num_client = VCD_MAX_NO_CLIENT;
			ddl_capability->exclusive = VCD_COMMAND_EXCLUSIVE;
			ddl_capability->frame_command_depth =
				VCD_FRAME_COMMAND_DEPTH;
			ddl_capability->general_command_depth =
				VCD_GENEVIDC_COMMAND_DEPTH;
			ddl_capability->ddl_time_out_in_ms =
				DDL_HW_TIMEOUT_IN_MS;
			vcd_status = VCD_S_SUCCESS;
		}
		return vcd_status;
	}
	ddl_context = ddl_get_context();
	if (!DDL_IS_INITIALIZED(ddl_context))
		return VCD_ERR_ILLEGAL_OP;
	if (!ddl)
		return VCD_ERR_BAD_HANDLE;
	if (ddl->decoding)
		vcd_status = ddl_get_dec_property(ddl, property_hdr,
				property_value);
	else
		vcd_status = ddl_get_enc_property(ddl, property_hdr,
				property_value);
	if (vcd_status)
		DDL_MSG_ERROR("ddl_get_prop:FAILED");
	else
		DDL_MSG_ERROR("ddl_get_prop:SUCCESS");
	return vcd_status;
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:47,代码来源:vcd_ddl_properties.c

示例6: ddl_decoder_seq_done_callback


//.........这里部分代码省略.........
		decoder->frame_size.stride =
		DDL_ALIGN(decoder->frame_size.width, DDL_TILE_ALIGN_WIDTH);
		parse_hdr_crop_data(ddl, &seq_hdr_info);
		if (decoder->codec.codec == VCD_CODEC_H264 &&
			seq_hdr_info.level > VIDC_1080P_H264_LEVEL4) {
			DDL_MSG_ERROR("WARNING: H264MaxLevelExceeded : %d",
				seq_hdr_info.level);
		}
		ddl_set_default_decoder_buffer_req(decoder, false);
		if (decoder->header_in_start) {
			if (!(decoder->cont_mode) ||
				(decoder->min_dpb_num >
				 decoder->client_output_buf_req.min_count) ||
				(decoder->actual_output_buf_req.sz >
				 decoder->client_output_buf_req.sz)) {
				decoder->client_frame_size =
					 decoder->frame_size;
			decoder->client_output_buf_req =
				decoder->actual_output_buf_req;
			decoder->client_input_buf_req =
				decoder->actual_input_buf_req;
			}
			ddl_context->ddl_callback(VCD_EVT_RESP_START,
				VCD_S_SUCCESS, NULL, 0, (u32 *) ddl,
				ddl->client_data);
			ddl_release_command_channel(ddl_context,
				ddl->command_channel);
		} else {
			u32 seq_hdr_only_frame = false;
			u32 need_reconfig = false;
			struct vcd_frame_data *input_vcd_frm =
				&ddl->input_frame.vcd_frm;
			need_reconfig = ddl_check_reconfig(ddl);
			DDL_MSG_HIGH("%s : need_reconfig = %u\n", __func__,
				 need_reconfig);
			if (input_vcd_frm->flags &
				  VCD_FRAME_FLAG_EOS) {
					need_reconfig = false;
			}
			if (((input_vcd_frm->flags &
				VCD_FRAME_FLAG_CODECCONFIG) &&
				(!(input_vcd_frm->flags &
				VCD_FRAME_FLAG_SYNCFRAME))) ||
				input_vcd_frm->data_len <=
				seq_hdr_info.dec_frm_size) {
				seq_hdr_only_frame = true;
				input_vcd_frm->offset +=
					seq_hdr_info.dec_frm_size;
				input_vcd_frm->data_len = 0;
				input_vcd_frm->flags |=
					VCD_FRAME_FLAG_CODECCONFIG;
				ddl->input_frame.frm_trans_end =
					!need_reconfig;
				ddl_context->ddl_callback(
					VCD_EVT_RESP_INPUT_DONE,
					VCD_S_SUCCESS, &ddl->input_frame,
					sizeof(struct ddl_frame_data_tag),
					(u32 *) ddl, ddl->client_data);
			} else {
				if (decoder->codec.codec ==
					VCD_CODEC_VC1_RCV) {
					vidc_sm_set_start_byte_number(
						&ddl->shared_mem
						[ddl->command_channel],
						seq_hdr_info.dec_frm_size);
				}
开发者ID:nickcttm,项目名称:HTC-JetStream-HC-Kernel,代码行数:67,代码来源:vcd_ddl_interrupt_handler.c

示例7: ddl_get_encoded_frame

static u32 ddl_get_encoded_frame(struct vcd_frame_data *frame,
	enum vcd_codec codec,
	enum vidc_1080p_encode_frame frame_type)
{
	u32 status = true;

	if (codec == VCD_CODEC_H264) {
		switch (frame_type) {
		case VIDC_1080P_ENCODE_FRAMETYPE_NOT_CODED:
			frame->frame = VCD_FRAME_P;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_I:
			frame->flags |= VCD_FRAME_FLAG_SYNCFRAME;
			frame->frame = VCD_FRAME_I;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_P:
			frame->frame = VCD_FRAME_P;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_B:
			frame->frame = VCD_FRAME_B;
			frame->flags |= VCD_FRAME_FLAG_BFRAME;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_SKIPPED:
			frame->frame = VCD_FRAME_NOTCODED;
			frame->data_len = 0;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_OTHERS:
			DDL_MSG_LOW("FRAMETYPE-OTHERS");
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_32BIT:
		default:
			DDL_MSG_LOW("UNKNOWN-FRAMETYPE");
			status = false;
		break;
		}
	} else if (codec == VCD_CODEC_MPEG4) {
		switch (frame_type) {
		case VIDC_1080P_ENCODE_FRAMETYPE_NOT_CODED:
			frame->frame = VCD_FRAME_P;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_I:
			frame->flags |= VCD_FRAME_FLAG_SYNCFRAME;
			frame->frame = VCD_FRAME_I;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_P:
			frame->frame = VCD_FRAME_P;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_B:
			frame->frame = VCD_FRAME_B;
			frame->flags |= VCD_FRAME_FLAG_BFRAME;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_SKIPPED:
			frame->frame = VCD_FRAME_NOTCODED;
			frame->data_len = 0;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_OTHERS:
			DDL_MSG_LOW("FRAMETYPE-OTHERS");
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_32BIT:
		default:
			DDL_MSG_LOW("UNKNOWN-FRAMETYPE");
			status = false;
		break;
		}
	} else if (codec == VCD_CODEC_H263) {
		switch (frame_type) {
		case VIDC_1080P_ENCODE_FRAMETYPE_NOT_CODED:
			frame->frame = VCD_FRAME_P;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_I:
			frame->flags |= VCD_FRAME_FLAG_SYNCFRAME;
			frame->frame = VCD_FRAME_I;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_P:
			frame->frame = VCD_FRAME_P;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_SKIPPED:
			frame->frame = VCD_FRAME_NOTCODED;
			frame->data_len = 0;
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_OTHERS:
			DDL_MSG_LOW("FRAMETYPE-OTHERS");
		break;
		case VIDC_1080P_ENCODE_FRAMETYPE_32BIT:
		default:
			DDL_MSG_LOW("UNKNOWN-FRAMETYPE");
			status = false;
		break;
		}
	} else
		status = false;
	DDL_MSG_HIGH("Enc Frame Type %u", (u32)frame->frame);
	return status;
}
开发者ID:nickcttm,项目名称:HTC-JetStream-HC-Kernel,代码行数:94,代码来源:vcd_ddl_interrupt_handler.c

示例8: ddl_device_init

u32 ddl_device_init(struct ddl_init_config *ddl_init_config,
	void *client_data)
{
	struct ddl_context *ddl_context;
	struct res_trk_firmware_addr firmware_addr;
	u32 status = VCD_S_SUCCESS, memorytype = PMEM_MEMTYPE;
	void *ptr = NULL;
	DDL_MSG_HIGH("ddl_device_init");

	if ((!ddl_init_config) || (!ddl_init_config->ddl_callback) ||
		(!ddl_init_config->core_virtual_base_addr)) {
		DDL_MSG_ERROR("ddl_dev_init:Bad_argument");
		return VCD_ERR_ILLEGAL_PARM;
	}
	ddl_context = ddl_get_context();
	if (DDL_IS_INITIALIZED(ddl_context)) {
		DDL_MSG_ERROR("ddl_dev_init:Multiple_init");
		return VCD_ERR_ILLEGAL_OP;
	}
	if (!DDL_IS_IDLE(ddl_context)) {
		DDL_MSG_ERROR("ddl_dev_init:Ddl_busy");
		return VCD_ERR_BUSY;
	}
	memset(ddl_context, 0, sizeof(struct ddl_context));
	DDL_BUSY(ddl_context);
	ddl_context->ddl_callback = ddl_init_config->ddl_callback;
	if (ddl_init_config->interrupt_clr)
		ddl_context->interrupt_clr =
			ddl_init_config->interrupt_clr;
	ddl_context->core_virtual_base_addr =
		ddl_init_config->core_virtual_base_addr;
	ddl_context->client_data = client_data;
	ddl_context->ddl_hw_response.arg1 = DDL_INVALID_INTR_STATUS;

	ddl_context->frame_channel_depth = VCD_FRAME_COMMAND_DEPTH;

	DDL_MSG_LOW("%s() : virtual address of core(%x)\n", __func__,
		(u32) ddl_init_config->core_virtual_base_addr);
	vidc_1080p_set_device_base_addr(
		ddl_context->core_virtual_base_addr);
	ddl_context->cmd_state =	DDL_CMD_INVALID;
	ddl_client_transact(DDL_INIT_CLIENTS, NULL);
	ddl_context->fw_memory_size =
		DDL_FW_INST_GLOBAL_CONTEXT_SPACE_SIZE;
	if (memorytype == PMEM_MEMTYPE_SMI) {
		ptr = ddl_pmem_alloc(&ddl_context->dram_base_a,
			ddl_context->fw_memory_size, DDL_KILO_BYTE(128));
	} else {
		if (!res_trk_get_firmware_addr(&firmware_addr) &&
		   firmware_addr.buf_size >= ddl_context->fw_memory_size) {
			if (DDL_ADDR_IS_ALIGNED(firmware_addr.device_addr,
				DDL_KILO_BYTE(128))) {
				ptr = (void *) firmware_addr.base_addr;
				ddl_context->dram_base_a.physical_base_addr =
				ddl_context->dram_base_a.align_physical_addr =
					(u8 *)firmware_addr.device_addr;
				ddl_context->dram_base_a.align_virtual_addr  =
				ddl_context->dram_base_a.virtual_base_addr =
					firmware_addr.base_addr;
				ddl_context->dram_base_a.buffer_size =
					ddl_context->fw_memory_size;
			} else {
				DDL_MSG_ERROR("firmware base not aligned %p",
					(void *)firmware_addr.device_addr);
			}
		}
	}
	if (!ptr) {
		DDL_MSG_ERROR("Memory Aocation Failed for FW Base");
		status = VCD_ERR_ALLOC_FAIL;
	} else {
		DDL_MSG_LOW("%s() : physical address of base(%x)\n",
			 __func__, (u32) ddl_context->dram_base_a.\
			align_physical_addr);
		ddl_context->dram_base_b.align_physical_addr =
			ddl_context->dram_base_a.align_physical_addr;
		ddl_context->dram_base_b.align_virtual_addr  =
			ddl_context->dram_base_a.align_virtual_addr;
	}
	if (!status) {
		ptr = ddl_pmem_alloc(&ddl_context->metadata_shared_input,
			DDL_METADATA_TOTAL_INPUTBUFSIZE,
			DDL_LINEAR_BUFFER_ALIGN_BYTES);
		if (!ptr) {
			DDL_MSG_ERROR("ddl_device_init: metadata alloc fail");
			status = VCD_ERR_ALLOC_FAIL;
		}
	}
	if (!status && !ddl_fw_init(&ddl_context->dram_base_a)) {
		DDL_MSG_ERROR("ddl_dev_init:fw_init_failed");
		status = VCD_ERR_ALLOC_FAIL;
	}
	if (!status && memorytype == PMEM_MEMTYPE_EBI1)
		clean_caches((unsigned long)firmware_addr.base_addr,
		firmware_addr.buf_size,	firmware_addr.device_addr);

	if (!status) {
		ddl_context->cmd_state = DDL_CMD_DMA_INIT;
		ddl_vidc_core_init(ddl_context);
	} else {
//.........这里部分代码省略.........
开发者ID:vitaliyy,项目名称:msm7x30,代码行数:101,代码来源:vcd_ddl.c

示例9: ddl_encode_start

u32 ddl_encode_start(u32 *ddl_handle, void *client_data)
{
	struct ddl_client_context *ddl =
		(struct ddl_client_context *) ddl_handle;
	struct ddl_context *ddl_context;
	struct ddl_encoder_data *encoder;
	void *ptr;
	u32 status = VCD_S_SUCCESS;
	DDL_MSG_HIGH("ddl_encode_start");
	if (vidc_msg_timing) {
		if (first_time < 2) {
			ddl_reset_core_time_variables(ENC_OP_TIME);
			first_time++;
		 }
		ddl_set_core_start_time(__func__, ENC_OP_TIME);
	}
	ddl_context = ddl_get_context();
	if (!DDL_IS_INITIALIZED(ddl_context)) {
		DDL_MSG_ERROR("ddl_enc_start:Not_inited");
		return VCD_ERR_ILLEGAL_OP;
	}
	if (DDL_IS_BUSY(ddl_context)) {
		DDL_MSG_ERROR("ddl_enc_start:Ddl_busy");
		return VCD_ERR_BUSY;
	}
	if (!ddl || ddl->decoding) {
		DDL_MSG_ERROR("ddl_enc_start:Bad_handle");
		return VCD_ERR_BAD_HANDLE;
	}
	if (!DDLCLIENT_STATE_IS(ddl, DDL_CLIENT_OPEN)) {
		DDL_MSG_ERROR("ddl_enc_start:Not_opened");
		return VCD_ERR_ILLEGAL_OP;
	}
	if (!ddl_encoder_ready_to_start(ddl)) {
		DDL_MSG_ERROR("ddl_enc_start:Err_param_settings");
		return VCD_ERR_ILLEGAL_OP;
	}
	encoder = &ddl->codec_data.encoder;
	status = ddl_allocate_enc_hw_buffers(ddl);
	if (status)
		return status;
#ifdef DDL_BUF_LOG
	ddl_list_buffers(ddl);
#endif
	if ((encoder->codec.codec == VCD_CODEC_MPEG4 &&
		!encoder->short_header.short_header) ||
		encoder->codec.codec == VCD_CODEC_H264) {
		ptr = ddl_pmem_alloc(&encoder->seq_header,
			DDL_ENC_SEQHEADER_SIZE, DDL_LINEAR_BUFFER_ALIGN_BYTES);
		if (!ptr) {
			ddl_free_enc_hw_buffers(ddl);
			DDL_MSG_ERROR("ddl_enc_start:Seq_hdr_alloc_failed");
			return VCD_ERR_ALLOC_FAIL;
		}
	} else {
		encoder->seq_header.buffer_size = 0;
		encoder->seq_header.virtual_base_addr = 0;
		encoder->seq_header.align_physical_addr = 0;
		encoder->seq_header.align_virtual_addr = 0;
	}
	if (!ddl_take_command_channel(ddl_context, ddl, client_data))
		return VCD_ERR_BUSY;
	ddl_vidc_channel_set(ddl);
	return status;
}
开发者ID:Kra1o5,项目名称:android_kernel_huawei_u8815-gb,代码行数:65,代码来源:vcd_ddl.c

示例10: ddl_decoder_output_done_callback

static u32 ddl_decoder_output_done_callback(
	struct ddl_client_context *ddl, u32 frame_transact_end)
{
	struct ddl_context *ddl_context = ddl->ddl_context;
	struct ddl_decoder_data *decoder = &(ddl->codec_data.decoder);
	struct vidc_1080p_dec_disp_info *dec_disp_info =
		&(decoder->dec_disp_info);
	struct ddl_frame_data_tag *output_frame = &(ddl->output_frame);
	struct vcd_frame_data *output_vcd_frm = &(output_frame->vcd_frm);
	u32 vcd_status, free_luma_dpb = 0, disp_pict = 0, is_interlaced;
	get_dec_op_done_data(dec_disp_info, decoder->output_order,
		&output_vcd_frm->physical, &is_interlaced);
	decoder->progressive_only = !(is_interlaced);
	output_vcd_frm->frame = VCD_FRAME_YUV;
	if (decoder->codec.codec == VCD_CODEC_MPEG4 ||
		decoder->codec.codec == VCD_CODEC_VC1 ||
		decoder->codec.codec == VCD_CODEC_VC1_RCV ||
		(decoder->codec.codec >= VCD_CODEC_DIVX_3 &&
		decoder->codec.codec <= VCD_CODEC_XVID)) {
		vidc_sm_get_displayed_picture_frame(&ddl->shared_mem
		[ddl->command_channel], &disp_pict);
		if (decoder->output_order == VCD_DEC_ORDER_DISPLAY) {
			if (!disp_pict) {
			output_vcd_frm->frame = VCD_FRAME_NOTCODED;
			vidc_sm_get_available_luma_dpb_address(
				&ddl->shared_mem[ddl->command_channel],
				&free_luma_dpb);
			}
		} else {
			if (dec_disp_info->input_frame ==
				VIDC_1080P_DECODE_FRAMETYPE_NOT_CODED) {
				output_vcd_frm->frame = VCD_FRAME_NOTCODED;
			vidc_sm_get_available_luma_dpb_dec_order_address(
					&ddl->shared_mem[ddl->command_channel],
					&free_luma_dpb);
			}
		}
			if (free_luma_dpb)
				output_vcd_frm->physical =
					(u8 *)(free_luma_dpb << 11);
		}
	vcd_status = ddl_decoder_dpb_transact(decoder, output_frame,
			DDL_DPB_OP_MARK_BUSY);
	if (vcd_status) {
		DDL_MSG_ERROR("CORRUPTED_OUTPUT_BUFFER_ADDRESS");
		ddl_hw_fatal_cb(ddl);
	} else {
		vidc_sm_get_metadata_status(&ddl->shared_mem
			[ddl->command_channel],
			&decoder->meta_data_exists);
		if (decoder->output_order == VCD_DEC_ORDER_DISPLAY)
			vidc_sm_get_frame_tags(&ddl->shared_mem
				[ddl->command_channel],
				&dec_disp_info->tag_top,
				&dec_disp_info->tag_bottom);
		output_vcd_frm->ip_frm_tag = dec_disp_info->tag_top;
		vidc_sm_get_picture_times(&ddl->shared_mem
			[ddl->command_channel],
			&dec_disp_info->pic_time_top,
			&dec_disp_info->pic_time_bottom);
		get_dec_op_done_crop(decoder->output_order, dec_disp_info,
			&output_vcd_frm->dec_op_prop.disp_frm,
			&output_vcd_frm->dec_op_prop.frm_size,
			&decoder->frame_size,
			&ddl->shared_mem[ddl_context->response_cmd_ch_id]);
		if ((decoder->cont_mode) &&
			((output_vcd_frm->dec_op_prop.frm_size.width !=
			decoder->frame_size.width) ||
			(output_vcd_frm->dec_op_prop.frm_size.height !=
			decoder->frame_size.height) ||
			(decoder->frame_size.width !=
			decoder->client_frame_size.width) ||
			(decoder->frame_size.height !=
			decoder->client_frame_size.height))) {
			DDL_MSG_LOW("%s o/p width = %u o/p height = %u"
				"decoder width = %u decoder height = %u ",
				__func__,
				output_vcd_frm->dec_op_prop.frm_size.width,
				output_vcd_frm->dec_op_prop.frm_size.height,
				decoder->frame_size.width,
				decoder->frame_size.height);
			DDL_MSG_HIGH("%s Sending INFO_OP_RECONFIG event\n",
				 __func__);
			ddl_context->ddl_callback(
				VCD_EVT_IND_INFO_OUTPUT_RECONFIG,
				VCD_S_SUCCESS, NULL, 0,
				(u32 *)ddl,
				ddl->client_data);
			decoder->frame_size =
				 output_vcd_frm->dec_op_prop.frm_size;
			decoder->client_frame_size = decoder->frame_size;
			decoder->y_cb_cr_size =
				ddl_get_yuv_buffer_size(&decoder->frame_size,
					&decoder->buf_format,
					(!decoder->progressive_only),
					decoder->codec.codec, NULL);
			decoder->actual_output_buf_req.sz =
				decoder->y_cb_cr_size + decoder->suffix;
			decoder->min_output_buf_req =
				decoder->actual_output_buf_req;
//.........这里部分代码省略.........
开发者ID:nickcttm,项目名称:HTC-JetStream-HC-Kernel,代码行数:101,代码来源:vcd_ddl_interrupt_handler.c

示例11: vidc_sm_get_aspect_ratio_info

void vidc_sm_get_aspect_ratio_info(struct ddl_buf_addr *shared_mem,
	enum vcd_codec codec, struct vcd_aspect_ratio *aspect_ratio_info)
{
	u32 extended_par_info = 0, aspect_ratio = 0;

	aspect_ratio = DDL_MEM_READ_32(shared_mem,
				VIDC_SM_ASPECT_RATIO_INFO_ADDR);

	if (codec == VCD_CODEC_H264) {
		aspect_ratio_info->aspect_ratio =
			VIDC_GETFIELD(aspect_ratio,
			VIDC_SM_H264_ASPECT_RATIO_INFO_BMSK,
			VIDC_SM_H264_ASPECT_RATIO_INFO_SHFT);

		switch (aspect_ratio_info->aspect_ratio) {
		case 1:
			aspect_ratio_info->par_width    = 1;
			aspect_ratio_info->par_height   = 1;
			break;
		case 2:
			aspect_ratio_info->par_width    = 12;
			aspect_ratio_info->par_height   = 11;
			break;
		case 3:
			aspect_ratio_info->par_width    = 10;
			aspect_ratio_info->par_height   = 11;
			break;
		case 4:
			aspect_ratio_info->par_width    = 16;
			aspect_ratio_info->par_height   = 11;
			break;
		case 5:
			aspect_ratio_info->par_width    = 40;
			aspect_ratio_info->par_height   = 33;
			break;
		case 6:
			aspect_ratio_info->par_width    = 24;
			aspect_ratio_info->par_height   = 11;
			break;
		case 7:
			aspect_ratio_info->par_width    = 20;
			aspect_ratio_info->par_height   = 11;
			break;
		case 8:
			aspect_ratio_info->par_width    = 32;
			aspect_ratio_info->par_height   = 11;
			break;
		case 9:
			aspect_ratio_info->par_width    = 80;
			aspect_ratio_info->par_height   = 33;
			break;
		case 10:
			aspect_ratio_info->par_width    = 18;
			aspect_ratio_info->par_height   = 11;
			break;
		case 11:
			aspect_ratio_info->par_width    = 15;
			aspect_ratio_info->par_height   = 11;
			break;
		case 12:
			aspect_ratio_info->par_width    = 64;
			aspect_ratio_info->par_height   = 33;
			break;
		case 13:
			aspect_ratio_info->par_width    = 160;
			aspect_ratio_info->par_height   = 99;
			break;
		case 14:
			aspect_ratio_info->par_width    = 4;
			aspect_ratio_info->par_height   = 3;
			break;
		case 15:
			aspect_ratio_info->par_width    = 3;
			aspect_ratio_info->par_height   = 2;
			break;
		case 16:
			aspect_ratio_info->par_width    = 2;
			aspect_ratio_info->par_height   = 1;
			break;
		case 255:
			extended_par_info = DDL_MEM_READ_32(shared_mem,
				VIDC_SM_EXTENDED_PAR_ADDR);
			aspect_ratio_info->par_width =
				VIDC_GETFIELD(extended_par_info,
				VIDC_SM_EXTENDED_PAR_WIDTH_BMSK,
				VIDC_SM_EXTENDED_PAR_WIDTH_SHFT);
			aspect_ratio_info->par_height =
				VIDC_GETFIELD(extended_par_info,
				VIDC_SM_EXTENDED_PAR_HEIGHT_BMSK,
				VIDC_SM_EXTENDED_PAR_HEIGHT_SHFT);
			break;
		default:
			DDL_MSG_HIGH("Incorrect Aspect Ratio.");
			aspect_ratio_info->par_width    = 1;
			aspect_ratio_info->par_height   = 1;
			break;
		}
	} else if ((codec == VCD_CODEC_MPEG4) ||
		(codec == VCD_CODEC_DIVX_4) ||
		(codec == VCD_CODEC_DIVX_5) ||
//.........这里部分代码省略.........
开发者ID:ian577416,项目名称:linux_lg_jb,代码行数:101,代码来源:vcd_ddl_shared_mem.c


注:本文中的DDL_MSG_HIGH函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。