]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/imgconvert.c
Merge commit '564b7e0c0095768cd20001b28154d69462be54e7'
[ffmpeg] / libavcodec / imgconvert.c
index db52455c9f4d2f6d517a3b03d53b345c3554ac0d..e872035e3940b01cca8b0699096a8491f4d857b0 100644 (file)
@@ -59,7 +59,7 @@
 #endif
 
 #define pixdesc_has_alpha(pixdesc) \
-    ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & PIX_FMT_PAL)
+    ((pixdesc)->nb_components == 2 || (pixdesc)->nb_components == 4 || (pixdesc)->flags & AV_PIX_FMT_FLAG_PAL)
 
 
 void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift)
@@ -77,7 +77,7 @@ static int get_color_type(const AVPixFmtDescriptor *desc) {
     if(desc->name && !strncmp(desc->name, "yuvj", 4))
         return FF_COLOR_YUV_JPEG;
 
-    if(desc->flags & PIX_FMT_RGB)
+    if(desc->flags & AV_PIX_FMT_FLAG_RGB)
         return  FF_COLOR_RGB;
 
     if(desc->nb_components == 0)
@@ -366,8 +366,8 @@ static inline int is_yuv_planar(const AVPixFmtDescriptor *desc)
     int i;
     int planes[4] = { 0 };
 
-    if (     desc->flags & PIX_FMT_RGB
-        || !(desc->flags & PIX_FMT_PLANAR))
+    if (     desc->flags & AV_PIX_FMT_FLAG_RGB
+        || !(desc->flags & AV_PIX_FMT_FLAG_PLANAR))
         return 0;
 
     /* set the used planes */
@@ -654,7 +654,7 @@ int main(void){
             skip = 0;
         }
         av_log(NULL, AV_LOG_INFO, "pix fmt %s yuv_plan:%d avg_bpp:%d colortype:%d\n", desc->name, is_yuv_planar(desc), av_get_padded_bits_per_pixel(desc), get_color_type(desc));
-        if ((!(desc->flags & PIX_FMT_ALPHA)) != (desc->nb_components != 2 && desc->nb_components != 4)) {
+        if ((!(desc->flags & AV_PIX_FMT_FLAG_ALPHA)) != (desc->nb_components != 2 && desc->nb_components != 4)) {
             av_log(NULL, AV_LOG_ERROR, "Alpha flag mismatch\n");
             err = 1;
         }