diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2009-08-18 02:29:37 +0300 |
commit | 95da34aa071d64b21ef3e952b987ba3dcee84ca0 (patch) | |
tree | eabf4399e40fd270714c53d40688eadadfd4c5ff /libmpcodecs | |
parent | f394231f5de9d1ff679f1b2da4d1f1b303ae914a (diff) | |
parent | 3961e12fca2f1ec10c64e3ff298828feecca52c9 (diff) |
Merge svn changes up to r29532
Diffstat (limited to 'libmpcodecs')
-rw-r--r-- | libmpcodecs/img_format.c | 2 | ||||
-rw-r--r-- | libmpcodecs/img_format.h | 2 | ||||
-rw-r--r-- | libmpcodecs/ve_x264.c | 4 | ||||
-rw-r--r-- | libmpcodecs/vf_expand.c | 11 | ||||
-rw-r--r-- | libmpcodecs/vf_scale.c | 2 |
5 files changed, 14 insertions, 7 deletions
diff --git a/libmpcodecs/img_format.c b/libmpcodecs/img_format.c index 789e473f84..4704cf2f6a 100644 --- a/libmpcodecs/img_format.c +++ b/libmpcodecs/img_format.c @@ -15,6 +15,8 @@ const char *vo_format_name(int format) case IMGFMT_RGB16: return "RGB 16-bit"; case IMGFMT_RGB24: return "RGB 24-bit"; // case IMGFMT_RGB32: return "RGB 32-bit"; + case IMGFMT_RGB48LE: return "RGB 48-bit LE"; + case IMGFMT_RGB48BE: return "RGB 48-bit BE"; case IMGFMT_BGR1: return "BGR 1-bit"; case IMGFMT_BGR4: return "BGR 4-bit"; case IMGFMT_BG4B: return "BGR 4-bit per byte"; diff --git a/libmpcodecs/img_format.h b/libmpcodecs/img_format.h index 559501fb89..89efb1d6cb 100644 --- a/libmpcodecs/img_format.h +++ b/libmpcodecs/img_format.h @@ -13,6 +13,8 @@ #define IMGFMT_RGB16 (IMGFMT_RGB|16) #define IMGFMT_RGB24 (IMGFMT_RGB|24) #define IMGFMT_RGB32 (IMGFMT_RGB|32) +#define IMGFMT_RGB48LE (IMGFMT_RGB|48) +#define IMGFMT_RGB48BE (IMGFMT_RGB|48|128) #define IMGFMT_BGR_MASK 0xFFFFFF00 #define IMGFMT_BGR (('B'<<24)|('G'<<16)|('R'<<8)) diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c index 51da237169..3a909cdfb7 100644 --- a/libmpcodecs/ve_x264.c +++ b/libmpcodecs/ve_x264.c @@ -218,9 +218,11 @@ static int config(struct vf_instance* vf, int width, int height, int d_width, in static int control(struct vf_instance* vf, int request, void *data) { h264_module_t *mod=(h264_module_t*)vf->priv; + int count = 256; // giant HACK, x264_encoder_encode may incorrectly return 0 + // when threads > 1 and delayed frames pending switch(request){ case VFCTRL_FLUSH_FRAMES: - if(param.i_bframe) + while(encode_frame(vf, NULL) == 0 && --count); while(encode_frame(vf, NULL) > 0); return CONTROL_TRUE; default: diff --git a/libmpcodecs/vf_expand.c b/libmpcodecs/vf_expand.c index dc3928b0da..7d91e3a236 100644 --- a/libmpcodecs/vf_expand.c +++ b/libmpcodecs/vf_expand.c @@ -15,6 +15,7 @@ #include "vf.h" #include "libvo/fastmemcpy.h" +#include "libavutil/avutil.h" #ifdef OSD_SUPPORT #include "libvo/sub.h" @@ -24,8 +25,6 @@ #include "m_option.h" #include "m_struct.h" -#define MAX(a,b) ((a) > (b) ? (a) : (b)) - static struct vf_priv_s { int exp_w,exp_h; int exp_x,exp_y; @@ -255,8 +254,8 @@ static void get_image(struct vf_instance* vf, mp_image_t *mpi){ // try full DR ! mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, mpi->type, mpi->flags, - MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), - MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); + FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), + FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); #if 1 if((vf->dmpi->flags & MP_IMGFLAG_DRAW_CALLBACK) && !(vf->dmpi->flags & MP_IMGFLAG_DIRECT)){ @@ -298,8 +297,8 @@ static void start_slice(struct vf_instance* vf, mp_image_t *mpi){ mpi->priv=vf->dmpi=vf_get_image(vf->next,mpi->imgfmt, // MP_IMGTYPE_TEMP, MP_IMGFLAG_ACCEPT_STRIDE | MP_IMGFLAG_PREFER_ALIGNED_STRIDE, MP_IMGTYPE_TEMP, mpi->flags, - MAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), - MAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); + FFMAX(vf->priv->exp_w, mpi->width +vf->priv->exp_x), + FFMAX(vf->priv->exp_h, mpi->height+vf->priv->exp_y)); if(!(vf->dmpi->flags&MP_IMGFLAG_DRAW_CALLBACK)) mp_tmsg(MSGT_VFILTER, MSGL_WARN, "WARNING! Next filter doesn't support SLICES, get ready for sig11...\n"); // shouldn't happen. vf->priv->first_slice = 1; diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index 2590481eee..ab931c8080 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -473,6 +473,8 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){ case IMGFMT_RGB8: case IMGFMT_BG4B: case IMGFMT_RG4B: + case IMGFMT_RGB48LE: + case IMGFMT_RGB48BE: { unsigned int best=find_best_out(vf); int flags; |