Mercurial > mplayer.hg
diff mencoder.c @ 5388:3af2729c5c87
* New command line switch for mplayer & mencoder:
-ifo <ifo file>
Indicate the file that will be used to load palette and frame size
for MPEG subtitles.
* mencoder.c:
Fix cropping when decoding MPEG2.
* spudec.c:
If scaling is needed only do it once.
Change WITH_NO_ANTIALIASING to ANTIALIASING_ALGORITHM.
* vobsub.c:
Support reading info regarding size and palette from IDX file instead of IFO file.
Support streams containing audio or video.
author | kmkaplan |
---|---|
date | Fri, 29 Mar 2002 03:17:57 +0000 |
parents | e93fc4a8851a |
children | 386f6fcc92d5 |
line wrap: on
line diff
--- a/mencoder.c Fri Mar 29 02:52:45 2002 +0000 +++ b/mencoder.c Fri Mar 29 03:17:57 2002 +0000 @@ -123,6 +123,8 @@ int audio_id=-1; int video_id=-1; int dvdsub_id=-1; +int vobsub_id=-1; +static char* spudec_ifo=NULL; static int has_audio=1; char *audio_codec=NULL; // override audio codec @@ -239,6 +241,7 @@ #ifdef USE_DVDREAD #include "spudec.h" #endif +#include "vobsub.h" /* FIXME */ void mencoder_exit(int level, char *how) @@ -270,8 +273,10 @@ static unsigned char* vo_image=NULL; static unsigned char* vo_image_ptr=NULL; -static uint32_t draw_slice(uint8_t *src[], int stride[], int w,int h, int x0,int y0){ +static uint32_t draw_slice(const uint8_t *src0[], int stride[], int w,int h, int x0,int y0){ int y; + uint8_t *src[3]; + memcpy(src, src0, sizeof(src)); // printf("draw_slice %dx%d %d;%d\n",w,h,x0,y0); if(y0 + h < crop_y0) @@ -769,9 +774,16 @@ // set up video encoder: +if (spudec_ifo) { + unsigned int palette[16], width, height; + if (vobsub_parse_ifo(spudec_ifo, palette, &width, &height, 1) >= 0) + vo_spudec=spudec_new_scaled(palette, sh_video->disp_w, sh_video->disp_h); +} +if (vo_spudec==NULL) { #ifdef USE_DVDREAD vo_spudec=spudec_new_scaled(stream->type==STREAMTYPE_DVD?((dvd_priv_t *)(stream->priv))->cur_pgc->palette:NULL, sh_video->disp_w, sh_video->disp_h); +} #endif // set up output file: