]> git.sesse.net Git - ffmpeg/commitdiff
avcodec: remove ff_is_hwaccel_pix_fmt
authorLuca Barbato <lu_zero@gentoo.org>
Mon, 12 Nov 2012 00:25:44 +0000 (01:25 +0100)
committerLuca Barbato <lu_zero@gentoo.org>
Tue, 13 Nov 2012 15:21:47 +0000 (16:21 +0100)
It is used only in one place and is unlikely it would be needed
elsewhere.

libavcodec/imgconvert.c
libavcodec/internal.h
libavcodec/utils.c

index fd30dc4596a637977c85b8159cd69947b49ce190..dacf3c46bfe4811239f3d8d8c13b28733c22c49c 100644 (file)
@@ -415,12 +415,6 @@ void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int
     *v_shift = desc->log2_chroma_h;
 }
 
-int ff_is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt)
-{
-    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
-    return desc->flags & PIX_FMT_HWACCEL;
-}
-
 int avpicture_fill(AVPicture *picture, uint8_t *ptr,
                    enum AVPixelFormat pix_fmt, int width, int height)
 {
index 231d4b68092e5a30f00583734a90f04842d185fe..0f624e201f15a3df47dee203fe9088de968e1695 100644 (file)
@@ -85,11 +85,6 @@ struct AVCodecDefault {
     const uint8_t *value;
 };
 
-/**
- * Determine whether pix_fmt is a hardware accelerated format.
- */
-int ff_is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt);
-
 /**
  * Return the hardware accelerated codec for codec codec_id and
  * pixel format pix_fmt.
index 054dc693e9de606082c7557df8468e8a74415b3a..06f4fc94e4e3479f601c2eb5b9479337886dfc46 100644 (file)
@@ -628,9 +628,15 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2,
     return 0;
 }
 
+static int is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt)
+{
+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
+    return desc->flags & PIX_FMT_HWACCEL;
+}
+
 enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt)
 {
-    while (*fmt != AV_PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt))
+    while (*fmt != AV_PIX_FMT_NONE && is_hwaccel_pix_fmt(*fmt))
         ++fmt;
     return fmt[0];
 }