[cmake]: add codec option

Use mpp/codecs.cmake to enable/disable codecs in order to reduce library
size.
All decoder and encoder can be disbaled now. Default all open.

Change-Id: I3307460df12f2f3fc82898d823ab2da12002d6c6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This commit is contained in:
Herman Chen
2016-09-10 15:22:40 +08:00
parent 2ee1843c54
commit 30c6bd08c1
28 changed files with 479 additions and 287 deletions

View File

@@ -35,17 +35,39 @@ typedef struct {
} MppCodingTypeInfo;
static MppCodingTypeInfo support_list[] = {
#if HAVE_MPEG2D
{ MPP_CTX_DEC, MPP_VIDEO_CodingMPEG2, "dec", "mpeg2", },
#endif
#if HAVE_MPEG4D
{ MPP_CTX_DEC, MPP_VIDEO_CodingMPEG4, "dec", "mpeg4", },
#endif
#if HAVE_H263D
{ MPP_CTX_DEC, MPP_VIDEO_CodingH263, "dec", "h.263", },
#endif
#if HAVE_H264D
{ MPP_CTX_DEC, MPP_VIDEO_CodingAVC, "dec", "h.264/AVC", },
#endif
#if HAVE_H265D
{ MPP_CTX_DEC, MPP_VIDEO_CodingHEVC, "dec", "h.265/HEVC", },
#endif
#if HAVE_VP8D
{ MPP_CTX_DEC, MPP_VIDEO_CodingVP8, "dec", "vp8", },
#endif
#if HAVE_VP9D
{ MPP_CTX_DEC, MPP_VIDEO_CodingVP9, "dec", "VP9", },
#endif
#if HAVE_AVSD
{ MPP_CTX_DEC, MPP_VIDEO_CodingAVS, "dec", "avs+", },
#endif
#if HAVE_JPEGD
{ MPP_CTX_DEC, MPP_VIDEO_CodingMJPEG, "dec", "jpeg", },
#endif
#if HAVE_H264E
{ MPP_CTX_ENC, MPP_VIDEO_CodingAVC, "enc", "h.264/AVC", },
#endif
#if HAVE_JPEGE
{ MPP_CTX_ENC, MPP_VIDEO_CodingMJPEG, "enc", "jpeg", },
#endif
};
#define check_mpp_ctx(ctx) _check_mpp_ctx(ctx, __FUNCTION__)