Mercurial > mplayer.hg
changeset 6002:ba14193cc935
dvbscale - setup scaling for the DVB card
author | arpi |
---|---|
date | Mon, 06 May 2002 22:49:31 +0000 |
parents | 0263a3eabcd7 |
children | 28f800545e63 |
files | libmpcodecs/Makefile libmpcodecs/vf_dvbscale.c |
diffstat | 2 files changed, 49 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpcodecs/Makefile Mon May 06 22:48:59 2002 +0000 +++ b/libmpcodecs/Makefile Mon May 06 22:49:31 2002 +0000 @@ -6,7 +6,7 @@ AUDIO_SRCS=dec_audio.c ad.c ad_a52.c ad_acm.c ad_alaw.c ad_dk3adpcm.c ad_dk4adpcm.c ad_dshow.c ad_dvdpcm.c ad_ffmpeg.c ad_hwac3.c ad_imaadpcm.c ad_mp3.c ad_msadpcm.c ad_pcm.c ad_roqaudio.c ad_msgsm.c ad_faad.c ad_vorbis.c ad_libmad.c VIDEO_SRCS=dec_video.c vd.c vd_null.c vd_cinepak.c vd_qtrpza.c vd_ffmpeg.c vd_dshow.c vd_vfw.c vd_odivx.c vd_divx4.c vd_raw.c vd_xanim.c vd_msvidc.c vd_fli.c vd_qtrle.c vd_qtsmc.c vd_roqvideo.c vd_cyuv.c vd_nuv.c vd_libmpeg2.c vd_msrle.c vd_huffyuv.c vd_zlib.c vd_mpegpes.c -VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c +VFILTER_SRCS=vf.c vf_vo.c vf_crop.c vf_expand.c vf_pp.c vf_scale.c vf_format.c vf_yuy2.c vf_flip.c vf_rgb2bgr.c vf_rotate.c vf_mirror.c vf_palette.c vf_lavc.c vf_dvbscale.c ENCODER_SRCS=ve.c ve_divx4.c ve_lavc.c ve_vfw.c ve_rawrgb.c ve_libdv.c NATIVE_SRCS=native/RTjpegN.c native/cinepak.c native/cyuv.c native/fli.c native/minilzo.c native/msvidc.c native/nuppelvideo.c native/qtrle.c native/qtrpza.c native/qtsmc.c native/roqav.c native/xa_gsm.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/libmpcodecs/vf_dvbscale.c Mon May 06 22:49:31 2002 +0000 @@ -0,0 +1,48 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <inttypes.h> + +#include "../config.h" +#include "../mp_msg.h" + +#include "img_format.h" +#include "mp_image.h" +#include "vf.h" + +struct vf_priv_s { + int aspect; +}; + +//===========================================================================// + +static int config(struct vf_instance_s* vf, + int width, int height, int d_width, int d_height, + unsigned int flags, unsigned int outfmt){ + + int scaled_y=vf->priv->aspect*d_height/d_width; + + d_width=width; // do X-scaling by hardware + d_height=scaled_y; + + return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt); +} + +static int open(vf_instance_t *vf, char* args){ + vf->config=config; + vf->default_caps=0; + vf->priv=malloc(sizeof(struct vf_priv_s)); + vf->priv->aspect=768; + if(args) vf->priv->aspect=atoi(args); + return 1; +} + +vf_info_t vf_info_dvbscale = { + "calc Y scaling for DVB card", + "dvbscale", + "A'rpi", + "", + open +}; + +//===========================================================================//