summaryrefslogtreecommitdiffstats
path: root/libavcodec/utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r--libavcodec/utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index 3eea9a9..16d00bc 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -1015,3 +1015,17 @@ int avcodec_thread_init(AVCodecContext *s, int thread_count){
return -1;
}
#endif
+
+unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
+{
+ unsigned int n = 0;
+
+ while(v >= 0xff) {
+ *s++ = 0xff;
+ v -= 0xff;
+ n++;
+ }
+ *s = v;
+ n++;
+ return n;
+}
OpenPOWER on IntegriCloud