diff options
author | wm4 <wm4@nowhere> | 2013-07-25 23:02:23 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-07-25 23:03:20 +0200 |
commit | 9cc5630fd54d9abadd52fdedb1bac30d1b09d99a (patch) | |
tree | 3b23a26819021d51e813755a8d6c5f7cef689230 /video/csputils.c | |
parent | 24e50ee74e69ff4c4f66510360a611f612c0f140 (diff) | |
download | mpv-9cc5630fd54d9abadd52fdedb1bac30d1b09d99a.tar.bz2 mpv-9cc5630fd54d9abadd52fdedb1bac30d1b09d99a.tar.xz |
video: support setting libswscale chroma position
Diffstat (limited to 'video/csputils.c')
-rw-r--r-- | video/csputils.c | 9 |
1 files changed, 9 insertions, 0 deletions
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) |