예제 #1
0
static int framerate_automation_process(int duration)
{
	int policy=0, fr_vsource = 0, fr_target = 0;
	vmode_t mode_target = VMODE_INIT_NULL;
	const vinfo_t *pvinfo;

	printk("vout [%s] duration = %d\n", __FUNCTION__, duration);
	policy = fr_auto_policy;
	if( policy == 0 )
	{
		printk("vout frame rate automation disabled!\n");
		return 1;
	}

	fr_vsource = get_vsource_frame_rate(duration);
	fr_target = get_target_frame_rate(fr_vsource, policy);
	
	pvinfo = tv_get_current_info();
	if( (pvinfo->sync_duration_num==fr_target) || (pvinfo->sync_duration_num==(fr_target/100)) )
		return 0;

	mode_target = get_target_vmode(fr_target);
	
	framerate_automation_set_mode(mode_target);

	return 0;
}
예제 #2
0
static int framerate_automation_process(int duration)
{
	int policy = 0, fr_vsource = 0;
	enum vmode_e mode_target = VMODE_INIT_NULL;

	vout_log_info("vout [%s] duration = %d\n", __func__, duration);
	policy = fr_auto_policy;
	if (policy == 0) {
		vout_log_info("vout frame rate automation disabled!\n");
		return 1;
	}
	fr_vsource = get_vsource_frame_rate(duration);
	fps_playing_flag = 0;
	if ((fr_vsource == 5994)
		|| (fr_vsource == 2997)
		|| (fr_vsource == 2397))
		fps_playing_flag = 1;
	else if (fr_auto_policy == 2) {/* fr_auto_policy: 2 for jiewei */
		if ((fr_vsource == 6000)
			|| (fr_vsource == 5000)
			|| (fr_vsource == 3000)
			|| (fr_vsource == 2500)
			|| (fr_vsource == 2400))
			fps_playing_flag = 1;
	}

	vout_log_info("%s[%d] fps_playing_flag = %d\n", __func__, __LINE__,
		      fps_playing_flag);
	mode_target = get_target_vmode(fr_vsource);
	framerate_automation_set_mode(mode_target, START_HINT);
	return 0;
}