Fix VS2010 build errors

parent 54107bf9
......@@ -557,6 +557,7 @@ static void rotate_plane(int wDest, int hDest, int full_width, uint8_t* src, uin
int signed_dst_stride;
int incr;
int y,x;
......@@ -571,7 +572,6 @@ static void rotate_plane(int wDest, int hDest, int full_width, uint8_t* src, uin
incr = -1;
signed_dst_stride = -wDest;
}
int y,x;
for (y=0; y<hSrc; y++) {
uint8_t* dst2 = dst;
for (x=0; x<step*wSrc; x+=step) {
......@@ -601,6 +601,8 @@ static int hasNeon = 0;
mblk_t *copy_ycbcrbiplanar_to_true_yuv_with_rotation(uint8_t* y, uint8_t * cbcr, int rotation, int w, int h, int y_byte_per_row,int cbcr_byte_per_row, bool_t uFirstvSecond) {
MSPicture pict;
mblk_t *yuv_block = ms_yuv_buf_alloc(&pict, w, h);
int uv_w = w/2;
int uv_h = h/2;
#ifdef ANDROID
if (hasNeon == -1) {
......@@ -614,9 +616,6 @@ mblk_t *copy_ycbcrbiplanar_to_true_yuv_with_rotation(uint8_t* y, uint8_t * cbcr,
pict.planes[2] = tmp;
}
int uv_w = w/2;
int uv_h = h/2;
if (rotation % 180 == 0) {
int i,j;
uint8_t* u_dest=pict.planes[1], *v_dest=pict.planes[2];
......@@ -640,14 +639,15 @@ mblk_t *copy_ycbcrbiplanar_to_true_yuv_with_rotation(uint8_t* y, uint8_t * cbcr,
} else
#endif
{
// 180° y rotation
uint8_t* ysrc=y;
uint8_t* uvsrc=&cbcr[uv_h*uv_w*2-2];
uint8_t* ydst=&pict.planes[0][h*w-1];
// 180° y rotation
for(i=0; i<h*w; i++) {
*ydst-- = *ysrc++;
}
// 180° rotation + de-interlace u/v
uint8_t* uvsrc=&cbcr[uv_h*uv_w*2-2];
for (i=0; i<uv_h*uv_w*2; i++) {
*u_dest++ = *uvsrc--;
*v_dest++ = *uvsrc--;
......@@ -678,13 +678,14 @@ mblk_t *copy_ycbcrbiplanar_to_true_yuv_with_rotation(uint8_t* y, uint8_t * cbcr,
} else
#endif
{
// Copying U
uint8_t* srcu = cbcr;
uint8_t* dstu = pict.planes[1];
rotate_plane(uv_w,uv_h,cbcr_byte_per_row/2,srcu,dstu, 2, clockwise);
// Copying V
uint8_t* srcv = srcu + 1;
uint8_t* dstv = pict.planes[2];
// Copying U
rotate_plane(uv_w,uv_h,cbcr_byte_per_row/2,srcu,dstu, 2, clockwise);
// Copying V
rotate_plane(uv_w,uv_h,cbcr_byte_per_row/2,srcv,dstv, 2, clockwise);
}
}
......
......@@ -621,11 +621,12 @@ void video_stream_use_preview_video_window(VideoStream *stream, bool_t yesno){
}
void video_stream_set_device_rotation(VideoStream *stream, int orientation){
MSFilter* target_filter = NULL;
if (stream == 0)
return;
stream->device_orientation = orientation;
MSFilter* target_filter=stream->source;
target_filter=stream->source;
if (target_filter){
ms_filter_call_method(target_filter,MS_VIDEO_CAPTURE_SET_DEVICE_ORIENTATION,&orientation);
}
......
......@@ -545,8 +545,8 @@ static void dec_process(MSFilter *f) {
/* scale/copy frame to destination mblk_t */
for(i=0; i<3; i++) {
void* dest = s->outbuf.planes[i];
void* src = img->planes[i];
uint8_t* dest = s->outbuf.planes[i];
uint8_t* src = img->planes[i];
int h = img->d_h >> ((i>0)?1:0);
for(j=0; j<h; j++) {
......
......@@ -364,6 +364,10 @@ bool_t parse_args(int argc, char** argv, MediastreamDatas* out) {
void setup_media_streams(MediastreamDatas* args) {
#ifdef VIDEO_ENABLED
MSWebCam *cam=NULL;
#endif
/*create the rtp session */
ortp_init();
if (args->is_verbose) {
......@@ -390,7 +394,6 @@ void setup_media_streams(MediastreamDatas* args) {
#ifdef VIDEO_ENABLED
args->video=NULL;
MSWebCam *cam=NULL;
#endif
args->profile=rtp_profile_clone_full(&av_profile);
args->q=ortp_ev_queue_new();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment