From 9cc5630fd54d9abadd52fdedb1bac30d1b09d99a Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 25 Jul 2013 23:02:23 +0200 Subject: video: support setting libswscale chroma position --- video/csputils.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'video/csputils.c') diff --git a/video/csputils.c b/video/csputils.c index f25d20e517..1d622f6261 100644 --- a/video/csputils.c +++ b/video/csputils.c @@ -116,6 +116,15 @@ enum mp_chroma_location avchroma_location_to_mp(int avloc) } } +int mp_chroma_location_to_av(enum mp_chroma_location mploc) +{ + switch (mploc) { + case MP_CHROMA_LEFT: return AVCHROMA_LOC_LEFT; + case MP_CHROMA_CENTER: return AVCHROMA_LOC_CENTER; + default: return AVCHROMA_LOC_UNSPECIFIED; + } +} + // Return location of chroma samples relative to luma samples. 0/0 means // centered. Other possible values are -1 (top/left) and +1 (right/bottom). void mp_get_chroma_location(enum mp_chroma_location loc, int *x, int *y) -- cgit v1.2.3