fix freeframe

disabled freeframe plugin parameters
fixes to yuv lib
fixes to vevo lib
bump version
This commit is contained in:
niels
2011-01-17 20:03:01 +01:00
parent 2bad99ee72
commit 2f38f2d3fd
14 changed files with 147 additions and 127 deletions

View File

@@ -1,12 +1,12 @@
dnl Process this file with autoconf to produce a configure script.
dnl AC_INIT
AC_INIT([veejay],[1.5.7],[veejay-users@lists.sourceforge.net])
AC_INIT([veejay],[1.5.8],[veejay-users@lists.sourceforge.net])
AC_PREREQ(2.57)
AC_CONFIG_SRCDIR([veejay/veejay.c])
VEEJAY_MAJOR_VERSION=1
VEEJAY_MINOR_VERSION=5
VEEJAY_MICRO_VERSION=7
VEEJAY_MICRO_VERSION=8
VEEJAY_VERSION=$VEEJAY_MAJOR_VERSION.$VEEJAY_MINOR_VERSION.$VEEJAY_MICRO_VERSION
VEEJAY_CODENAME="Veejay Classic - build $VEEJAY_MINOR_VERSION $VEEJAY_MICRO_VERSION"
AC_CONFIG_HEADERS([config.h])

View File

@@ -1692,7 +1692,7 @@ int vj_el_init_420_frame(editlist *el, VJFrame *frame)
frame->ssm = 0;
frame->stride[0] = el->video_width;
frame->stride[1] = frame->stride[2] = frame->stride[0]/2;
frame->format = el_pixel_format_;
frame->format = get_ffmpeg_pixfmt(el_pixel_format_);
return 1;
}
@@ -1714,7 +1714,7 @@ int vj_el_init_422_frame(editlist *el, VJFrame *frame)
frame->ssm = 0;
frame->stride[0] = el->video_width;
frame->stride[1] = frame->stride[2] = frame->stride[0]/2;
frame->format = el_pixel_format_;
frame->format = get_ffmpeg_pixfmt( el_pixel_format_ );
return 1;
}

View File

