diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-25 15:36:38 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-01-25 15:36:38 +0200 |
commit | 4ebf0075806ccf2bdde276a4e56eac41c7e350c4 (patch) | |
tree | 89b4572543527808c92f4e37448bca4012e926ad /libmpcodecs | |
parent | efd25f7811b232ae2b1899ca0fee6fd598837b9f (diff) | |
parent | c2ba58aefce038ce4ccf6ed23791f5de823aa041 (diff) | |
download | mpv-4ebf0075806ccf2bdde276a4e56eac41c7e350c4.tar.bz2 mpv-4ebf0075806ccf2bdde276a4e56eac41c7e350c4.tar.xz |
Merge svn changes up to r30375
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/img_format.h | 16 | ||||
-rw-r--r-- | libmpcodecs/ve_lavc.c | 29 |
2 files changed, 21 insertions, 24 deletions
diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index 6bab56632d..2aa037e5b7 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -35,12 +35,28 @@ #define IMGFMT_ARGB IMGFMT_BGR32 #define IMGFMT_RGBA (IMGFMT_BGR32|64) #define IMGFMT_RGB48NE IMGFMT_RGB48BE +#define IMGFMT_RGB15BE IMGFMT_RGB15 +#define IMGFMT_RGB15LE (IMGFMT_RGB15|64) +#define IMGFMT_RGB16BE IMGFMT_RGB16 +#define IMGFMT_RGB16LE (IMGFMT_RGB16|64) +#define IMGFMT_BGR15BE IMGFMT_BGR15 +#define IMGFMT_BGR15LE (IMGFMT_BGR15|64) +#define IMGFMT_BGR16BE IMGFMT_BGR16 +#define IMGFMT_BGR16LE (IMGFMT_BGR16|64) #else #define IMGFMT_ABGR (IMGFMT_BGR32|64) #define IMGFMT_BGRA IMGFMT_BGR32 #define IMGFMT_ARGB (IMGFMT_RGB32|64) #define IMGFMT_RGBA IMGFMT_RGB32 #define IMGFMT_RGB48NE IMGFMT_RGB48LE +#define IMGFMT_RGB15BE (IMGFMT_RGB15|64) +#define IMGFMT_RGB15LE IMGFMT_RGB15 +#define IMGFMT_RGB16BE (IMGFMT_RGB16|64) +#define IMGFMT_RGB16LE IMGFMT_RGB16 +#define IMGFMT_BGR15BE (IMGFMT_BGR15|64) +#define IMGFMT_BGR15LE IMGFMT_BGR15 +#define IMGFMT_BGR16BE (IMGFMT_BGR16|64) +#define IMGFMT_BGR16LE IMGFMT_BGR16 #endif /* old names for compatibility */ diff --git a/libmpcodecs/ve_lavc.c b/libmpcodecs/ve_lavc.c index 3062d9ca5d..5955787204 100644 --- a/libmpcodecs/ve_lavc.c +++ b/libmpcodecs/ve_lavc.c @@ -15,6 +15,7 @@ #include "mp_msg.h" #include "help_mp.h" #include "av_opts.h" +#include "osdep/strsep.h" #include "codec-cfg.h" #include "stream/stream.h" @@ -24,6 +25,7 @@ #include "libmpdemux/muxer.h" #include "img_format.h" +#include "fmt-conversion.h" #include "mp_image.h" #include "vf.h" @@ -593,30 +595,9 @@ static int config(struct vf_instance* vf, } mux_v->imgfmt = lavc_param_format; - switch(lavc_param_format) - { - case IMGFMT_YV12: - lavc_venc_context->pix_fmt = PIX_FMT_YUV420P; - break; - case IMGFMT_422P: - lavc_venc_context->pix_fmt = PIX_FMT_YUV422P; - break; - case IMGFMT_444P: - lavc_venc_context->pix_fmt = PIX_FMT_YUV444P; - break; - case IMGFMT_411P: - lavc_venc_context->pix_fmt = PIX_FMT_YUV411P; - break; - case IMGFMT_YVU9: - lavc_venc_context->pix_fmt = PIX_FMT_YUV410P; - break; - case IMGFMT_BGR32: - lavc_venc_context->pix_fmt = PIX_FMT_RGB32; - break; - default: - mp_msg(MSGT_MENCODER,MSGL_ERR,"%s is not a supported format\n", vo_format_name(lavc_param_format)); - return 0; - } + lavc_venc_context->pix_fmt = imgfmt2pixfmt(lavc_param_format); + if (lavc_venc_context->pix_fmt == PIX_FMT_NONE) + return 0; if(!stats_file) { /* lavc internal 2pass bitrate control */ |