[FFmpeg-cvslog] avcodec: remove ff_is_hwaccel_pix_fmt

Luca Barbato git at videolan.org
Wed Nov 14 12:11:17 CET 2012


ffmpeg | branch: master | Luca Barbato <lu_zero at gentoo.org> | Mon Nov 12 01:25:44 2012 +0100| [cc085993f42cc01f394c2ce867397179bdf17cca] | committer: Luca Barbato

avcodec: remove ff_is_hwaccel_pix_fmt

It is used only in one place and is unlikely it would be needed
elsewhere.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cc085993f42cc01f394c2ce867397179bdf17cca
---

 libavcodec/imgconvert.c |    6 ------
 libavcodec/internal.h   |    5 -----
 libavcodec/utils.c      |    8 +++++++-
 3 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/libavcodec/imgconvert.c b/libavcodec/imgconvert.c
index fd30dc4..dacf3c4 100644
--- a/libavcodec/imgconvert.c
+++ b/libavcodec/imgconvert.c
@@ -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)
 {
diff --git a/libavcodec/internal.h b/libavcodec/internal.h
index 231d4b6..0f624e2 100644
--- a/libavcodec/internal.h
+++ b/libavcodec/internal.h
@@ -86,11 +86,6 @@ struct AVCodecDefault {
 };
 
 /**
- * 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.
  *
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 054dc69..06f4fc9 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -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];
 }



More information about the ffmpeg-cvslog mailing list