projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edd532d
)
Add sign_extend() function to mathops.h
author
Måns Rullgård
<mans@mansr.com>
Tue, 3 Mar 2009 00:03:55 +0000
(
00:03
+0000)
committer
Måns Rullgård
<mans@mansr.com>
Tue, 3 Mar 2009 00:03:55 +0000
(
00:03
+0000)
Originally committed as revision 17738 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/mathops.h
patch
|
blob
|
history
diff --git
a/libavcodec/mathops.h
b/libavcodec/mathops.h
index 880e94671f7b62a02ddc2de04e58c56fdd3bb061..b92a6be1371c4d0a104c9008c7c2cb4a9e2430aa 100644
(file)
--- a/
libavcodec/mathops.h
+++ b/
libavcodec/mathops.h
@@
-113,5
+113,12
@@
static inline av_const int mid_pred(int a, int b, int c)
}
#endif
+#ifndef sign_extend
+static inline av_const int sign_extend(int val, unsigned bits)
+{
+ return (val << (INT_BIT - bits)) >> (INT_BIT - bits);
+}
+#endif
+
#endif /* AVCODEC_MATHOPS_H */