[Mplayerxp-cvslog] SF.net SVN: mplayerxp:[216] mplayerxp
Brought to you by:
olov
From: <nic...@us...> - 2012-10-26 10:04:58
|
Revision: 216 http://mplayerxp.svn.sourceforge.net/mplayerxp/?rev=216&view=rev Author: nickols_k Date: 2012-10-26 10:04:44 +0000 (Fri, 26 Oct 2012) Log Message: ----------- improve readability of sources Modified Paths: -------------- mplayerxp/dump.c mplayerxp/libmpcodecs/dec_video.c mplayerxp/libmpcodecs/vd.c mplayerxp/libmpcodecs/vd_divx4.c mplayerxp/libmpcodecs/vd_dmo.c mplayerxp/libmpcodecs/vd_dshow.c mplayerxp/libmpcodecs/vd_ffmpeg.c mplayerxp/libmpcodecs/vd_huffyuv.c mplayerxp/libmpcodecs/vd_libdv.c mplayerxp/libmpcodecs/vd_libmpeg2.c mplayerxp/libmpcodecs/vd_mpegpes.c mplayerxp/libmpcodecs/vd_nuv.c mplayerxp/libmpcodecs/vd_qtvideo.c mplayerxp/libmpcodecs/vd_raw.c mplayerxp/libmpcodecs/vd_real.c mplayerxp/libmpcodecs/vd_theora.c mplayerxp/libmpcodecs/vd_vfw.c mplayerxp/libmpcodecs/vd_xanim.c mplayerxp/libmpcodecs/vd_xvid.c mplayerxp/libmpdemux/demux_bmp.c mplayerxp/libmpdemux/demux_dv.c mplayerxp/libmpdemux/demux_film.c mplayerxp/libmpdemux/demux_fli.c mplayerxp/libmpdemux/demux_lavf.c mplayerxp/libmpdemux/demux_mkv.c mplayerxp/libmpdemux/demux_mov.c mplayerxp/libmpdemux/demux_mpg.c mplayerxp/libmpdemux/demux_mpxp64.c mplayerxp/libmpdemux/demux_nsv.c mplayerxp/libmpdemux/demux_nuv.c mplayerxp/libmpdemux/demux_ogg.c mplayerxp/libmpdemux/demux_pva.c mplayerxp/libmpdemux/demux_rawvideo.c mplayerxp/libmpdemux/demux_real.c mplayerxp/libmpdemux/demux_roq.c mplayerxp/libmpdemux/demux_smjpeg.c mplayerxp/libmpdemux/demux_ts.c mplayerxp/libmpdemux/demux_viv.c mplayerxp/libmpdemux/demux_y4m.c mplayerxp/libmpdemux/s_tv.c mplayerxp/libmpdemux/stheader.h mplayerxp/libmpdemux/video.c mplayerxp/loader/qtx/qtxsdk/components.h mplayerxp/mplayer.c mplayerxp/postproc/vf.c Modified: mplayerxp/dump.c =================================================================== --- mplayerxp/dump.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/dump.c 2012-10-26 10:04:44 UTC (rev 216) @@ -204,9 +204,9 @@ { shv->bih=malloc(sizeof(BITMAPINFOHEADER)); shv->bih->biSize=sizeof(BITMAPINFOHEADER); - shv->bih->biWidth=shv->disp_w; - shv->bih->biHeight=shv->disp_h; - shv->bih->biCompression=shv->format; + shv->bih->biWidth=shv->src_w; + shv->bih->biHeight=shv->src_h; + shv->bih->biCompression=shv->fourcc; shv->bih->biPlanes=1; shv->bih->biBitCount=24; // FIXME!!! shv->bih->biSizeImage=shv->bih->biWidth*shv->bih->biHeight*(shv->bih->biBitCount/8); Modified: mplayerxp/libmpcodecs/dec_video.c =================================================================== --- mplayerxp/libmpcodecs/dec_video.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/dec_video.c 2012-10-26 10:04:44 UTC (rev 216) @@ -95,7 +95,7 @@ unsigned o_bps,bpp; sh_video->codec=NULL; MSG_DBG3("mpcv_init(%p, %s, %s, %i)\n",sh_video,codecname,vfm,status); - while((sh_video->codec=find_codec(sh_video->format, + while((sh_video->codec=find_codec(sh_video->fourcc, sh_video->bih?((unsigned int*) &sh_video->bih->biCompression):NULL, sh_video->codec,0) )){ // ok we found one codec @@ -151,14 +151,14 @@ case IMGFMT_RGB32: case IMGFMT_BGR32: bpp = 32; break; } - o_bps=sh_video->fps*sh_video->disp_w*sh_video->disp_h*bpp/8; + o_bps=sh_video->fps*sh_video->src_w*sh_video->src_h*bpp/8; MSG_OK("[VC] %s decoder: [%s] drv:%s.%s (%dx%d (aspect %g) %4.2ffps\n" ,video_codec?"Forcing":"Selected" ,sh_video->codec->codec_name ,mpvdec->info->driver_name ,sh_video->codec->dll_name - ,sh_video->disp_w - ,sh_video->disp_h + ,sh_video->src_w + ,sh_video->src_h ,sh_video->aspect ,sh_video->fps); // Yeah! We got it! Modified: mplayerxp/libmpcodecs/vd.c =================================================================== --- mplayerxp/libmpcodecs/vd.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd.c 2012-10-26 10:04:44 UTC (rev 216) @@ -108,16 +108,16 @@ vf_instance_t* vf=sh->vfilter,*sc=NULL; int palette=0; - if(!(sh->disp_w && sh->disp_h)) + if(!(sh->src_w && sh->src_h)) MSG_WARN( - "VDec: driver %s didn't set sh->disp_w and sh->disp_h, trying to workaround!\n" + "VDec: driver %s didn't set sh->src_w and sh->src_h, trying to workaround!\n" ,sh->codec->codec_name); /* XXX: HACK, if sh->disp_* aren't set, * but we have w and h, set them :: atmos */ - if(!sh->disp_w && w) - sh->disp_w=w; - if(!sh->disp_h && h) - sh->disp_h=h; + if(!sh->src_w && w) + sh->src_w=w; + if(!sh->src_h && h) + sh->src_h=h; MSG_V("VDec: vo config request - %d x %d\n", w,h); @@ -211,13 +211,13 @@ if(!vo_conf.vidmode){ if(!screen_size_x) screen_size_x=1; if(!screen_size_y) screen_size_y=1; - if(screen_size_x<=8) screen_size_x*=sh->disp_w; - if(screen_size_y<=8) screen_size_y*=sh->disp_h; + if(screen_size_x<=8) screen_size_x*=sh->src_w; + if(screen_size_y<=8) screen_size_y*=sh->src_h; } } else { // check source format aspect, calculate prescale ::atmos - screen_size_x=sh->disp_w; - screen_size_y=sh->disp_h; + screen_size_x=sh->src_w; + screen_size_y=sh->src_h; if(vo_conf.screen_size_xy>=0.001){ if(vo_conf.screen_size_xy<=8){ // -xy means x+y scale @@ -226,7 +226,7 @@ } else { // -xy means forced width while keeping correct aspect screen_size_x=vo_conf.screen_size_xy; - screen_size_y=vo_conf.screen_size_xy*sh->disp_h/sh->disp_w; + screen_size_y=vo_conf.screen_size_xy*sh->src_h/sh->src_w; } } if(sh->aspect>0.01){ @@ -238,8 +238,8 @@ if(_w<screen_size_x || vo_conf.screen_size_xy>8){ screen_size_y=(int)((float)screen_size_x*(1.0/sh->aspect)); screen_size_y+=screen_size_y%2; // round - if(screen_size_y<sh->disp_h) // Do not downscale verticaly - screen_size_y=sh->disp_h; + if(screen_size_y<sh->src_h) // Do not downscale verticaly + screen_size_y=sh->src_h; } else screen_size_x=_w; // keep new width } else { MSG_V("Movie-Aspect is undefined - no prescaling applied.\n"); @@ -247,13 +247,13 @@ } MSG_V("vf->config(%dx%d->%dx%d,flags=0x%x,'%s',%s)\n", - sh->disp_w,sh->disp_h, + sh->src_w,sh->src_h, screen_size_x,screen_size_y, vo_data->flags, "MPlayerXP",vo_format_name(out_fmt)); MSG_DBG2("vf configuring: %s\n",vf->info->name); - if(vf->config(vf,sh->disp_w,sh->disp_h, + if(vf->config(vf,sh->src_w,sh->src_h, screen_size_x,screen_size_y, vo_data->flags, out_fmt,tune)==0){ @@ -262,7 +262,7 @@ return 0; } MSG_DBG2("vf->config(%dx%d->%dx%d,flags=%d,'%s',%p)\n", - sh->disp_w,sh->disp_h, + sh->src_w,sh->src_h, screen_size_x,screen_size_y, vo_data->flags, vo_format_name(out_fmt),tune); Modified: mplayerxp/libmpcodecs/vd_divx4.c =================================================================== --- mplayerxp/libmpcodecs/vd_divx4.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_divx4.c 2012-10-26 10:04:44 UTC (rev 216) @@ -190,7 +190,7 @@ priv_t*p; int bits=12; if(!load_lib("libdivx"SLIBSUFFIX)) return 0; - if(!(mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL))) return 0; + if(!(mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL))) return 0; switch(sh->codec->outfmt[sh->outfmtidx]){ case IMGFMT_YV12: case IMGFMT_I420: @@ -202,19 +202,19 @@ if(!(p=malloc(sizeof(priv_t)))) { MSG_ERR("Out of memory\n"); return 0; } sh->context=p; memset(p,0,sizeof(priv_t)); - if(!(p->decoder=getDecore_ptr(sh->format))) { - char *p=(char *)&(sh->format); + if(!(p->decoder=getDecore_ptr(sh->fourcc))) { + char *p=(char *)&(sh->fourcc); MSG_ERR("Can't find decoder for %c%c%c%c fourcc\n",p[0],p[1],p[2],p[3]); return 0; } dinit.formatOut.fourCC=sh->codec->outfmt[sh->outfmtidx]; dinit.formatOut.bpp=bits; - dinit.formatOut.width=sh->disp_w; - dinit.formatOut.height=sh->disp_h; + dinit.formatOut.width=sh->src_w; + dinit.formatOut.height=sh->src_h; dinit.formatOut.pixelAspectX=1; dinit.formatOut.pixelAspectY=1; - dinit.formatOut.sizeMax=sh->disp_w*sh->disp_h*bits; - dinit.formatIn.fourCC=sh->format; + dinit.formatOut.sizeMax=sh->src_w*sh->src_h*bits; + dinit.formatIn.fourCC=sh->fourcc; dinit.formatIn.framePeriod=sh->fps; if(p->decoder(NULL, DEC_OPT_INIT, (any_t*) &p->pHandle, &dinit)!=DEC_OK) { char *p=(char *)&(dinit.formatOut); @@ -243,7 +243,7 @@ if(len<=0) return NULL; // skipped frame mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_PRESERVE | MP_IMGFLAG_ACCEPT_WIDTH, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; decFrame.bitstream.pBuff = data; Modified: mplayerxp/libmpcodecs/vd_dmo.c =================================================================== --- mplayerxp/libmpcodecs/vd_dmo.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_dmo.c 2012-10-26 10:04:44 UTC (rev 216) @@ -53,7 +53,7 @@ "package from: ftp://mplayerhq.hu/MPlayer/releases/w32codec.tar.bz2!\n"); return 0; } - if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL)) return 0; + if(!mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL)) return 0; out_fmt=sh->codec->outfmt[sh->outfmtidx]; switch(out_fmt){ case IMGFMT_YUY2: @@ -90,7 +90,7 @@ } mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0 /*MP_IMGFLAG_ACCEPT_STRIDE*/, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; if(!mpi){ // temporary! Modified: mplayerxp/libmpcodecs/vd_dshow.c =================================================================== --- mplayerxp/libmpcodecs/vd_dshow.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_dshow.c 2012-10-26 10:04:44 UTC (rev 216) @@ -68,7 +68,7 @@ MSG_HINT("package from: ftp://mplayerhq.hu/MPlayer/releases/w32codec.zip !\n"); return 0; } - if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL)) return 0; + if(!mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL)) return 0; out_fmt=sh->codec->outfmt[sh->outfmtidx]; switch(out_fmt){ case IMGFMT_YUY2: @@ -106,7 +106,7 @@ } mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0 /*MP_IMGFLAG_ACCEPT_STRIDE*/, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; DS_VideoDecoder_DecodeInternal(sh->context, data, len, sh->ds->flags&1, mpi->planes[0]); Modified: mplayerxp/libmpcodecs/vd_ffmpeg.c =================================================================== --- mplayerxp/libmpcodecs/vd_ffmpeg.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_ffmpeg.c 2012-10-26 10:04:44 UTC (rev 216) @@ -206,10 +206,10 @@ vfi.pitch[1]= vfi.pitch[2]=16; } - sh->disp_w=w;//(w+valign)&(~valign); - sh->disp_h=(h+halign)&(~halign); + sh->src_w=w;//(w+valign)&(~valign); + sh->src_h=(h+halign)&(~halign); vdff_ctx->vo_inited=1; - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,&vfi); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,&vfi); } return 1; } @@ -246,12 +246,12 @@ #ifdef CODEC_FLAG_NOT_TRUNCATED vdff_ctx->ctx->flags|= CODEC_FLAG_NOT_TRUNCATED; #endif - vdff_ctx->ctx->width = sh->disp_w; - vdff_ctx->ctx->height= sh->disp_h; + vdff_ctx->ctx->width = sh->src_w; + vdff_ctx->ctx->height= sh->src_h; // vdff_ctx->ctx->error_recognition= lavc_param_error_resilience; vdff_ctx->ctx->error_concealment= lavc_param_error_concealment; vdff_ctx->ctx->debug= lavc_param_debug; - vdff_ctx->ctx->codec_tag= sh->format; + vdff_ctx->ctx->codec_tag= sh->fourcc; vdff_ctx->ctx->stream_codec_tag=sh->video.fccHandler; vdff_ctx->ctx->idct_algo=0; /*auto*/ #if 0 @@ -279,8 +279,8 @@ /* Pegasus MJPEG stores it also in AVI header, but it uses the common MJPG fourcc :( */ if (sh->bih && (sh->bih->biSize != sizeof(BITMAPINFOHEADER)) && - (sh->format == mmioFOURCC('A','V','R','n') || - sh->format == mmioFOURCC('M','J','P','G'))) + (sh->fourcc == mmioFOURCC('A','V','R','n') || + sh->fourcc == mmioFOURCC('M','J','P','G'))) { // vdff_ctx->ctx->flags |= CODEC_FLAG_EXTERN_HUFF; vdff_ctx->ctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER); @@ -288,11 +288,11 @@ memcpy(vdff_ctx->ctx->extradata, sh->bih+sizeof(BITMAPINFOHEADER), vdff_ctx->ctx->extradata_size); } - if( sh->format == mmioFOURCC('R', 'V', '1', '0') - || sh->format == mmioFOURCC('R', 'V', '1', '3') - || sh->format == mmioFOURCC('R', 'V', '2', '0') - || sh->format == mmioFOURCC('R', 'V', '3', '0') - || sh->format == mmioFOURCC('R', 'V', '4', '0')) + if( sh->fourcc == mmioFOURCC('R', 'V', '1', '0') + || sh->fourcc == mmioFOURCC('R', 'V', '1', '3') + || sh->fourcc == mmioFOURCC('R', 'V', '2', '0') + || sh->fourcc == mmioFOURCC('R', 'V', '3', '0') + || sh->fourcc == mmioFOURCC('R', 'V', '4', '0')) { vdff_ctx->ctx->extradata_size= 8; vdff_ctx->ctx->extradata = malloc(vdff_ctx->ctx->extradata_size); @@ -300,7 +300,7 @@ /* only 1 packet per frame & sub_id from fourcc */ ((uint32_t*)vdff_ctx->ctx->extradata)[0] = 0; ((uint32_t*)vdff_ctx->ctx->extradata)[1] = - (sh->format == mmioFOURCC('R', 'V', '1', '3')) ? 0x10003001 : 0x10000000; + (sh->fourcc == mmioFOURCC('R', 'V', '1', '3')) ? 0x10003001 : 0x10000000; } else { /* has extra slice header (demux_rm or rm->avi streamcopy) */ unsigned int* extrahdr=(unsigned int*)(sh->bih+1); @@ -309,23 +309,23 @@ } } if (sh->bih && (sh->bih->biSize != sizeof(BITMAPINFOHEADER)) && - (sh->format == mmioFOURCC('M','4','S','2') || - sh->format == mmioFOURCC('M','P','4','S') || - sh->format == mmioFOURCC('H','F','Y','U') || - sh->format == mmioFOURCC('F','F','V','H') || - sh->format == mmioFOURCC('W','M','V','2') || - sh->format == mmioFOURCC('W','M','V','3') || - sh->format == mmioFOURCC('A','S','V','1') || - sh->format == mmioFOURCC('A','S','V','2') || - sh->format == mmioFOURCC('V','S','S','H') || - sh->format == mmioFOURCC('M','S','Z','H') || - sh->format == mmioFOURCC('Z','L','I','B') || - sh->format == mmioFOURCC('M','P','4','V') || - sh->format == mmioFOURCC('F','L','I','C') || - sh->format == mmioFOURCC('S','N','O','W') || - sh->format == mmioFOURCC('a','v','c','1') || - sh->format == mmioFOURCC('L','O','C','O') || - sh->format == mmioFOURCC('t','h','e','o') + (sh->fourcc == mmioFOURCC('M','4','S','2') || + sh->fourcc == mmioFOURCC('M','P','4','S') || + sh->fourcc == mmioFOURCC('H','F','Y','U') || + sh->fourcc == mmioFOURCC('F','F','V','H') || + sh->fourcc == mmioFOURCC('W','M','V','2') || + sh->fourcc == mmioFOURCC('W','M','V','3') || + sh->fourcc == mmioFOURCC('A','S','V','1') || + sh->fourcc == mmioFOURCC('A','S','V','2') || + sh->fourcc == mmioFOURCC('V','S','S','H') || + sh->fourcc == mmioFOURCC('M','S','Z','H') || + sh->fourcc == mmioFOURCC('Z','L','I','B') || + sh->fourcc == mmioFOURCC('M','P','4','V') || + sh->fourcc == mmioFOURCC('F','L','I','C') || + sh->fourcc == mmioFOURCC('S','N','O','W') || + sh->fourcc == mmioFOURCC('a','v','c','1') || + sh->fourcc == mmioFOURCC('L','O','C','O') || + sh->fourcc == mmioFOURCC('t','h','e','o') )) { vdff_ctx->ctx->extradata_size = sh->bih->biSize-sizeof(BITMAPINFOHEADER); @@ -333,7 +333,7 @@ memcpy(vdff_ctx->ctx->extradata, sh->bih+1, vdff_ctx->ctx->extradata_size); } if (sh->ImageDesc && - sh->format == mmioFOURCC('S','V','Q','3')){ + sh->fourcc == mmioFOURCC('S','V','Q','3')){ vdff_ctx->ctx->extradata_size = *(int*)sh->ImageDesc; vdff_ctx->ctx->extradata = malloc(vdff_ctx->ctx->extradata_size); memcpy(vdff_ctx->ctx->extradata, ((int*)sh->ImageDesc)+1, vdff_ctx->ctx->extradata_size); @@ -380,7 +380,7 @@ } MSG_V("INFO: libavcodec.so (%06X) video codec[%c%c%c%c] init OK!\n" ,avc_version - ,((char *)&sh->format)[0],((char *)&sh->format)[1],((char *)&sh->format)[2],((char *)&sh->format)[3]); + ,((char *)&sh->fourcc)[0],((char *)&sh->fourcc)[1],((char *)&sh->fourcc)[2],((char *)&sh->fourcc)[3]); if(npp_options) { pp_flags=0; @@ -408,10 +408,10 @@ } if(pp_flags) { - ppContext=pp2_get_context(sh->disp_w,sh->disp_h,pp_flags); + ppContext=pp2_get_context(sh->src_w,sh->src_h,pp_flags); } } - return ff_config_vo(sh,sh->disp_w,sh->disp_h); + return ff_config_vo(sh,sh->src_w,sh->src_h); } // uninit driver @@ -663,10 +663,10 @@ /* if codec is capable DR1 if sh->vfilter==vf_vo (DR1 is meaningless into temp buffer) - It always happens with (vidix+bus mastering), (if (disp_w%16==0)) with xv + It always happens with (vidix+bus mastering), (if (src_w%16==0)) with xv */ has_b_frames=vdff_ctx->ctx->has_b_frames|| - sh->format==0x10000001 || /* mpeg1 may have b frames */ + sh->fourcc==0x10000001 || /* mpeg1 may have b frames */ vdff_ctx->lavc_codec->id==CODEC_ID_SVQ3|| 1; mpi= mpcodecs_get_image(sh,has_b_frames?MP_IMGTYPE_IPB:MP_IMGTYPE_IP,MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_PREFER_ALIGNED_STRIDE|MP_IMGFLAG_READABLE|MP_IMGFLAG_PRESERVE, @@ -680,11 +680,11 @@ vdff_ctx->use_slices=0; } if(vdff_ctx->use_slices) vdff_ctx->use_dr1=0; - if( sh->format == mmioFOURCC('R', 'V', '1', '0') - || sh->format == mmioFOURCC('R', 'V', '1', '3') - || sh->format == mmioFOURCC('R', 'V', '2', '0') - || sh->format == mmioFOURCC('R', 'V', '3', '0') - || sh->format == mmioFOURCC('R', 'V', '4', '0')) + if( sh->fourcc == mmioFOURCC('R', 'V', '1', '0') + || sh->fourcc == mmioFOURCC('R', 'V', '1', '3') + || sh->fourcc == mmioFOURCC('R', 'V', '2', '0') + || sh->fourcc == mmioFOURCC('R', 'V', '3', '0') + || sh->fourcc == mmioFOURCC('R', 'V', '4', '0')) if(sh->bih->biSize==sizeof(*sh->bih)+8){ int i; dp_hdr_t *hdr= (dp_hdr_t*)data; @@ -711,7 +711,7 @@ } if(!(flags&3) && vdff_ctx->use_slices) { - mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_DRAW_CALLBACK|MP_IMGFLAG_DIRECT,sh->disp_w, sh->disp_h); + mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_DRAW_CALLBACK|MP_IMGFLAG_DIRECT,sh->src_w, sh->src_h); vdff_ctx->mpi = mpi; vdff_ctx->frame_number++; vdff_ctx->ctx->draw_horiz_band=draw_slice; @@ -735,7 +735,7 @@ if(!got_picture) return NULL; // skipped image if(!vdff_ctx->ctx->draw_horiz_band) { - mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,sh->disp_w,sh->disp_h); + mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_ACCEPT_STRIDE,sh->src_w,sh->src_h); if(!mpi){ // temporary! MSG_ERR("couldn't allocate image for ffmpeg codec\n"); return NULL; Modified: mplayerxp/libmpcodecs/vd_huffyuv.c =================================================================== --- mplayerxp/libmpcodecs/vd_huffyuv.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_huffyuv.c 2012-10-26 10:04:44 UTC (rev 216) @@ -317,7 +317,7 @@ switch (hc->bitmaptype) { case BMPTYPE_RGB: case BMPTYPE_YUV: - vo_ret = mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + vo_ret = mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); break; case BMPTYPE_RGBA: MSG_ERR( "[HuffYUV] RGBA not supported yet.\n"); @@ -517,8 +517,8 @@ unsigned char *abovebuf = hc->abovebuf1; unsigned char *curbuf = hc->abovebuf2; unsigned char *outptr; - int width = sh->disp_w; // Real image width - int height = sh->disp_h; // Real image height + int width = sh->src_w; // Real image width + int height = sh->src_h; // Real image height int bgr32; // skipped frame @@ -527,9 +527,9 @@ /* Do not accept stride for rgb, it gives me wrong output :-( */ if (hc->bitmaptype == BMPTYPE_YUV) - mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,sh->disp_w, sh->disp_h); + mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE,sh->src_w, sh->src_h); else - mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0,sh->disp_w, sh->disp_h); + mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0,sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; outptr = mpi->planes[0]; // Output image pointer Modified: mplayerxp/libmpcodecs/vd_libdv.c =================================================================== --- mplayerxp/libmpcodecs/vd_libdv.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_libdv.c 2012-10-26 10:04:44 UTC (rev 216) @@ -53,7 +53,7 @@ static int init(sh_video_t *sh) { sh->context = (any_t*)init_global_rawdv_decoder(); - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); } // uninit driver @@ -73,7 +73,7 @@ dv_parse_header(decoder, data); - mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, sh->disp_w, sh->disp_h); + mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE, sh->src_w, sh->src_h); if(!mpi){ // temporary! MSG_ERR("couldn't allocate image for stderr codec\n"); Modified: mplayerxp/libmpcodecs/vd_libmpeg2.c =================================================================== --- mplayerxp/libmpcodecs/vd_libmpeg2.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_libmpeg2.c 2012-10-26 10:04:44 UTC (rev 216) @@ -188,7 +188,7 @@ if(!load_lib("libmpeg2"SLIBSUFFIX)) return 0; priv=sh->context=malloc(sizeof(priv_t)); if(!(priv->mpeg2dec=mpeg2_init(mplayer_accel))) return 0; - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); } // uninit driver Modified: mplayerxp/libmpcodecs/vd_mpegpes.c =================================================================== --- mplayerxp/libmpcodecs/vd_mpegpes.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_mpegpes.c 2012-10-26 10:04:44 UTC (rev 216) @@ -26,7 +26,7 @@ // init driver static int init(sh_video_t *sh){ - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); } // uninit driver @@ -37,7 +37,7 @@ static mp_image_t* decode(sh_video_t *sh,any_t* data,int len,int flags){ mp_image_t* mpi; static vo_mpegpes_t packet; - mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0,sh->disp_w, sh->disp_h); + mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0,sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; packet.data=data; packet.size=len-4; Modified: mplayerxp/libmpcodecs/vd_nuv.c =================================================================== --- mplayerxp/libmpcodecs/vd_nuv.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_nuv.c 2012-10-26 10:04:44 UTC (rev 216) @@ -33,7 +33,7 @@ // init driver static int init(sh_video_t *sh){ - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); } // uninit driver @@ -46,10 +46,10 @@ if(len<=0) return NULL; // skipped frame mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; - decode_nuv(data, len, mpi->planes[0], sh->disp_w, sh->disp_h); + decode_nuv(data, len, mpi->planes[0], sh->src_w, sh->src_h); return mpi; } Modified: mplayerxp/libmpcodecs/vd_qtvideo.c =================================================================== --- mplayerxp/libmpcodecs/vd_qtvideo.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_qtvideo.c 2012-10-26 10:04:44 UTC (rev 216) @@ -196,7 +196,7 @@ (((unsigned char)'Q')<<8)| (((unsigned char)'3')); #else - desc.componentSubType = bswap_32(sh->format); + desc.componentSubType = bswap_32(sh->fourcc); #endif desc.componentManufacturer=0; desc.componentFlags=0; @@ -227,8 +227,8 @@ //make a yuy2 gworld OutBufferRect.top=0; OutBufferRect.left=0; - OutBufferRect.right=sh->disp_w; - OutBufferRect.bottom=sh->disp_h; + OutBufferRect.right=sh->src_w; + OutBufferRect.bottom=sh->src_h; //Fill the imagedescription for our SVQ3 frame //we can probably get this from Demuxer @@ -292,10 +292,10 @@ } MSG_V("imgfmt: %s qt_imgfmt: %.4s\n", vo_format_name(imgfmt), &qt_imgfmt); sh->context = qt_imgfmt; - if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL)) return 0; + if(!mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL)) return 0; } #else - if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL)) return 0; + if(!mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL)) return 0; #endif return 1; @@ -318,7 +318,7 @@ if(len<=0) return NULL; // skipped frame mpi=mpcodecs_get_image(sh, MP_IMGTYPE_STATIC, MP_IMGFLAG_PRESERVE, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; decpar.data = (char*)data; Modified: mplayerxp/libmpcodecs/vd_raw.c =================================================================== --- mplayerxp/libmpcodecs/vd_raw.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_raw.c 2012-10-26 10:04:44 UTC (rev 216) @@ -31,18 +31,18 @@ // init driver static int init(sh_video_t *sh){ // set format fourcc for raw RGB: - if(sh->format==0){ + if(sh->fourcc==0){ switch(sh->bih->biBitCount){ - case 8: sh->format=IMGFMT_BGR8; break; + case 8: sh->fourcc=IMGFMT_BGR8; break; case 15: - case 16: sh->format=IMGFMT_BGR15; break; - case 24: sh->format=IMGFMT_BGR24; break; - case 32: sh->format=IMGFMT_BGR32; break; + case 16: sh->fourcc=IMGFMT_BGR15; break; + case 24: sh->fourcc=IMGFMT_BGR24; break; + case 32: sh->fourcc=IMGFMT_BGR32; break; default: MSG_WARN("RAW: depth %d not supported\n",sh->bih->biBitCount); } } - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); } // uninit driver @@ -55,7 +55,7 @@ if(len<=0) return NULL; // skipped frame mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; if(mpi->flags&MP_IMGFLAG_PLANAR){ Modified: mplayerxp/libmpcodecs/vd_real.c =================================================================== --- mplayerxp/libmpcodecs/vd_real.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_real.c 2012-10-26 10:04:44 UTC (rev 216) @@ -152,7 +152,7 @@ // we export codec id and sub-id from demuxer in bitmapinfohdr: unsigned int* extrahdr=(unsigned int*)(sh->bih+1); struct rv_init_t init_data={ - 11, sh->disp_w, sh->disp_h,0,0,extrahdr[0], + 11, sh->src_w, sh->src_h,0,0,extrahdr[0], 1,extrahdr[1]}; // rv30 MSG_V("realvideo codec id: 0x%08X sub-id: 0x%08X\n",extrahdr[1],extrahdr[0]); @@ -161,7 +161,7 @@ return 0; } // only I420 supported - if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL)) return 0; + if(!mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL)) return 0; // init codec: sh->context=NULL; result=(*rvyuv_init)(&init_data, &sh->context); @@ -171,7 +171,7 @@ } // setup rv30 codec (codec sub-type and image dimensions): if(extrahdr[1]>=0x20200002){ - uint32_t cmsg24[4]={sh->disp_w,sh->disp_h,sh->disp_w,sh->disp_h}; + uint32_t cmsg24[4]={sh->src_w,sh->src_h,sh->src_w,sh->src_h}; /* FIXME: Broken for 64-bit pointers */ cmsg_data_t cmsg_data={0x24,1+(extrahdr[1]&7), &cmsg24[0]}; (*rvyuv_custom_message)(&cmsg_data,sh->context); @@ -209,7 +209,7 @@ if(len<=0 || flags&2) return NULL; // skipped frame || hardframedrop mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0 /*MP_IMGFLAG_ACCEPT_STRIDE*/, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; result=(*rvyuv_transform)(dp_data, mpi->planes[0], &transform_in, Modified: mplayerxp/libmpcodecs/vd_theora.c =================================================================== --- mplayerxp/libmpcodecs/vd_theora.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_theora.c 2012-10-26 10:04:44 UTC (rev 216) @@ -122,7 +122,7 @@ MSG_V("INFO: Theora video init ok!\n"); - return mpcodecs_config_vo (sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo (sh,sh->src_w,sh->src_h,NULL); } /* @@ -172,7 +172,7 @@ return 0; } - mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0,sh->disp_w, sh->disp_h); + mpi = mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, 0,sh->src_w, sh->src_h); mpi->planes[0]=yuv.y; mpi->stride[0]=yuv.y_stride; Modified: mplayerxp/libmpcodecs/vd_vfw.c =================================================================== --- mplayerxp/libmpcodecs/vd_vfw.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_vfw.c 2012-10-26 10:04:44 UTC (rev 216) @@ -116,7 +116,7 @@ ex = priv->ex; MSG_V("======= Win32 (VFW) VIDEO Codec init =======\n"); - priv->hic = ICOpen(IC_FCCTYPE, sh_video->format, ICMODE_DECOMPRESS); + priv->hic = ICOpen(IC_FCCTYPE, sh_video->fourcc, ICMODE_DECOMPRESS); if(!priv->hic){ MSG_ERR("ICOpen failed! unknown codec / wrong parameters?\n"); return 0; @@ -268,7 +268,7 @@ priv->ex = vfw_ex; if(!init_vfw_video_codec(sh)) return 0; MSG_V("INFO: Win32/VFW init OK!\n"); - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); } // uninit driver @@ -290,7 +290,7 @@ mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_WIDTH, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; // set stride: (trick discovered by Andreas Ackermann - thanx!) Modified: mplayerxp/libmpcodecs/vd_xanim.c =================================================================== --- mplayerxp/libmpcodecs/vd_xanim.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_xanim.c 2012-10-26 10:04:44 UTC (rev 216) @@ -393,8 +393,8 @@ codec_hdr.description = vidinfo->codec->s_info; codec_hdr.compression = bswap_32(vidinfo->bih->biCompression); codec_hdr.decoder = NULL; - codec_hdr.x = vidinfo->bih->biWidth; /* ->disp_w */ - codec_hdr.y = vidinfo->bih->biHeight; /* ->disp_h */ + codec_hdr.x = vidinfo->bih->biWidth; /* ->src_w */ + codec_hdr.y = vidinfo->bih->biHeight; /* ->src_h */ /* extra fields to store palette */ codec_hdr.avi_ctab_flag = 0; codec_hdr.avi_read_ext = NULL; @@ -908,7 +908,7 @@ // init driver static int init(sh_video_t *sh){ if(xacodec_init_video(sh,sh->codec->outfmt[sh->outfmtidx])) - return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,NULL); + return mpcodecs_config_vo(sh,sh->src_w,sh->src_h,NULL); return 0; } @@ -928,7 +928,7 @@ if(!image) return NULL; mpi=mpcodecs_get_image(sh, MP_IMGTYPE_EXPORT, MP_IMGFLAG_PRESERVE, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(!mpi) return NULL; mpi->planes[0]=image->planes[0]; Modified: mplayerxp/libmpcodecs/vd_xvid.c =================================================================== --- mplayerxp/libmpcodecs/vd_xvid.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpcodecs/vd_xvid.c 2012-10-26 10:04:44 UTC (rev 216) @@ -347,7 +347,7 @@ * VOL encountered (don't trust containers' width and height) */ dec_p.width = dec_p.height= 0; - dec_p.fourcc= sh->format; + dec_p.fourcc= sh->fourcc; dec_p.num_threads=xvid_gbl_info.num_threads; /* Get a decoder instance */ @@ -380,7 +380,7 @@ p->img_type = MP_IMGTYPE_TEMP; break; } - return mpcodecs_config_vo(sh, sh->disp_w, sh->disp_h, NULL); + return mpcodecs_config_vo(sh, sh->src_w, sh->src_h, NULL); } // uninit driver @@ -424,7 +424,7 @@ if(flags&3) dec.general |= XVID_DEC_DROP; dec.output.csp = p->cs; mpi = mpcodecs_get_image(sh, p->img_type, MP_IMGFLAG_ACCEPT_STRIDE, - sh->disp_w, sh->disp_h); + sh->src_w, sh->src_h); if(mpi->flags&MP_IMGFLAG_DIRECT) mpi->flags|=MP_IMGFLAG_RENDERED; if(p->cs != XVID_CSP_INTERNAL) { dec.output.plane[0] = mpi->planes[0]; Modified: mplayerxp/libmpdemux/demux_bmp.c =================================================================== --- mplayerxp/libmpdemux/demux_bmp.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_bmp.c 2012-10-26 10:04:44 UTC (rev 216) @@ -154,12 +154,12 @@ switch(img->format->BitsPerPixel) { default: - case 8: sh_video->format = npal_colors > 0 ? IMGFMT_BGR24 : + case 8: sh_video->fourcc = npal_colors > 0 ? IMGFMT_BGR24 : img->format->Bshift < img->format->Rshift ? IMGFMT_BGR8 : IMGFMT_RGB8; break; - case 15: sh_video->format = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR15 : IMGFMT_RGB15; break; - case 16: sh_video->format = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR16 : IMGFMT_RGB16; break; - case 24: sh_video->format = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR24 : IMGFMT_RGB24; break; - case 32: sh_video->format = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR32 : IMGFMT_RGB32; break; + case 15: sh_video->fourcc = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR15 : IMGFMT_RGB15; break; + case 16: sh_video->fourcc = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR16 : IMGFMT_RGB16; break; + case 24: sh_video->fourcc = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR24 : IMGFMT_RGB24; break; + case 32: sh_video->fourcc = img->format->Bshift < img->format->Rshift ? IMGFMT_BGR32 : IMGFMT_RGB32; break; } // custom fourcc for internal MPlayer use MSG_V("demux_bmp: bpp=%u w=%u h=%u RGB_fmt(loss: %u %u %u %u shift: %u %u %u %u mask %u %u %u %u) palette=%u\n" @@ -177,8 +177,8 @@ ,img->format->Gmask ,img->format->Rmask ,npal_colors); - sh_video->disp_w = img->w; - sh_video->disp_h = img->h; + sh_video->src_w = img->w; + sh_video->src_h = img->h; sh_video->is_static = 1; // get the speed sh_video->fps = 2; @@ -273,10 +273,10 @@ bmp_image->image_offset = data_offset; // custom fourcc for internal MPlayer use - sh_video->format = sh_video->bih->biCompression; + sh_video->fourcc = sh_video->bih->biCompression; - sh_video->disp_w = sh_video->bih->biWidth; - sh_video->disp_h = sh_video->bih->biHeight; + sh_video->src_w = sh_video->bih->biWidth; + sh_video->src_h = sh_video->bih->biHeight; // get the speed sh_video->is_static = 1; Modified: mplayerxp/libmpdemux/demux_dv.c =================================================================== --- mplayerxp/libmpdemux/demux_dv.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_dv.c 2012-10-26 10:04:44 UTC (rev 216) @@ -175,10 +175,10 @@ // custom fourcc for internal MPlayer use // sh_video->format = mmioFOURCC('R', 'A', 'D', 'V'); - sh_video->format = mmioFOURCC('D', 'V', 'S', 'D'); + sh_video->fourcc = mmioFOURCC('D', 'V', 'S', 'D'); - sh_video->disp_w = dv_decoder->width; - sh_video->disp_h = dv_decoder->height; + sh_video->src_w = dv_decoder->width; + sh_video->src_h = dv_decoder->height; mp_msg(MSGT_DEMUXER,MSGL_V,"demux_open_rawdv() frame_size: %d w: %d h: %d dif_seq: %d system: %d\n",dv_decoder->frame_size,dv_decoder->width, dv_decoder->height,dv_decoder->num_dif_seqs,dv_decoder->system); sh_video->fps= (dv_decoder->system==e_dv_system_525_60?29.97:25); @@ -190,7 +190,7 @@ sh_video->bih->biHeight = dv_decoder->height; sh_video->bih->biPlanes=1; sh_video->bih->biBitCount=24; - sh_video->bih->biCompression=sh_video->format; // "DVSD" + sh_video->bih->biCompression=sh_video->fourcc; // "DVSD" sh_video->bih->biSizeImage=sh_video->bih->biWidth*sh_video->bih->biHeight*3; Modified: mplayerxp/libmpdemux/demux_film.c =================================================================== --- mplayerxp/libmpdemux/demux_film.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_film.c 2012-10-26 10:04:44 UTC (rev 216) @@ -137,7 +137,7 @@ else { // if the demuxer is dealing with CVID data, deal with it a special way - if (sh_video->format == mmioFOURCC('c', 'v', 'i', 'd')) + if (sh_video->fourcc == mmioFOURCC('c', 'v', 'i', 'd')) { if (film_data->film_version) length_fix_bytes = 2; @@ -265,12 +265,12 @@ demuxer->video->sh = sh_video; sh_video->ds = demuxer->video; - sh_video->format = video_format; - sh_video->disp_h = stream_read_dword(demuxer->stream); - sh_video->disp_w = stream_read_dword(demuxer->stream); + sh_video->fourcc= video_format; + sh_video->src_h = stream_read_dword(demuxer->stream); + sh_video->src_w = stream_read_dword(demuxer->stream); MSG_V( - " FILM video: %d x %d\n", sh_video->disp_w, - sh_video->disp_h); + " FILM video: %d x %d\n", sh_video->src_w, + sh_video->src_h); } else // skip height and width if no video Modified: mplayerxp/libmpdemux/demux_fli.c =================================================================== --- mplayerxp/libmpdemux/demux_fli.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_fli.c 2012-10-26 10:04:44 UTC (rev 216) @@ -125,19 +125,19 @@ sh_video->ds = demuxer->video; // custom fourcc for internal MPlayer use - sh_video->format = mmioFOURCC('F', 'L', 'I', 'C'); + sh_video->fourcc = mmioFOURCC('F', 'L', 'I', 'C'); - sh_video->disp_w = stream_read_word_le(demuxer->stream); - sh_video->disp_h = stream_read_word_le(demuxer->stream); + sh_video->src_w = stream_read_word_le(demuxer->stream); + sh_video->src_h = stream_read_word_le(demuxer->stream); // pass extradata to codec sh_video->bih = (BITMAPINFOHEADER*)header; sh_video->bih->biSize = sizeof(BITMAPINFOHEADER) + 128; - sh_video->bih->biCompression=sh_video->format; - sh_video->bih->biWidth=sh_video->disp_w; + sh_video->bih->biCompression=sh_video->fourcc; + sh_video->bih->biWidth=sh_video->src_w; sh_video->bih->biPlanes=0; sh_video->bih->biBitCount=0; /* depth */ - sh_video->bih->biHeight=sh_video->disp_h; + sh_video->bih->biHeight=sh_video->src_h; sh_video->bih->biSizeImage=sh_video->bih->biWidth*sh_video->bih->biHeight; // skip the video depth and flags stream_skip(demuxer->stream, 4); Modified: mplayerxp/libmpdemux/demux_lavf.c =================================================================== --- mplayerxp/libmpdemux/demux_lavf.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_lavf.c 2012-10-26 10:04:44 UTC (rev 216) @@ -354,8 +354,8 @@ bih->biSizeImage = bih->biWidth * bih->biHeight * bih->biBitCount/8; bih->biCompression= codec->codec_tag; sh_video->bih= bih; - sh_video->disp_w= codec->width; - sh_video->disp_h= codec->height; + sh_video->src_w= codec->width; + sh_video->src_h= codec->height; if (st->time_base.den) { /* if container has time_base, use that */ sh_video->video.dwRate= st->time_base.den; sh_video->video.dwScale= st->time_base.num; @@ -364,7 +364,7 @@ sh_video->video.dwScale= codec->time_base.num; } sh_video->fps=av_q2d(st->r_frame_rate); - sh_video->format = bih->biCompression; + sh_video->fourcc= bih->biCompression; sh_video->aspect= codec->width * codec->sample_aspect_ratio.num / (float)(codec->height * codec->sample_aspect_ratio.den); MSG_DBG2("aspect= %d*%d/(%d*%d)\n", Modified: mplayerxp/libmpdemux/demux_mkv.c =================================================================== --- mplayerxp/libmpdemux/demux_mkv.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_mkv.c 2012-10-26 10:04:44 UTC (rev 216) @@ -2241,27 +2241,27 @@ sh_v = new_sh_video_vid (demuxer, track->tnum, vid); sh_v->bih = bih; - sh_v->format = sh_v->bih->biCompression; + sh_v->fourcc = sh_v->bih->biCompression; if (track->v_frate == 0.0) track->v_frate = 25.0; sh_v->fps = track->v_frate; sh_v->aspect = 0; if (!track->realmedia) { - sh_v->disp_w = track->v_width; - sh_v->disp_h = track->v_height; + sh_v->src_w = track->v_width; + sh_v->src_h = track->v_height; if (track->v_dheight) sh_v->aspect = (float)track->v_dwidth / (float)track->v_dheight; } else { - // vd_realvid.c will set aspect to disp_w/disp_h and rederive - // disp_w and disp_h from the RealVideo stream contents returned + // vd_realvid.c will set aspect to src_w/src_h and rederive + // src_w and src_h from the RealVideo stream contents returned // by the Real DLLs. If DisplayWidth/DisplayHeight was not set in // the Matroska file then it has already been set to PixelWidth/Height // by check_track_information. - sh_v->disp_w=bih->biWidth; - sh_v->disp_h=bih->biHeight; + sh_v->src_w=bih->biWidth; + sh_v->src_h=bih->biHeight; } sh_v->ImageDesc = ImageDesc; MSG_V( "[mkv] Aspect: %f\n", sh_v->aspect); Modified: mplayerxp/libmpdemux/demux_mov.c =================================================================== --- mplayerxp/libmpdemux/demux_mov.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_mov.c 2012-10-26 10:04:44 UTC (rev 216) @@ -956,7 +956,7 @@ unsigned char *palette_map; sh_video_t* sh=new_sh_video(demuxer,priv->track_db); int depth; - sh->format=trak->fourcc; + sh->fourcc=trak->fourcc; /* crude video delay from editlist0 hack ::atm */ if(trak->editlist_size>=1) { @@ -1057,9 +1057,9 @@ if(esds.objectTypeId==MP4OTI_MPEG2VisualSimple || esds.objectTypeId==MP4OTI_MPEG2VisualMain || esds.objectTypeId==MP4OTI_MPEG2VisualSNR || esds.objectTypeId==MP4OTI_MPEG2VisualSpatial || esds.objectTypeId==MP4OTI_MPEG2VisualHigh || esds.objectTypeId==MP4OTI_MPEG2Visual422) - sh->format=mmioFOURCC('m', 'p', 'g', '2'); + sh->fourcc=mmioFOURCC('m', 'p', 'g', '2'); else if(esds.objectTypeId==MP4OTI_MPEG1Visual) - sh->format=mmioFOURCC('m', 'p', 'g', '1'); + sh->fourcc=mmioFOURCC('m', 'p', 'g', '1'); // dump away the codec specific configuration for the AAC decoder trak->stream_header_len = esds.decoderConfigLen; @@ -1121,13 +1121,13 @@ sh->fps=trak->timescale/ ((trak->durmap_size>=1)?(float)trak->durmap[0].dur:1); - sh->disp_w=trak->stdata[25]|(trak->stdata[24]<<8); - sh->disp_h=trak->stdata[27]|(trak->stdata[26]<<8); + sh->src_w=trak->stdata[25]|(trak->stdata[24]<<8); + sh->src_h=trak->stdata[27]|(trak->stdata[26]<<8); // if image size is zero, fallback to display size - if(!sh->disp_w && !sh->disp_h) { - sh->disp_w=trak->tkdata[77]|(trak->tkdata[76]<<8); - sh->disp_h=trak->tkdata[81]|(trak->tkdata[80]<<8); - } else if(sh->disp_w!=(trak->tkdata[77]|(trak->tkdata[76]<<8))){ + if(!sh->src_w && !sh->src_h) { + sh->src_w=trak->tkdata[77]|(trak->tkdata[76]<<8); + sh->src_h=trak->tkdata[81]|(trak->tkdata[80]<<8); + } else if(sh->src_w!=(trak->tkdata[77]|(trak->tkdata[76]<<8))){ // codec and display width differ... use display one for aspect sh->aspect=trak->tkdata[77]|(trak->tkdata[76]<<8); sh->aspect/=trak->tkdata[81]|(trak->tkdata[80]<<8); @@ -1247,14 +1247,14 @@ sh->bih->biSize=40; } } - sh->bih->biWidth=sh->disp_w; - sh->bih->biHeight=sh->disp_h; + sh->bih->biWidth=sh->src_w; + sh->bih->biHeight=sh->src_h; sh->bih->biPlanes=0; sh->bih->biBitCount=depth; sh->bih->biCompression=trak->fourcc; sh->bih->biSizeImage=sh->bih->biWidth*sh->bih->biHeight; - MSG_V( "Image size: %d x %d (%d bpp)\n",sh->disp_w,sh->disp_h,sh->bih->biBitCount); + MSG_V( "Image size: %d x %d (%d bpp)\n",sh->src_w,sh->src_h,sh->bih->biBitCount); if(trak->tkdata_len>81) MSG_V( "Display size: %d x %d\n", trak->tkdata[77]|(trak->tkdata[76]<<8), Modified: mplayerxp/libmpdemux/demux_mpg.c =================================================================== --- mplayerxp/libmpdemux/demux_mpg.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_mpg.c 2012-10-26 10:04:44 UTC (rev 216) @@ -371,7 +371,7 @@ if(priv && ds->sh) { sh_video_t *sh = (sh_video_t *)ds->sh; if(priv->es_map[id - 0x1B0]) { - sh->format = priv->es_map[id - 0x1B0]; + sh->fourcc = priv->es_map[id - 0x1B0]; MSG_DBG2("ASSIGNED TO STREAM %d CODEC %x\n", id, priv->es_map[id - 0x1B0]); } } @@ -405,7 +405,7 @@ dp->pts=pts/90000.0f; if(ds==demux->video) sh=(sh_video_t *)ds->sh; else sh=NULL; - dp->flags=sh?is_mpg_keyframe(sh->format,id,dp->buffer):DP_NONKEYFRAME; + dp->flags=sh?is_mpg_keyframe(sh->fourcc,id,dp->buffer):DP_NONKEYFRAME; dp->pos=demux->filepos; ds->asf_packet=dp; if (ds==ds->demuxer->sub) { @@ -581,13 +581,13 @@ } } i=sync_video_packet(d_video); - if(sh_video->format == VIDEO_MPEG4) { + if(sh_video->fourcc == VIDEO_MPEG4) { if(i==0x1B6) { //vop (frame) startcode int pos = videobuf_len; if(!read_video_packet(d_video)) break; // EOF if((videobuffer[pos+4] & 0x3F) == 0) break;//I-frame } - } else if(sh_video->format == VIDEO_H264){ + } else if(sh_video->fourcc == VIDEO_H264){ if((i & ~0x60) == 0x101 || (i & ~0x60) == 0x102 || (i & ~0x60) == 0x105) break; } else { //default VIDEO_MPEG1/VIDEO_MPEG2 if(i==0x1B3 || i==0x1B8) break; // found it! Modified: mplayerxp/libmpdemux/demux_mpxp64.c =================================================================== --- mplayerxp/libmpdemux/demux_mpxp64.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_mpxp64.c 2012-10-26 10:04:44 UTC (rev 216) @@ -225,9 +225,9 @@ demuxer->video->sh=sh; sh->ds=demuxer->video; sh->fps=(float)(priv->sprop[id].num_packets*1000.)/(priv->sprop[id].PlayDuration-priv->sprop[id].Preroll); - sh->format=sh->bih->biCompression; - sh->disp_w=sh->bih->biWidth; - sh->disp_h=sh->bih->biHeight; + sh->fourcc=sh->bih->biCompression; + sh->src_w=sh->bih->biWidth; + sh->src_h=sh->bih->biHeight; MSG_V("FPS: %f\n",sh->fps); break; case mmioFOURCC('v','p','r','p'): Modified: mplayerxp/libmpdemux/demux_nsv.c =================================================================== --- mplayerxp/libmpdemux/demux_nsv.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_nsv.c 2012-10-26 10:04:44 UTC (rev 216) @@ -130,7 +130,6 @@ ++priv->video_pack_no; return 1; - } @@ -142,51 +141,50 @@ unsigned char buf[10]; sh_video_t *sh_video = NULL; sh_audio_t *sh_audio = NULL; - - + nsv_priv_t * priv = malloc(sizeof(nsv_priv_t)); demuxer->priv=priv; priv->video_pack_no=0; /* disable seeking yet to be fixed*/ demuxer->flags &= ~(DEMUXF_SEEKABLE); - + stream_read(demuxer->stream,hdr,4); if(stream_eof(demuxer->stream)) return 0; - + /*** if we detected the file to be nsv and there was neither eof nor a header **** that means that its most likely a shoutcast stream so we will need to seek **** to the first occurance of the NSVs header ****/ if(!(hdr[0]==0x4E && hdr[1]==0x53 && hdr[2]==0x56)){ - // todo: replace this with a decent string search algo + // todo: replace this with a decent string search algo while(1){ stream_read(demuxer->stream,hdr,1); if(stream_eof(demuxer->stream)) return 0; if(hdr[0]!=0x4E) continue; - + stream_read(demuxer->stream,hdr+1,1); - + if(stream_eof(demuxer->stream)) return 0; if(hdr[1]!=0x53) continue; - + stream_read(demuxer->stream,hdr+2,1); - + if(stream_eof(demuxer->stream)) return 0; if(hdr[2]!=0x56) continue; - + stream_read(demuxer->stream,hdr+3,1); - + if(stream_eof(demuxer->stream)) return 0; if(hdr[3]!=0x73) continue; - + break; } } @@ -194,7 +192,7 @@ // NSV header! if(hdr[3]==0x73){ // NSVs - stream_read(demuxer->stream,hdr+4,17-4); + stream_read(demuxer->stream,hdr+4,17-4); } if(hdr[3]==0x66){ @@ -237,13 +235,13 @@ * video_read_properties() will choke */ sh_video->ds = demuxer->video; - + // bytes 4-7 video codec fourcc - priv->v_format = sh_video->format=mmioFOURCC(hdr[4],hdr[5],hdr[6],hdr[7]); - + priv->v_format = sh_video->fourcc=mmioFOURCC(hdr[4],hdr[5],hdr[6],hdr[7]); + // new video stream! parse header - sh_video->disp_w=hdr[12]|(hdr[13]<<8); - sh_video->disp_h=hdr[14]|(hdr[15]<<8); + sh_video->src_w=hdr[12]|(hdr[13]<<8); + sh_video->src_h=hdr[14]|(hdr[15]<<8); sh_video->bih=(BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER)); sh_video->bih->biSize=sizeof(BITMAPINFOHEADER); sh_video->bih->biPlanes=1; Modified: mplayerxp/libmpdemux/demux_nuv.c =================================================================== --- mplayerxp/libmpdemux/demux_nuv.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_nuv.c 2012-10-26 10:04:44 UTC (rev 216) @@ -240,10 +240,10 @@ sh_video->ds = demuxer->video; /* Custom fourcc for internal MPlayer use */ - sh_video->format = mmioFOURCC('N', 'U', 'V', '1'); + sh_video->fourcc = mmioFOURCC('N', 'U', 'V', '1'); - sh_video->disp_w = rtjpeg_fileheader.width; - sh_video->disp_h = rtjpeg_fileheader.height; + sh_video->src_w = rtjpeg_fileheader.width; + sh_video->src_h = rtjpeg_fileheader.height; /* NuppelVideo uses pixel aspect ratio here display aspect ratio is used. Modified: mplayerxp/libmpdemux/demux_ogg.c =================================================================== --- mplayerxp/libmpdemux/demux_ogg.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_ogg.c 2012-10-26 10:04:44 UTC (rev 216) @@ -537,7 +537,7 @@ // handled differently for each and every stream type. The joy! The joy! if(!os->flac && ((*pack->packet & PACKET_TYPE_HEADER) && (ds != d->audio || ( ((sh_audio_t*)ds->sh)->format != FOURCC_VORBIS || os->hdr_packets >= NUM_VORBIS_HDR_PACKETS ) ) && - (ds != d->video || (((sh_video_t*)ds->sh)->format != FOURCC_THEORA)))) + (ds != d->video || (((sh_video_t*)ds->sh)->fourcc != FOURCC_THEORA)))) return 0; // For vorbis packet the packet is the data, for other codec we must jump @@ -599,7 +599,7 @@ if(demuxer->video->id >= 0) { sid = demuxer->video->id; /* demux_ogg_read_packet needs decoder context for Theora streams */ - if (((sh_video_t*)demuxer->video->sh)->format == FOURCC_THEORA) + if (((sh_video_t*)demuxer->video->sh)->fourcc == FOURCC_THEORA) context = ((sh_video_t*)demuxer->video->sh)->context; } else { @@ -768,7 +768,7 @@ if(np == 0) { int len; buf = ogg_sync_buffer(sync,BLOCK_SIZE); - len = stream_read(s,buf,BLOCK_SIZE); + len = stream_read(s,buf,BLOCK_SIZE); if(len == 0 && s->eof) { goto err_out; } @@ -834,11 +834,11 @@ sh_v->context = NULL; sh_v->bih = (BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER)); sh_v->bih->biSize=sizeof(BITMAPINFOHEADER); - sh_v->bih->biCompression= sh_v->format = FOURCC_THEORA; + sh_v->bih->biCompression= sh_v->fourcc = FOURCC_THEORA; sh_v->fps = ((double)inf.fps_numerator)/ (double)inf.fps_denominator; - sh_v->disp_w = sh_v->bih->biWidth = inf.frame_width; - sh_v->disp_h = sh_v->bih->biHeight = inf.frame_height; + sh_v->src_w = sh_v->bih->biWidth = inf.frame_width; + sh_v->src_h = sh_v->bih->biHeight = inf.frame_height; sh_v->bih->biBitCount = 24; sh_v->bih->biPlanes = 3; sh_v->bih->biSizeImage = ((sh_v->bih->biBitCount/8) * @@ -878,11 +878,11 @@ sh_v->bih = (BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER)); sh_v->bih->biSize=sizeof(BITMAPINFOHEADER); sh_v->bih->biCompression= - sh_v->format = mmioFOURCC(pack.packet[68],pack.packet[69], + sh_v->fourcc = mmioFOURCC(pack.packet[68],pack.packet[69], pack.packet[70],pack.packet[71]); sh_v->fps = 1/(get_uint64(pack.packet+164)*0.0000001); - sh_v->disp_w = sh_v->bih->biWidth = get_uint32(pack.packet+176); - sh_v->disp_h = sh_v->bih->biHeight = get_uint32(pack.packet+180); + sh_v->src_w = sh_v->bih->biWidth = get_uint32(pack.packet+176); + sh_v->src_h = sh_v->bih->biHeight = get_uint32(pack.packet+180); sh_v->bih->biBitCount = get_uint16(pack.packet+182); if(!sh_v->bih->biBitCount) sh_v->bih->biBitCount=24; // hack, FIXME sh_v->bih->biPlanes=1; @@ -928,12 +928,12 @@ sh_v->bih = (BITMAPINFOHEADER*)calloc(1,sizeof(BITMAPINFOHEADER)); sh_v->bih->biSize=sizeof(BITMAPINFOHEADER); sh_v->bih->biCompression= - sh_v->format = mmioFOURCC(st->subtype[0],st->subtype[1], + sh_v->fourcc = mmioFOURCC(st->subtype[0],st->subtype[1], st->subtype[2],st->subtype[3]); sh_v->fps = 1.0/(get_uint64(&st->time_unit)*0.0000001); sh_v->bih->biBitCount = get_uint16(&st->bits_per_sample); - sh_v->disp_w = sh_v->bih->biWidth = get_uint32(&st->sh.video.width); - sh_v->disp_h = sh_v->bih->biHeight = get_uint32(&st->sh.video.height); + sh_v->src_w = sh_v->bih->biWidth = get_uint32(&st->sh.video.width); + sh_v->src_h = sh_v->bih->biHeight = get_uint32(&st->sh.video.height); if(!sh_v->bih->biBitCount) sh_v->bih->biBitCount=24; // hack, FIXME sh_v->bih->biPlanes=1; sh_v->bih->biSizeImage=(sh_v->bih->biBitCount>>3)*sh_v->bih->biWidth*sh_v->bih->biHeight; @@ -1272,7 +1272,7 @@ if(demuxer->video->id >= 0) { ds = demuxer->video; /* demux_ogg_read_packet needs decoder context for Theora streams */ - if (((sh_video_t*)demuxer->video->sh)->format == FOURCC_THEORA) + if (((sh_video_t*)demuxer->video->sh)->fourcc == FOURCC_THEORA) context = ((sh_video_t*)demuxer->video->sh)->context; rate = ogg_d->subs[ds->id].samplerate; } else { Modified: mplayerxp/libmpdemux/demux_pva.c =================================================================== --- mplayerxp/libmpdemux/demux_pva.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_pva.c 2012-10-26 10:04:44 UTC (rev 216) @@ -164,7 +164,7 @@ * the used codecs. */ - sh_video->format=0x10000002; + sh_video->fourcc=0x10000002; sh_video->ds=demuxer->video; /* Modified: mplayerxp/libmpdemux/demux_rawvideo.c =================================================================== --- mplayerxp/libmpdemux/demux_rawvideo.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_rawvideo.c 2012-10-26 10:04:44 UTC (rev 216) @@ -104,10 +104,10 @@ } sh_video = new_sh_video(demuxer,0); - sh_video->format=priv.format; + sh_video->fourcc=priv.format; sh_video->fps=priv.fps; - sh_video->disp_w=priv.width; - sh_video->disp_h=priv.height; + sh_video->src_w=priv.width; + sh_video->src_h=priv.height; demuxer->movi_start = demuxer->stream->start_pos; demuxer->movi_end = demuxer->stream->end_pos; Modified: mplayerxp/libmpdemux/demux_real.c =================================================================== --- mplayerxp/libmpdemux/demux_real.c 2012-10-26 09:25:53 UTC (rev 215) +++ mplayerxp/libmpdemux/demux_real.c 2012-10-26 10:04:44 UTC (rev 216) @@ -642,7 +642,7 @@ priv->video_after_seek = 0; } else dp->pts=(dp_hdr->len<3)?0: - real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->format); + real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->fourcc); ds_add_packet(ds,dp); ds->asf_packet=NULL; } else { @@ -666,7 +666,7 @@ if(dp_hdr->len!=vpkg_length-vpkg_offset) MSG_V("warning! assembled.len=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,vpkg_length-vpkg_offset); stream_read(demuxer->stream, dp_data+dp_hdr->len, vpkg_offset); - if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else + if((dp_data[dp_hdr->len]&0x20) && (sh_video->fourcc==0x30335652)) --dp_hdr->chunks; else dp_hdr->len+=vpkg_offset; len-=vpkg_offset; MSG_DBG2("fragment (%d bytes) appended, %d bytes left\n",vpkg_offset,len); @@ -678,7 +678,7 @@ priv->video_after_seek = 0; } else dp->pts=(dp_hdr->len<3)?0: - real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->format); + real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->fourcc); ds_add_packet(ds,dp); ds->asf_packet=NULL; // continue parsing @@ -687,8 +687,8 @@ // non-last fragment: if(dp_hdr->len!=vpkg_offset) MSG_V("warning! assembled.len=%d offset=%d frag.len=%d total.len=%d \n",dp->len,vpkg_offset,len,vpkg_length); - stream_read(demuxer->stream, dp_data+dp_hdr->len, len); - if((dp_data[dp_hdr->len]&0x20) && (sh_video->format==0x30335652)) --dp_hdr->chunks; else + stream_read(demuxer->stream, dp_data+dp_hdr->len, len); + if((dp_data[dp_hdr->len]&0x20) && (sh_video->fourcc==0x30335652)) --dp_hdr->chunks; else dp_hdr->len+=len; len=0; break; // no more fragments in this chunk! @@ -735,7 +735,7 @@ priv->video_after_seek = 0; } else dp->pts=(dp_hdr->len<3)?0: - real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->format); + real_fix_timestamp(priv,dp_data,dp_hdr->timestamp,sh_video->fourcc); ds_add_packet(ds,dp); } // while(len>0) @@ -1214,18 +1214,18 @@ /* video header */ sh_video_t *sh = new_sh_video(demuxer, stream_id); - sh->format = stream_read_dword_le(demuxer->stream); /* fourcc */ - MSG_V("video fourcc: %.4s (%x)\n", (char *)&sh->format, sh->format); + sh->fourcc = stream_read_dword_le(demuxer->stream); /* fourcc */ + MSG_V("video fourcc: %.4s (%x)\n", (char *)&sh->fourcc, sh->fourcc); /* emulate BITMAPINFOHEADER */ sh->bih = malloc(sizeof(BITMAPINFOHEADER)+16); memset(sh->bih, 0, sizeof(BITMAPINFOHEADER)+16); sh->bih->biSize = 48; - sh->disp_w = sh->bih->biWidth = stream_read_word(demuxer->stream); - sh->disp_h = sh->bih->biHeight = stream_read_word(demuxer->stream); + sh->src_w = sh->bih->biWidth = stream_read_word(demuxer->stream); + sh->src_h = sh->bih->biHeight = stream_read_word(demuxer->stream); sh->bih->biPlanes = 1; sh->bih->biBitCount = 24; - sh->bih->biCompression = sh->format; + sh->bih->biCompression = sh->fourcc; sh->bih->biSizeImage= sh->bih->biWidth*sh->bih->biHeight*3; sh->fps = (float) stream_read_word(demuxer->stream); @@ -1262,7 +1262,7 @@ case 0x10003001: /* sub id: 3 */ /* codec id: rv10 */ - sh->bih->biCompression = sh->format = mmioFOURCC('R', 'V', '1', '3'); + sh->bih->biCompression = sh->fourcc = mmioFOURCC('R', 'V', '1', '3'); break; case 0x20001000: case 0x20100001: @@ -1280,7 +1280,7 @@ MSG_V("unknown id: %x\n", tmp); } - if((sh->format<=0x30335652) && (tmp>=0x20200002)){ + if((sh->fourcc<=0x30335652) && (tmp>=0x20200002)){ // read data for the cmsg24[] (see vd_realvid.c) unsigned int cnt = codec_data_size - (stream_tell(demuxer->stream) - codec_pos); if (... [truncated message content] |