Commit 6ff544e4 authored by Michael Niedermayer's avatar Michael Niedermayer

imgconvert: fix color type for non normal pix_fmts like HW stuff and unused entries.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6adf97fe
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#include "x86/dsputil_mmx.h" #include "x86/dsputil_mmx.h"
#endif #endif
#define FF_COLOR_NA -1
#define FF_COLOR_RGB 0 /**< RGB color space */ #define FF_COLOR_RGB 0 /**< RGB color space */
#define FF_COLOR_GRAY 1 /**< gray color space */ #define FF_COLOR_GRAY 1 /**< gray color space */
#define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */ #define FF_COLOR_YUV 2 /**< YUV color space. 16 <= Y <= 235, 16 <= U, V <= 240 */
...@@ -444,7 +445,7 @@ static get_color_type(AVPixFmtDescriptor *desc) { ...@@ -444,7 +445,7 @@ static get_color_type(AVPixFmtDescriptor *desc) {
return FF_COLOR_RGB; return FF_COLOR_RGB;
if(desc->nb_components == 0) if(desc->nb_components == 0)
return 0; return FF_COLOR_NA;
return FF_COLOR_YUV; return FF_COLOR_YUV;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment