summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-22 22:52:22 +0200
committerwm4 <wm4@nowhere>2012-10-22 22:52:22 +0200
commit8bf4a60bbee3878e7e6b1366bf296cf8d3eedc8f (patch)
treebd578354d85cd66cf86de112bf11b9f2c78e0ae0
parent022517bdf5a1fc484096217bac8c7d7fbc78fa7b (diff)
downloadmpv-8bf4a60bbee3878e7e6b1366bf296cf8d3eedc8f.tar.bz2
mpv-8bf4a60bbee3878e7e6b1366bf296cf8d3eedc8f.tar.xz
VF: remove IMGFMT_MPEGPES
This wasn't used anymore. Remove the reference to IMGFMT_MJPEG in vf_dlopen as well. Thus format is used as FourCC in the TV code (i.e. it's on the demuxer level, just like raw formats), and never appears in the video filter chain. For starters, vd_ffmpeg can never produce this format.
-rw-r--r--libmpcodecs/img_format.c1
-rw-r--r--libmpcodecs/img_format.h1
-rw-r--r--libmpcodecs/mp_image.c2
-rw-r--r--libmpcodecs/vf.c3
-rw-r--r--libmpcodecs/vf_dlopen.c2
-rw-r--r--libmpcodecs/vf_expand.c13
6 files changed, 2 insertions, 20 deletions
diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c
index b7e4f3ebf7..1084a8f9a1 100644
--- a/libmpcodecs/img_format.c
+++ b/libmpcodecs/img_format.c
@@ -195,7 +195,6 @@ struct mp_imgfmt_entry mp_imgfmt_list[] = {
{"gbrp", IMGFMT_GBRP},
{"mjpeg", IMGFMT_MJPEG},
{"mjpg", IMGFMT_MJPEG},
- {"mpes", IMGFMT_MPEGPES},
{"vdpau_h264", IMGFMT_VDPAU_H264},
{"vdpau_mpeg1", IMGFMT_VDPAU_MPEG1},
{"vdpau_mpeg2", IMGFMT_VDPAU_MPEG2},
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h
index edd7040327..b488734f02 100644
--- a/libmpcodecs/img_format.h
+++ b/libmpcodecs/img_format.h
@@ -198,7 +198,6 @@
#define IMGFMT_UYVP 0x50565955 // 10-bit UYVY
/* Compressed Formats */
-#define IMGFMT_MPEGPES (('M'<<24)|('P'<<16)|('E'<<8)|('S'))
#define IMGFMT_MJPEG (('M')|('J'<<8)|('P'<<16)|('G'<<24))
// VDPAU specific format.
diff --git a/libmpcodecs/mp_image.c b/libmpcodecs/mp_image.c
index 241f2886bc..412495f096 100644
--- a/libmpcodecs/mp_image.c
+++ b/libmpcodecs/mp_image.c
@@ -99,7 +99,7 @@ void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt){
mpi->flags&=~(MP_IMGFLAG_PLANAR|MP_IMGFLAG_YUV|MP_IMGFLAG_SWAPPED);
mpi->imgfmt=out_fmt;
// compressed formats
- if(out_fmt == IMGFMT_MPEGPES || IMGFMT_IS_HWACCEL(out_fmt)){
+ if(IMGFMT_IS_HWACCEL(out_fmt)){
mpi->bpp=0;
return;
}
diff --git a/libmpcodecs/vf.c b/libmpcodecs/vf.c
index 8cf6002246..6ec932445a 100644
--- a/libmpcodecs/vf.c
+++ b/libmpcodecs/vf.c
@@ -363,11 +363,8 @@ mp_image_t *vf_get_image(vf_instance_t *vf, unsigned int outfmt,
//============================================================================
-// By default vf doesn't accept MPEGPES
static int vf_default_query_format(struct vf_instance *vf, unsigned int fmt)
{
- if (fmt == IMGFMT_MPEGPES)
- return 0;
return vf_next_query_format(vf, fmt);
}
diff --git a/libmpcodecs/vf_dlopen.c b/libmpcodecs/vf_dlopen.c
index 71da4f1636..183b31be84 100644
--- a/libmpcodecs/vf_dlopen.c
+++ b/libmpcodecs/vf_dlopen.c
@@ -281,7 +281,7 @@ static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts)
static int query_format(struct vf_instance *vf, unsigned int fmt)
{
- if (IMGFMT_IS_HWACCEL(fmt) || fmt == IMGFMT_MJPEG || fmt == IMGFMT_MPEGPES)
+ if (IMGFMT_IS_HWACCEL(fmt))
return 0; // these can't really be filtered
if (fmt == IMGFMT_RGB8 || fmt == IMGFMT_BGR8)
return 0; // we don't have palette support, sorry
diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c
index b8ac9f728d..ff13a8501e 100644
--- a/libmpcodecs/vf_expand.c
+++ b/libmpcodecs/vf_expand.c
@@ -48,7 +48,6 @@ static struct vf_priv_s {
int exp_x,exp_y;
double aspect;
int round;
- int passthrough;
int first_slice;
} const vf_priv_dflt = {
-1,-1,
@@ -57,7 +56,6 @@ static struct vf_priv_s {
-1,-1,
0.,
1,
- 0,
0
};
@@ -69,10 +67,6 @@ static int config(struct vf_instance *vf,
{
struct MPOpts *opts = vf->opts;
mp_image_t test_mpi;
- if(outfmt == IMGFMT_MPEGPES) {
- vf->priv->passthrough = 1;
- return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
- }
mp_image_setfmt(&test_mpi, outfmt);
if (outfmt == IMGFMT_IF09 || !test_mpi.bpp) return 0;
vf->priv->exp_x = vf->priv->cfg_exp_x;
@@ -261,13 +255,6 @@ static void clear_borders(struct vf_instance *vf, int w, int h)
}
static int put_image(struct vf_instance *vf, mp_image_t *mpi, double pts){
- if (vf->priv->passthrough) {
- mp_image_t *dmpi = vf_get_image(vf->next, IMGFMT_MPEGPES,
- MP_IMGTYPE_EXPORT, 0, mpi->w, mpi->h);
- dmpi->planes[0]=mpi->planes[0];
- return vf_next_put_image(vf,dmpi, pts);
- }
-
if(mpi->flags&MP_IMGFLAG_DIRECT || mpi->flags&MP_IMGFLAG_DRAW_CALLBACK){
vf->dmpi=mpi->priv;
if(!vf->dmpi) { mp_tmsg(MSGT_VFILTER, MSGL_WARN, "Why do we get NULL??\n"); return 0; }