vlc | branch: master | Steve Lhomme <[email protected]> | Wed Dec 12 14:39:30 2018 +0100| [78cc81ffdafedcd165009a3a9bb2aee7784aea86] | committer: Steve Lhomme
avcodec: don't lose the chroma siting information through libavcodec > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=78cc81ffdafedcd165009a3a9bb2aee7784aea86 --- modules/codec/avcodec/avcommon.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/modules/codec/avcodec/avcommon.h b/modules/codec/avcodec/avcommon.h index 1bdf05d9d6..ab6e7e72e3 100644 --- a/modules/codec/avcodec/avcommon.h +++ b/modules/codec/avcodec/avcommon.h @@ -210,6 +210,30 @@ static inline void set_video_color_settings( const video_format_t *p_fmt, AVCode p_context->color_primaries = AVCOL_PRI_UNSPECIFIED; break; } + switch( p_fmt->chroma_location ) + { + case CHROMA_LOCATION_LEFT: + p_context->chroma_sample_location = AVCHROMA_LOC_LEFT; + break; + case CHROMA_LOCATION_CENTER: + p_context->chroma_sample_location = AVCHROMA_LOC_CENTER; + break; + case CHROMA_LOCATION_TOP_LEFT: + p_context->chroma_sample_location = AVCHROMA_LOC_TOPLEFT; + break; + case CHROMA_LOCATION_TOP_CENTER: + p_context->chroma_sample_location = AVCHROMA_LOC_TOP; + break; + case CHROMA_LOCATION_BOTTOM_LEFT: + p_context->chroma_sample_location = AVCHROMA_LOC_BOTTOMLEFT; + break; + case CHROMA_LOCATION_BOTTOM_CENTER: + p_context->chroma_sample_location = AVCHROMA_LOC_BOTTOM; + break; + default: + p_context->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; + break; + } } #endif _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
