예제 #1
0
static int gif_abort(void)
{
    struct osd_device *osd_dev; 
	/*
	if(jpeg_file.id > 0)
	{
		osal_mutex_lock(jpeg_file.lock, TMO_FEVR);
		jpeg_file.mp_cb = NULL;
		osal_mutex_unlock(jpeg_file.lock);

		imagedec_stop(jpeg_file.id);

		while(jpeg_file.task_terminated == 1)
		{
			osal_task_sleep(10);
		}
	}
	*/
	//gif_file fh;

#ifdef ENABLE_PE_CACHE
	if(gif_cache_id >= 0) pe_cache_close(gif_cache_id);
	gif_cache_id = -1;
#endif

#ifdef ENABLE_PE_CACHE
	fh = 1;
#endif

	if (gif == NULL)
		return 0;

	gif_stop(gif, fh);

	gif_close(gif);
    alpha_value_flag = 0;
#ifdef  DUAL_ENABLE 
    osd_dev = (struct osd_device *)dev_get_by_id(HLD_DEV_TYPE_OSD, 0); 
    OSDDrv_ShowOnOff((HANDLE)osd_dev,FALSE);
    OSDDrv_Close((HANDLE)osd_dev);
    tran_use_number = 256;
    
#endif

	gif = NULL;
}
예제 #2
0
void ad_pic_gif_close(void)
{
	UINT32 i;
	
	if (gif == NULL)
		return;
	
	for (i = 0; i < MAX_GIF_FILE; i++)
	{
		if (gif_list[i].file != 0xFFFFFFFF)
		{
			gif_stop(gif, gif_list[i].file);
			ad_pic_gif_file_remove(gif_list[i].file);
		}
	}
    
	gif_close(gif);
	gif = NULL;
}
예제 #3
0
파일: giftest.c 프로젝트: darcyg/chaosircd
int giftest_write(void)
{
  struct gif     *gif;
  struct palette *pal;
  struct color    colors[4] = {
    {  0,    0,   0, 0xff },
    { 64,   64,  64, 0xff },
    { 128, 128, 128, 0xff },
    { 192, 192, 192, 0xff }
  };
  uint32_t        x,y,i;
  uint8_t         data;

  gif = gif_new("test.gif", GIF_WRITE);

  pal = gif_palette_make(4, colors);
  
  gif_screen_put(gif, GIFTEST_WIDTH, GIFTEST_HEIGHT, 2, 0, pal);
  
  gif_image_put(gif, 0, 0, GIFTEST_WIDTH, GIFTEST_HEIGHT, 0, pal);
  
  i=0;
  for(y = 0; y < GIFTEST_HEIGHT; y++)
    for(x = 0; x < GIFTEST_WIDTH; x++)
  {
/*    data = i & 0x03;*/
	  data = (y*x*2 + x*x*8) / 80;
	  data &= 0x03;
    gif_data_put(gif, &data, 1);
	i++;
  }

  gif_close(gif);
  gif_save(gif);

  return 0;
}