Remove dependency on avcodec_get_chroma_sub_sample() and libavcodec,
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 22 Jul 2010 22:06:46 +0000 (22:06 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Thu, 22 Jul 2010 22:06:46 +0000 (22:06 +0000)
use the pixdesc API instead.

Originally committed as revision 24440 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavfilter/vf_crop.c

index 204adcf..6bfee03 100644 (file)
@@ -120,7 +120,8 @@ static int config_input(AVFilterLink *link)
         crop->bpp = 8;
     }
 
-    avcodec_get_chroma_sub_sample(link->format, &crop->hsub, &crop->vsub);
+    crop->hsub = av_pix_fmt_descriptors[link->format].log2_chroma_w;
+    crop->vsub = av_pix_fmt_descriptors[link->format].log2_chroma_h;
 
     if (crop->w == 0)
         crop->w = link->w - crop->x;