]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/unary.h
Put halfpel_interpol under the same #ifdef as its usage, fixes the warning:
[ffmpeg] / libavcodec / unary.h
index daf02c3aabf8aa0034fedd6929fee4b197cbb4a4..abd7a531b1e1dbf3e7e21989bdffcb98abe23d75 100644 (file)
@@ -18,8 +18,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#ifndef AVCODEC_UNARY_H
-#define AVCODEC_UNARY_H
+#ifndef FFMPEG_UNARY_H
+#define FFMPEG_UNARY_H
 
 #include "bitstream.h"
 
@@ -38,4 +38,19 @@ static inline int get_unary(GetBitContext *gb, int stop, int len)
     return i;
 }
 
-#endif /* AVCODEC_UNARY_H */
+/**
+ * Get unary code terminated by a 0 with a maximum length of 33
+ * @param gb GetBitContext
+ * @return Unary length/index
+ */
+static inline int get_unary_0_33(GetBitContext *gb)
+{
+    return get_unary(gb, 0, 33);
+}
+
+static inline int get_unary_0_9(GetBitContext *gb)
+{
+    return get_unary(gb, 0, 9);
+}
+
+#endif /* FFMPEG_UNARY_H */