fix preview resolution switching

git-svn-id: svn://code.dyne.org/veejay/trunk@1363 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
This commit is contained in:
Niels Elburg
2010-01-29 21:29:16 +00:00
parent 45ec6bad99
commit c4c0c9aa3e
4 changed files with 13 additions and 5 deletions

View File

@@ -40,8 +40,8 @@ The OpenSound Control WWW page is
#include <stdio.h>
#define MAX_ALIASES_PER_CONTAINER 3
#define MAX_CHILDREN_PER_CONTAINER 20
#define MAX_METHODS_PER_CONTAINER 30
#define MAX_CHILDREN_PER_CONTAINER 32
#define MAX_METHODS_PER_CONTAINER 32
#define BASE_NUM_TO_REALLOCATE 10

View File

@@ -430,6 +430,10 @@ void vj_fast_picture_save_to_mem( VJFrame *frame, int out_w, int out_h, int pixf
assert( pic_scaler_ != NULL );
#endif
update_pic_data( out_w, out_h, pixfmt );
veejay_memset( dest[0], 0, out_w*out_h);
veejay_memset( dest[1], 128, (out_w*out_h)/4);
veejay_memset( dest[2], 128, (out_w*out_h)/4);
}
// if( frame->width == out_w && frame->height == out_h )

View File

@@ -8425,12 +8425,12 @@ void vj_event_get_scaled_image ( void *ptr, const char format[], va_list ap )
h,
pixel_format );
int input_len = (use_bw_preview_ ? ( w * h ) : (( w * h ) + ((w * h)/2)) );
int dstlen = (use_bw_preview_ ? ( w * h ) : (( w * h ) + ((w * h)/2)) );
char header[8];
sprintf( header, "%06d%1d", input_len, use_bw_preview_ );
sprintf( header, "%06d%1d", dstlen, use_bw_preview_ );
SEND_DATA(v, header, 7 );
SEND_DATA(v, vj_perform_get_preview_buffer(), input_len );
SEND_DATA(v, vj_perform_get_preview_buffer(), dstlen );
}
void vj_event_get_cali_image ( void *ptr, const char format[], va_list ap )

View File

@@ -596,6 +596,10 @@ int vj_perform_init(veejay_t * info)
primary_buffer[6] = (ycbcr_frame*) vj_calloc(sizeof(ycbcr_frame));
primary_buffer[6]->Y = (uint8_t*) vj_calloc( sizeof(uint8_t) * RUP8(512 * 512 * 3));
//@ layout of primary_buffer[6] is flat, only Y
primary_buffer[7] = (ycbcr_frame*) vj_calloc(sizeof(ycbcr_frame));
primary_buffer[7]->Y = (uint8_t*) vj_calloc( sizeof(uint8_t) * RUP8(w * h * 3));
primary_buffer[7]->Cb = primary_buffer[7]->Y + ( RUP8(w*h));