summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-06 22:49:31 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-06 22:49:31 +0000
commit9178c5871a5d53dc067178256722521a907368b2 (patch)
tree22be436560af4b9704fb11ecf2e0725ee445028f /libmpcodecs
parent03a3e7b320034e19d5a3e71c4d95bad4ef8c0b36 (diff)
downloadmpv-9178c5871a5d53dc067178256722521a907368b2.tar.bz2
mpv-9178c5871a5d53dc067178256722521a907368b2.tar.xz
dvbscale - setup scaling for the DVB card
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@6003 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/Makefile2
-rw-r--r--libmpcodecs/vf_dvbscale.c48
2 files changed, 49 insertions, 1 deletions
diff --git a/libmpcodecs/Makefile b/libmpcodecs/Makefile
index 7b80eb8709..b8325a4c4d 100644
--- a/libmpcodecs/Makefile
+++ b/libmpcodecs/Makefile
@@ -6,7 +6,7 @@ LIBNAME2 = libmpencoders.a
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
diff --git a/libmpcodecs/vf_dvbscale.c b/libmpcodecs/vf_dvbscale.c
new file mode 100644
index 0000000000..987482e12b
--- /dev/null
+++ b/libmpcodecs/vf_dvbscale.c
@@ -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
+};
+
+//===========================================================================//