libopenjpegdec: make use of FF_ARRAY_ELEMS
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
695e85f189
commit
3275981207
@ -92,19 +92,19 @@ static inline enum PixelFormat libopenjpeg_guess_pix_fmt(const opj_image_t *imag
|
|||||||
switch (image->color_space) {
|
switch (image->color_space) {
|
||||||
case CLRSPC_SRGB:
|
case CLRSPC_SRGB:
|
||||||
possible_fmts = libopenjpeg_rgb_pix_fmts;
|
possible_fmts = libopenjpeg_rgb_pix_fmts;
|
||||||
possible_fmts_nb = sizeof(libopenjpeg_rgb_pix_fmts) / sizeof(enum PixelFormat);
|
possible_fmts_nb = FF_ARRAY_ELEMS(libopenjpeg_rgb_pix_fmts);
|
||||||
break;
|
break;
|
||||||
case CLRSPC_GRAY:
|
case CLRSPC_GRAY:
|
||||||
possible_fmts = libopenjpeg_gray_pix_fmts;
|
possible_fmts = libopenjpeg_gray_pix_fmts;
|
||||||
possible_fmts_nb = sizeof(libopenjpeg_gray_pix_fmts) / sizeof(enum PixelFormat);
|
possible_fmts_nb = FF_ARRAY_ELEMS(libopenjpeg_gray_pix_fmts);
|
||||||
break;
|
break;
|
||||||
case CLRSPC_SYCC:
|
case CLRSPC_SYCC:
|
||||||
possible_fmts = libopenjpeg_yuv_pix_fmts;
|
possible_fmts = libopenjpeg_yuv_pix_fmts;
|
||||||
possible_fmts_nb = sizeof(libopenjpeg_yuv_pix_fmts) / sizeof(enum PixelFormat);
|
possible_fmts_nb = FF_ARRAY_ELEMS(libopenjpeg_yuv_pix_fmts);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
possible_fmts = libopenjpeg_all_pix_fmts;
|
possible_fmts = libopenjpeg_all_pix_fmts;
|
||||||
possible_fmts_nb = sizeof(libopenjpeg_all_pix_fmts) / sizeof(enum PixelFormat);
|
possible_fmts_nb = FF_ARRAY_ELEMS(libopenjpeg_all_pix_fmts);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user