@@ -58,14 +58,23 @@ typedef struct
//#if (V_BITS == 32)
#define FF_CAP_V_BITS_VIDEO FF_CAP_32BITVIDEO
static int freeframe_signature_ = VEVO_PLUG_FF;
static void *rgb_conv_ = NULL;
static void *yuv_conv_ = NULL;
/*#elif (V_BITS == 24)
#define FF_CAP_V_BITS_VIDEO FF_CAP_24BITVIDEO
#else // V_BITS = 16
#define FF_CAP_V_BITS_VIDEO FF_CAP_16BITVIDEO
#endif*/
void freeframe_destroy( ) {
if( rgb_conv_ ) {
yuv_free_swscaler( rgb_conv_ );
}
if( yuv_conv_ ) {
yuv_free_swscaler( yuv_conv_ );
}
}
void* deal_with_ff( void *handle, char *name )
{
void *port = vpn( VEVO_FF_PORT );
@@ -125,7 +134,9 @@ void* deal_with_ff( void *handle, char *name )
vevo_property_set( port, "num_inputs", VEVO_ATOM_TYPE_INT,1, &n_inputs );
vevo_property_set( port, "HOST_plugin_type", VEVO_ATOM_TYPE_INT, 1, &freeframe_signature_ );
veejay_msg(VEEJAY_MSG_INFO, "FF Load: '%s' , %d params, %d inputs", plugin_name, n_params, n_inputs );
// veejay_msg(VEEJAY_MSG_INFO, "FF Load: '%s' , %d params, %d inputs", plugin_name, n_params, n_inputs );
n_params = 0; //@ FIXME: parameter initialization
int p;
for( p= 0; p < n_params; p ++ )
@@ -135,35 +146,57 @@ void* deal_with_ff( void *handle, char *name )
double min = 0;
double max = 1.0;
int kind = 0;
int kind = -1;
switch( type )
{
case FF_TYPE_BOOLEAN:
case 0:
kind = HOST_PARAM_SWITCH;
break;
case FF_TYPE_RED:
case FF_TYPE_BLUE:
case FF_TYPE_GREEN:
kind = HOST_PARAM_NUMBER;
max = 255.0;
min = 0.0;
break;
case FF_TYPE_XPOS:
kind = HOST_PARAM_NUMBER;
case FF_TYPE_YPOS:
kind = HOST_PARAM_NUMBER;
case FF_TYPE_STANDARD:
kind = HOST_PARAM_NUMBER;
min = 0.0;
max = 100.0;
break;
default:
break;
}
if(kind)
if(kind == -1) {
#ifdef STRICT_CHECKING
veejay_msg( VEEJAY_MSG_DEBUG, "Dont know about parameter type %d", type );
#endif
continue;
}
void *parameter = vpn( VEVO_FF_PARAM_PORT );
double ivalue = (double)q( FF_GETPARAMETERDEFAULT, (LPVOID) p, 0).fvalue;
char pname[32];
q( FF_GETPARAMETERNAME, (LPVOID) p,pname );
vevo_property_set( parameter, "default", VEVO_ATOM_TYPE_DOUBLE,1 ,&ivalue );
vevo_property_set( parameter, "value" , VEVO_ATOM_TYPE_DOUBLE,1, &ivalue );
vevo_property_set( parameter, "min", VEVO_ATOM_TYPE_DOUBLE, 1, &min );
vevo_property_set( parameter, "max", VEVO_ATOM_TYPE_DOUBLE,1, &max );
vevo_property_set( parameter, "HOST_kind", VEVO_ATOM_TYPE_INT,1,&kind );
#ifdef STRICT_CHECKING
veejay_msg( VEEJAY_MSG_DEBUG, "parameter %d is %s, defaults to %g, range is %g - %g, kind is %d",
p, pname, ivalue, min, max, kind );
#endif
char key[20];
snprintf(key,20, "p%02d", p );
@@ -325,7 +358,7 @@ int freeframe_set_parameter_from_string( void *instance, int p, const char *str,
int freeframe_plug_init( void *plugin, int w, int h )
void *freeframe_plug_init( void *plugin, int w, int h )
{
VideoInfoStruct v;
v.frameWidth = w;
@@ -333,6 +366,10 @@ int freeframe_plug_init( void *plugin, int w, int h )
v.orientation = 1;
v.bitDepth = FF_CAP_V_BITS_VIDEO;
#ifdef STRICT_CHECKING
assert( v.bitDepth == FF_CAP_32BITVIDEO );
#endif
void *base = NULL;
int error = vevo_property_get( plugin, "base", 0, &base);
#ifdef STRICT_CHECING
@@ -351,72 +388,58 @@ int freeframe_plug_init( void *plugin, int w, int h )
int num_channels = 0;
int i;
vevo_property_get( plugin, "num_inputs", 0, &num_channels );
void *buf = vpn( VEVO_ANONYMOUS_PORT );
error = vevo_property_set( instance, "HOST_buffers",
VEVO_ATOM_TYPE_PORTPTR,1,&buf);
#ifdef STRICT_CHECKING
assert( error == VEVO_NO_ERROR );
#endif
// input channels
for( i = 0; i < num_channels; i ++ )
{
// reserve rgb buffer
char key[10];
uint8_t *space = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 4 );
sprintf(key ,"in%02d",i);
// store space
vevo_property_set( buf, key, VEVO_ATOM_TYPE_VOIDPTR,1,&space);
uint8_t *space = (uint8_t*) vj_malloc( sizeof(uint8_t) * w * h * 4 * num_channels);
error = vevo_property_set( plugin , "HOST_buffer", VEVO_ATOM_TYPE_VOIDPTR, 1, &space );
if( error != VEVO_NO_ERROR ) {
veejay_msg(VEEJAY_MSG_ERROR, "Unable to create HOST_buffer");
return 0;
}
// output channel
uint8_t *space = (uint8_t*) vj_malloc(sizeof(uint8_t) * w * h * 4 );
vevo_property_set( buf, "output", VEVO_ATOM_TYPE_VOIDPTR,1,&space);
generic_process_f gpf = freeframe_plug_process;
vevo_property_set( instance,
vevo_property_set( plugin,
"HOST_plugin_process_f",
VEVO_ATOM_TYPE_VOIDPTR,
1,
&gpf );
generic_push_channel_f gpu = freeframe_push_channel;
vevo_property_set( instance,
vevo_property_set( plugin,
"HOST_plugin_push_f",
VEVO_ATOM_TYPE_VOIDPTR,
1,
&gpu );
generic_clone_parameter_f gcc = freeframe_clone_parameter;
vevo_property_set( instance,
vevo_property_set( plugin,
"HOST_plugin_param_clone_f",
VEVO_ATOM_TYPE_VOIDPTR,
1,
&gcc );
generic_reverse_clone_parameter_f grc = freeframe_reverse_clone_parameter;
vevo_property_set( instance,
vevo_property_set( plugin,
"HOST_plugin_param_reverse_f",
VEVO_ATOM_TYPE_VOIDPTR,
1,
&grc );
generic_default_values_f gdb = freeframe_plug_retrieve_default_values;
vevo_property_set( instance,
vevo_property_set( plugin,
"HOST_plugin_defaults_f",
VEVO_ATOM_TYPE_VOIDPTR,
1,
&gdb );
generic_deinit_f gin = freeframe_plug_deinit;
vevo_property_set( instance,
vevo_property_set( plugin,
"HOST_plugin_deinit_f",
VEVO_ATOM_TYPE_VOIDPTR,
1,
&gin );
return 1;
return plugin;
}
@@ -440,29 +463,14 @@ void freeframe_plug_deinit( void *plugin )
q( FF_DEINSTANTIATE, NULL, instance );
void *channels = NULL;
error = vevo_property_get( plugin, "HOST_buffers",0,&channels);
uint8_t *space = NULL;
error = vevo_property_get( plugin, "HOST_buffer",0,&space);
#ifdef STRICT_CHECKING
assert( error == VEVO_NO_ERROR );
#endif
char **items = vevo_list_properties( channels );
int i;
for( i = 0; items[i] != NULL ; i ++ )
{
uint8_t *space = NULL;
error = vevo_property_get( channels, items[i], 0, &space );
#ifdef STRICT_CHECKING
assert( error == VEVO_NO_ERROR );
#endif
if( error == VEVO_NO_ERROR ) {
free(space);
}
uint8_t *space = NULL;
error = vevo_property_get( plugin , "output", 0, &space );
#ifdef STRICT_CHECKING
assert( error == VEVO_NO_ERROR );
#endif
free(space);
}
void freeframe_plug_free( void *plugin )
@@ -490,23 +498,23 @@ void freeframe_push_channel( void *instance, const char *key,int n, VJFrame *fra
}
else
{
//@ convert rgb data
sprintf(inkey, "in%02d",n );
error = vevo_property_get( instance, "HOST_buffers",0,&chan );
#ifdef STRICT_CHECKING
assert( error == VEVO_NO_ERROR );
#endif
error = vevo_property_get( chan, inkey, 0, &space );
error = vevo_property_get( instance, "HOST_buffer",0,&space );
#ifdef STRICT_CHECKING
assert( error == VEVO_NO_ERROR );
#endif
uint32_t chan_offset = frame->width * frame->height * 4 * n;
VJFrame *dst1 = yuv_rgb_template( space, frame->width,frame->height, PIX_FMT_RGB24 );
VJFrame *dst1 = yuv_rgb_template( space + chan_offset, frame->width,frame->height, PIX_FMT_RGB32 );
yuv_convert_any_ac( frame, dst1, frame->format, dst1->format );
if( yuv_conv_ == NULL ) {
sws_template templ;
templ.flags = 1;
yuv_conv_ = yuv_init_swscaler( frame,dst1, &templ, yuv_sws_get_cpu_flags() );
}
yuv_convert_and_scale_rgb( yuv_conv_, frame, dst1 );
free(dst1);
}
}
@@ -526,19 +534,13 @@ int freeframe_plug_process( void *plugin, double timecode )
#ifdef STRICT_CHECING
assert( error == LIVIDO_NO_ERROR );
#endif
uint8_t *space = NULL;
error = vevo_property_get( plugin, "HOST_buffer",0,&space );
#ifdef STRICT_CHECING
assert( error == LIVIDO_NO_ERROR );
#endif
char *key = "in00";
void *channels = NULL;
error = vevo_property_get( plugin, "HOST_buffers",0,&channels );
void *in = NULL;
#ifdef STRICT_CHECING
assert( error == LIVIDO_NO_ERROR );
#endif
error = vevo_property_get( channels, key, 0, &in );
#ifdef STRICT_CHECING
assert( error == LIVIDO_NO_ERROR );
#endif
q( FF_PROCESSFRAME, in, instance );
q( FF_PROCESSFRAME, space, instance );
VJFrame *output_frame = NULL;
@@ -547,10 +549,31 @@ int freeframe_plug_process( void *plugin, double timecode )
assert( error == LIVIDO_NO_ERROR );
#endif
VJFrame *dst1 = yuv_rgb_template( in, output_frame->width, output_frame->height, PIX_FMT_RGB24 );
VJFrame *src1 = yuv_rgb_template( space, output_frame->width, output_frame->height, PIX_FMT_RGB32 );
yuv_convert_any_ac( dst1, output_frame, dst1->format, output_frame->format );
// yuv_convert_any_ac( src1, output_frame, src1->format, output_frame->format );
if( rgb_conv_ == NULL ) {
sws_template templ;
templ.flags = 1;
rgb_conv_ = yuv_init_swscaler( src1,output_frame, &templ, yuv_sws_get_cpu_flags() );
}
yuv_convert_and_scale_from_rgb( rgb_conv_, src1, output_frame );
free(src1);
return 1;
}
void freeframe_plug_param_f( void *plugin, int seq_no, void *dargs )
{
int instance = 0;
int error = vevo_property_get( plugin, "instance",0, &instance );
#ifdef STRICT_CHECING
assert( error == LIVIDO_NO_ERROR );
#endif
}

View File

@@ -14,11 +14,12 @@ void freeframe_plug_free( void *plugin );
void freeframe_plug_deinit( void *plugin );
int freeframe_plug_init( void *plugin, int w, int h );
void *freeframe_plug_init( void *plugin, int w, int h );
void freeframe_plug_retrieve_current_values( void *instance, void *fx_values );
void freeframe_plug_retrieve_default_values( void *instance, void *fx_values );
void freeframe_destroy( );
#endif

View File

@@ -294,6 +294,9 @@ static void free_plugins()
free( index_map_ );
index_ = 0;
index_map_ = NULL;
freeframe_destroy();
}
void *plug_get( int fx_id ) {
@@ -461,12 +464,6 @@ void plug_set_parameter( void *instance, int seq_num,int n_elements,void *value
int error = vevo_property_get( instance, "HOST_plugin_param_f", 0, &gpp );
if( error == VEVO_NO_ERROR)
(*gpp)( instance, seq_num, value );
#ifdef STRICT_CHECKING
else
{
veejay_msg(0, "HOST_plugin_param_f missing!");
}
#endif
}
void plug_get_defaults( void *instance, void *fx_values )
@@ -590,7 +587,7 @@ char *plug_describe( int fx_id )
char **out_params = NULL;
if( pi > 0 )
{
in_params = (char*) vj_malloc(sizeof(char*) * pi );
in_params = (char**) vj_malloc(sizeof(char*) * pi );
for( i = 0; i < pi; i ++ )
{
@@ -601,7 +598,7 @@ char *plug_describe( int fx_id )
}
if( po > 0 )
{
out_params = (char*) vj_malloc(sizeof(char*) * pi );
out_params = (char**) vj_malloc(sizeof(char*) * pi );
for( i = 0; i < pi; i ++ )
{

View File

@@ -20,21 +20,18 @@
#define THREAD_START 0
#define THREAD_STOP 1
#include <config.h>
#include <string.h>
#include <stdint.h>
#include <libvjmem/vjmem.h>
#include <pthread.h>
#include <libstream/vj-tag.h>
#include <libvjnet/vj-client.h>
#include <veejay/vims.h>
#include <libyuv/yuvconv.h>
#include <libvjmem/vjmem.h>
#include <libavutil/avutil.h>
#include <libvjmsg/vj-msg.h>
#include <veejay/vims.h>
#include <libstream/vj-net.h>
#include <liblzo/lzo.h>
#define _POSIX_C_SOURCE 199309
#include <time.h>

View File

@@ -173,11 +173,11 @@ static int vj_yuv_stream_start_read1(vj_yuv * yuv4mpeg, int fd, int width,
return 0;
}
/*
uint8_t *vj_yuv_get_buf( void *v ) {
vj_yuv *y = (vj_yuv*)v;
return y->buf;
}
}*/
int vj_yuv_stream_write_header(vj_yuv * yuv4mpeg, editlist * el, int out_chroma)
{

View File

@@ -332,9 +332,9 @@ static void port_node_free(__vevo_port_t *port,port_index_t * node)
{
if (node) {
if (node->key) {
free(node->key);
node->key=NULL;
}
free(node->key);
node->key = NULL;
}
// free(node);
vevo_pool_free_node( port->pool,(void*)node );
}
@@ -3396,12 +3396,15 @@ vevo_property_del(vevo_port_t * p,
port_index_t *l = port->index;
port_index_t *n = NULL;
while (l != NULL) {
n = l->next;
if( (uint32_t) l->key == hash_key )
port_node_free(port,l);
l = n;
}
while (l != NULL)
{
n = l->next;
uint32_t pkey = hash_key_code( l->key );
if( pkey == hash_key )
port_node_free(port,l);
l = n;
}
return VEVO_NO_ERROR;
}

View File

@@ -50,13 +50,6 @@ void vj_effman_apply_plug_effect(
#ifdef STRICT_CHECKING
assert( instance != NULL );
#endif
int type = -1;
int error = vevo_property_get( instance, "HOST_plugin_type", 0, &type );
if( type == VEVO_PLUG_FR || type == VEVO_PLUG_FF ) {
return;
}
int n = plug_get_num_input_channels( plug_id );
n_arg = plug_get_num_parameters( plug_id );

View File

@@ -139,7 +139,7 @@ static void veejay_addr2line_bt( int n, void *addr, char *sym )
address = addr;
if( info.dli_fbase >= (const void*)0x40000000)
addr = (const char*) address - (unsigned int ) info.dli_fbase;
addr = (void*)((const char*) address - (unsigned int ) info.dli_fbase);
snprintf( cmd,sizeof(cmd), "addr2line --functions --demangle -e $(which %s) %p", info.dli_fname, address);
out = popen( cmd, "r");

View File

@@ -270,6 +270,7 @@ void yuv_init_lib(int extra_flags, int auto_ccir_jpeg, int default_zoomer)
// put( PIX_FMT_RGB32, IMG_ARGB32 );
put( PIX_FMT_RGB32, IMG_RGBA32 );
put( PIX_FMT_RGBA, IMG_RGBA32 );
put( PIX_FMT_ARGB, IMG_ARGB32 );
put( PIX_FMT_RGB32_1, IMG_RGBA32 );
put( PIX_FMT_YUYV422, IMG_YUY2);
put( PIX_FMT_GRAY8, IMG_Y8 );
@@ -393,7 +394,7 @@ VJFrame *yuv_rgb_template( uint8_t *rgb_buffer, int w, int h, int fmt )
{
#ifdef STRICT_CHECKING
assert( fmt == PIX_FMT_RGB24 || fmt == PIX_FMT_BGR24 ||
fmt == PIX_FMT_RGBA || fmt == PIX_FMT_RGB32_1 || fmt == PIX_FMT_RGB32);
fmt == PIX_FMT_RGBA || fmt == PIX_FMT_RGB32_1 || fmt == PIX_FMT_RGB32 || fmt == PIX_FMT_ARGB);
assert( w > 0 );
assert( h > 0 );
#endif
@@ -479,7 +480,7 @@ void yuv_convert_any_ac( VJFrame *src, VJFrame *dst, int src_fmt, int dst_fmt )
src_fmt == PIX_FMT_RGB24 || src_fmt == PIX_FMT_RGBA ||
src_fmt == PIX_FMT_YUYV422 ||
src_fmt == PIX_FMT_BGR24 || src_fmt == PIX_FMT_RGB32 ||
src_fmt == PIX_FMT_RGB32_1 || src_fmt == PIX_FMT_GRAY8 );
src_fmt == PIX_FMT_RGB32_1 || src_fmt == PIX_FMT_GRAY8 || src_fmt == PIX_FMT_ARGB );
assert( src->width > 0 );
assert( dst->width > 0 );
#endif
@@ -553,17 +554,15 @@ void yuv_fx_context_destroy( void *ctx )
void yuv_convert_any3( VJFrame *src, int src_stride[3], VJFrame *dst, int src_fmt, int dst_fmt )
{
#ifdef STRICT_CHECKING
assert( dst_fmt >= 0 && dst_fmt < 32 );
/* assert( dst_fmt >= 0 && dst_fmt < 32 );
assert( src_fmt == PIX_FMT_YUV420P || src_fmt == PIX_FMT_YUVJ420P ||
src_fmt == PIX_FMT_YUV422P || src_fmt == PIX_FMT_YUVJ422P ||
src_fmt == PIX_FMT_YUV444P || src_fmt == PIX_FMT_YUVJ444P ||
src_fmt == PIX_FMT_RGB24 || src_fmt == PIX_FMT_RGBA );
src_fmt == PIX_FMT_RGB24 || src_fmt == PIX_FMT_RGBA || src_fmt == PIX_FMT_ARGB );*/
assert( src_stride[0] > 0 );
assert( dst->width > 0 );
assert( dst->height > 0 );
assert( dst->data[0] != NULL );
assert( dst->data[1] != NULL );
assert( dst->data[2] != NULL );
#endif
struct SwsContext *ctx = sws_getContext(
src->width,
@@ -1157,7 +1156,7 @@ void yuv_convert_and_scale_from_rgb(void *sws , VJFrame *src, VJFrame *dst)
{
vj_sws *s = (vj_sws*) sws;
int n = 3;
if( src->format == PIX_FMT_RGBA || src->format == PIX_FMT_BGRA )
if( src->format == PIX_FMT_RGBA || src->format == PIX_FMT_BGRA || src->format == PIX_FMT_ARGB )
n = 4;
int src_stride[3] = { src->width*n,0,0};
int dst_stride[3] = { dst->width,dst->uv_width,dst->uv_width };
@@ -1170,7 +1169,8 @@ void yuv_convert_and_scale_rgb(void *sws , VJFrame *src, VJFrame *dst)
{
vj_sws *s = (vj_sws*) sws;
int n = 3;
if( dst->format == PIX_FMT_RGBA || dst->format == PIX_FMT_BGRA )
if( dst->format == PIX_FMT_RGBA || dst->format == PIX_FMT_BGRA || dst->format == PIX_FMT_ARGB ||
dst->format == PIX_FMT_RGB32 )
n = 4;
int src_stride[3] = { src->width,src->uv_width,src->uv_width };

View File

@@ -2074,6 +2074,10 @@ int veejay_init(veejay_t * info, int x, int y,char *arg, int def_tags)
veejay_msg(VEEJAY_MSG_DEBUG, "Internal YUV format is 4:2:2 Planar, %d x %d",
el->video_width,
el->video_height);
veejay_msg(VEEJAY_MSG_DEBUG, "FX Frame Info: %d x %d, ssm=%d, format=%d",
info->effect_frame1->width,info->effect_frame1->height,
info->effect_frame1->ssm,
info->effect_frame1->format );
if(!vj_perform_init(info))
{
@@ -3782,9 +3786,11 @@ int veejay_open_files(veejay_t * info, char **files, int num_files, float ofps,
char text[24];
switch(info->pixel_format) {
case FMT_422:
sprintf(text, "4:2:2 [16-235][16-240]");break;
sprintf(text, "4:2:2 [16-235][16-240]");
break;
case FMT_422F:
sprintf(text, "4:2:2 [0-255]");break;
sprintf(text, "4:2:2 [0-255]");
break;
default:
veejay_msg(VEEJAY_MSG_ERROR, "Unknown pixel format set");
return 0;

View File

@@ -30,7 +30,7 @@ typedef struct
int max_files;
} filelist_t;
#define VEEJAY_FILE_LIMIT (1048576 * 16000)
#define VEEJAY_FILE_LIMIT (1048576 * 2000)
int available_diskspace(void);
int vj_perform_screenshot2(veejay_t * info, uint8_t ** src);

View File

@@ -2304,12 +2304,12 @@ static int vj_perform_render_chain_entry(veejay_t *info, int chain_entry)
video_playback_setup *settings = info->settings;
frames[0] = info->effect_frame1;
frames[1] = info->effect_frame2;
frames[1]->format = info->pixel_format;
// frames[1]->format = info->pixel_format;
frameinfo = info->effect_frame_info;
frames[0]->data[0] = primary_buffer[0]->Y;
frames[0]->data[1] = primary_buffer[0]->Cb;
frames[0]->data[2] = primary_buffer[0]->Cr;
frames[0]->format = info->pixel_format;
// frames[0]->format = info->pixel_format;
vjp_kf *setup;
setup = info->effect_info;