Пример #1
0
livido_init_f	init_instance( livido_port_t *my_instance )
{
	int w = 0, h = 0;
        lvd_extract_dimensions( my_instance, "out_channels", &w, &h );

	int video_area = w * h * 3;

	displaywall_t *entry = (displaywall_t*) livido_malloc(sizeof(displaywall_t));
	livido_memset( entry, 0, sizeof(displaywall_t));

	entry->vecx = (int *)livido_malloc(sizeof(int) * video_area);
	entry->vecy = (int *)livido_malloc(sizeof(int) * video_area);
	if(entry->vecx == NULL || entry->vecy == NULL) {
		free(entry);
		return NULL;
	}

	entry->scale = 3;
	entry->dx = 0;
	entry->dy = 0;
	entry->speed = 10;
	entry->cx = w / 2;
	entry->cy = h / 2;

	displaywall_initVec(entry, w, h);

	livido_property_set( my_instance, "PLUGIN_private", LIVIDO_ATOM_TYPE_VOIDPTR,1, &entry);

	return LIVIDO_NO_ERROR;
}
Пример #2
0
livido_init_f	init_instance( livido_port_t *my_instance )
{
	int width = 0, height = 0;

	lvd_extract_dimensions( my_instance, "out_channels", &width, &height );

	scale0tilt_instance_t* inst = (scale0tilt_instance_t*)livido_malloc(sizeof(scale0tilt_instance_t));

	livido_memset( inst, 0, sizeof(scale0tilt_instance_t) );

	inst->w = width;
	inst->h = height;
	inst->sx = 1.0;
	inst->sy = 1.0;
	
	inst->format_src.frame_width  = inst->w;
	inst->format_src.frame_height = inst->h;
	inst->format_src.image_width  = inst->w;
	inst->format_src.image_height = inst->h;
	inst->format_src.pixel_width = 1;
	inst->format_src.pixel_height = 1;
	inst->format_src.pixelformat = GAVL_YUVJ_444_P;

	inst->video_scaler = gavl_video_scaler_create();
	inst->frame_src = gavl_video_frame_create( NULL );
	inst->frame_dst = gavl_video_frame_create( NULL );

	inst->frame_src->strides[0] = width;
	inst->frame_src->strides[1] = width;
	inst->frame_src->strides[2] = width;

	inst->frame_dst->strides[0] = width;
	inst->frame_dst->strides[1] = width;
	inst->frame_dst->strides[2] = width;

	update_scaler(inst);
	
	inst->temp = gavl_video_frame_create( &(inst->format_src) );
	inst->temp_alpha = gavl_video_frame_create( &(inst->format_src) );
	
	livido_property_set( my_instance, "PLUGIN_private", LIVIDO_ATOM_TYPE_VOIDPTR,1, &inst);

	return LIVIDO_NO_ERROR;
}
Пример #3
0
livido_init_f	init_instance( livido_port_t *my_instance )
{
	int w = 0, h = 0;
        lvd_extract_dimensions( my_instance, "out_channels", &w, &h );

	lvd_crop_t *c = (lvd_crop_t*) livido_malloc( sizeof(lvd_crop_t));
	livido_memset(c,0,sizeof(lvd_crop_t));

	c->buf[0]     = (uint8_t*) livido_malloc( sizeof(uint8_t) * RUP8(w * h * 4));
	c->buf[1]     = c->buf[0] + RUP8(w*h);
	c->buf[2]     = c->buf[1] + RUP8(w*h);
	c->flags	  = SWS_FAST_BILINEAR;

	c->w		  = -1;
	c->h		  = -1; 

	livido_property_set( my_instance, "PLUGIN_private", LIVIDO_ATOM_TYPE_VOIDPTR,1, &c);

	return LIVIDO_NO_ERROR;
}