mirror of https://git.ffmpeg.org/ffmpeg.git
libopenjpegenc: merge common code
Signed-off-by: Paul B Mahol <onemda@gmail.com> Reviewed-by: Michael Bradshaw <mbradshaw@sorensonmedia.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
8e45005a84
commit
dec8eb6b29
|
@ -68,51 +68,27 @@ static opj_image_t *mj2_create_image(AVCodecContext *avctx, opj_cparameters_t *p
|
||||||
|
|
||||||
switch (avctx->pix_fmt) {
|
switch (avctx->pix_fmt) {
|
||||||
case PIX_FMT_GRAY8:
|
case PIX_FMT_GRAY8:
|
||||||
color_space = CLRSPC_GRAY;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_GRAY8A:
|
case PIX_FMT_GRAY8A:
|
||||||
color_space = CLRSPC_GRAY;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_GRAY16:
|
case PIX_FMT_GRAY16:
|
||||||
color_space = CLRSPC_GRAY;
|
color_space = CLRSPC_GRAY;
|
||||||
break;
|
break;
|
||||||
case PIX_FMT_RGB24:
|
case PIX_FMT_RGB24:
|
||||||
color_space = CLRSPC_SRGB;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_RGBA:
|
case PIX_FMT_RGBA:
|
||||||
color_space = CLRSPC_SRGB;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_RGB48:
|
case PIX_FMT_RGB48:
|
||||||
color_space = CLRSPC_SRGB;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_RGBA64:
|
case PIX_FMT_RGBA64:
|
||||||
color_space = CLRSPC_SRGB;
|
color_space = CLRSPC_SRGB;
|
||||||
break;
|
break;
|
||||||
case PIX_FMT_YUV420P:
|
case PIX_FMT_YUV420P:
|
||||||
color_space = CLRSPC_SYCC;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_YUV422P:
|
case PIX_FMT_YUV422P:
|
||||||
color_space = CLRSPC_SYCC;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_YUV440P:
|
case PIX_FMT_YUV440P:
|
||||||
color_space = CLRSPC_SYCC;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_YUV444P:
|
case PIX_FMT_YUV444P:
|
||||||
color_space = CLRSPC_SYCC;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_YUVA420P:
|
case PIX_FMT_YUVA420P:
|
||||||
color_space = CLRSPC_SYCC;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_YUV420P9:
|
case PIX_FMT_YUV420P9:
|
||||||
case PIX_FMT_YUV422P9:
|
case PIX_FMT_YUV422P9:
|
||||||
case PIX_FMT_YUV444P9:
|
case PIX_FMT_YUV444P9:
|
||||||
color_space = CLRSPC_SYCC;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_YUV420P10:
|
case PIX_FMT_YUV420P10:
|
||||||
case PIX_FMT_YUV422P10:
|
case PIX_FMT_YUV422P10:
|
||||||
case PIX_FMT_YUV444P10:
|
case PIX_FMT_YUV444P10:
|
||||||
color_space = CLRSPC_SYCC;
|
|
||||||
break;
|
|
||||||
case PIX_FMT_YUV420P16:
|
case PIX_FMT_YUV420P16:
|
||||||
case PIX_FMT_YUV422P16:
|
case PIX_FMT_YUV422P16:
|
||||||
case PIX_FMT_YUV444P16:
|
case PIX_FMT_YUV444P16:
|
||||||
|
|
Loading…
Reference in New Issue