]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_swapuv.c
avfilter/vf_w3fdif: add x86 SIMD
[ffmpeg] / libavfilter / vf_swapuv.c
index 632e31c75e05b469eca7dd0beb7166e3b5edc234..624e6b624f2c693c345d0259d5b20cc2b5f4d998 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #include "libavutil/pixdesc.h"
+#include "libavutil/version.h"
 #include "avfilter.h"
 #include "formats.h"
 #include "internal.h"
@@ -33,8 +34,13 @@ static void do_swap(AVFrame *frame)
 {
     FFSWAP(uint8_t*,     frame->data[1],     frame->data[2]);
     FFSWAP(int,          frame->linesize[1], frame->linesize[2]);
-    FFSWAP(uint64_t,     frame->error[1],    frame->error[2]);
     FFSWAP(AVBufferRef*, frame->buf[1],      frame->buf[2]);
+
+#if FF_API_ERROR_FRAME
+FF_DISABLE_DEPRECATION_WARNINGS
+    FFSWAP(uint64_t,     frame->error[1],    frame->error[2]);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
 }
 
 static AVFrame *get_video_buffer(AVFilterLink *link, int w, int h)
@@ -56,10 +62,10 @@ static int is_planar_yuv(const AVPixFmtDescriptor *desc)
 
     if (desc->flags & ~(AV_PIX_FMT_FLAG_BE | AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_ALPHA) ||
         desc->nb_components < 3 ||
-        (desc->comp[1].depth_minus1 != desc->comp[2].depth_minus1))
+        (desc->comp[1].depth != desc->comp[2].depth))
         return 0;
     for (i = 0; i < desc->nb_components; i++) {
-        if (desc->comp[i].offset_plus1 != 1 ||
+        if (desc->comp[i].offset != 0 ||
             desc->comp[i].shift != 0 ||
             desc->comp[i].plane != i)
             return 0;