diff options
-rw-r--r-- | video/img_format.c | 4 | ||||
-rw-r--r-- | video/img_format.h | 8 | ||||
-rw-r--r-- | video/mp_image.c | 4 | ||||
-rw-r--r-- | video/mp_image.h | 4 | ||||
-rw-r--r-- | video/mp_image_pool.c | 2 | ||||
-rw-r--r-- | video/mp_image_pool.h | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/video/img_format.c b/video/img_format.c index e1636e1eb6..8681744e5c 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -126,7 +126,7 @@ struct mp_imgfmt_entry mp_imgfmt_list[] = { {0} }; -unsigned int mp_imgfmt_from_name(bstr name, bool allow_hwaccel) +int mp_imgfmt_from_name(bstr name, bool allow_hwaccel) { int img_fmt = 0; for(struct mp_imgfmt_entry *p = mp_imgfmt_list; p->name; ++p) { @@ -147,7 +147,7 @@ unsigned int mp_imgfmt_from_name(bstr name, bool allow_hwaccel) return img_fmt; } -const char *mp_imgfmt_to_name(unsigned int fmt) +const char *mp_imgfmt_to_name(int fmt) { struct mp_imgfmt_entry *p = mp_imgfmt_list; for(; p->name; ++p) { diff --git a/video/img_format.h b/video/img_format.h index 10268febaa..3707018477 100644 --- a/video/img_format.h +++ b/video/img_format.h @@ -333,7 +333,7 @@ enum mp_imgfmt { IMGFMT_XYZ12 = MP_SELECT_LE_BE(IMGFMT_XYZ12_LE, IMGFMT_XYZ12_BE), }; -static inline bool IMGFMT_IS_RGB(unsigned int fmt) +static inline bool IMGFMT_IS_RGB(int fmt) { struct mp_imgfmt_desc desc = mp_imgfmt_get_desc(fmt); return (desc.flags & MP_IMGFLAG_RGB) && desc.num_planes == 1; @@ -350,13 +350,13 @@ static inline bool IMGFMT_IS_RGB(unsigned int fmt) struct mp_imgfmt_entry { const char *name; - unsigned int fmt; + int fmt; }; extern struct mp_imgfmt_entry mp_imgfmt_list[]; -unsigned int mp_imgfmt_from_name(bstr name, bool allow_hwaccel); -const char *mp_imgfmt_to_name(unsigned int fmt); +int mp_imgfmt_from_name(bstr name, bool allow_hwaccel); +const char *mp_imgfmt_to_name(int fmt); #define vo_format_name mp_imgfmt_to_name diff --git a/video/mp_image.c b/video/mp_image.c index 8b79489f31..67d7168bf1 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -149,7 +149,7 @@ static void mp_image_alloc_planes(struct mp_image *mpi) } } -void mp_image_setfmt(struct mp_image *mpi, unsigned int out_fmt) +void mp_image_setfmt(struct mp_image *mpi, int out_fmt) { struct mp_imgfmt_desc fmt = mp_imgfmt_get_desc(out_fmt); mpi->fmt = fmt; @@ -195,7 +195,7 @@ void mp_image_set_display_size(struct mp_image *mpi, int dw, int dh) mpi->display_h = dh; } -struct mp_image *mp_image_alloc(unsigned int imgfmt, int w, int h) +struct mp_image *mp_image_alloc(int imgfmt, int w, int h) { struct mp_image *mpi = talloc_zero(NULL, struct mp_image); talloc_set_destructor(mpi, mp_image_destructor); diff --git a/video/mp_image.h b/video/mp_image.h index c882a59caa..1e2933170a 100644 --- a/video/mp_image.h +++ b/video/mp_image.h @@ -109,7 +109,7 @@ typedef struct mp_image { void* priv; } mp_image_t; -struct mp_image *mp_image_alloc(unsigned int fmt, int w, int h); +struct mp_image *mp_image_alloc(int fmt, int w, int h); void mp_image_copy(struct mp_image *dmpi, struct mp_image *mpi); void mp_image_copy_attributes(struct mp_image *dmpi, struct mp_image *mpi); struct mp_image *mp_image_new_copy(struct mp_image *img); @@ -127,7 +127,7 @@ void mp_image_vflip(struct mp_image *img); void mp_image_set_size(struct mp_image *mpi, int w, int h); void mp_image_set_display_size(struct mp_image *mpi, int dw, int dh); -void mp_image_setfmt(mp_image_t* mpi,unsigned int out_fmt); +void mp_image_setfmt(mp_image_t* mpi, int out_fmt); void mp_image_steal_data(struct mp_image *dst, struct mp_image *src); struct mp_image *mp_image_new_custom_ref(struct mp_image *img, void *arg, diff --git a/video/mp_image_pool.c b/video/mp_image_pool.c index 07cbc94e45..6b907706c5 100644 --- a/video/mp_image_pool.c +++ b/video/mp_image_pool.c @@ -106,7 +106,7 @@ static void unref_image(void *ptr) // mp_image_alloc() is that there is a transparent mechanism to recycle image // data allocations through this pool. // The image can be free'd with talloc_free(). -struct mp_image *mp_image_pool_get(struct mp_image_pool *pool, unsigned int fmt, +struct mp_image *mp_image_pool_get(struct mp_image_pool *pool, int fmt, int w, int h) { struct mp_image *new = NULL; diff --git a/video/mp_image_pool.h b/video/mp_image_pool.h index 0982fd94f8..6ea041c527 100644 --- a/video/mp_image_pool.h +++ b/video/mp_image_pool.h @@ -4,7 +4,7 @@ struct mp_image_pool; struct mp_image_pool *mp_image_pool_new(int max_count); -struct mp_image *mp_image_pool_get(struct mp_image_pool *pool, unsigned int fmt, +struct mp_image *mp_image_pool_get(struct mp_image_pool *pool, int fmt, int w, int h); void mp_image_pool_clear(struct mp_image_pool *pool); |