summaryrefslogtreecommitdiff
path: root/libavcodec/rle.h
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2015-11-20 02:17:33 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-11-24 09:05:01 -0500
commit59e3f4e598ae381600ef54e1f6e6a8a5270ac245 (patch)
treedb1b96936bbce191b0fa6d3a28d27370a81bd2c8 /libavcodec/rle.h
parent62cc8f4d79dad119e8efeaae080a58a8dcb1e89d (diff)
sgienc: Use a local RLE encoding function
SGI RLE encoding is slighlty different than the one provided by rle module (especially at high bit depth). The pixel count function however does not change, so it is simply made library-public.
Diffstat (limited to 'libavcodec/rle.h')
-rw-r--r--libavcodec/rle.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/rle.h b/libavcodec/rle.h
index 00261d3598..c9677647cb 100644
--- a/libavcodec/rle.h
+++ b/libavcodec/rle.h
@@ -24,6 +24,17 @@
#include <stdint.h>
/**
+ * Count up to 127 consecutive pixels which are either all the same or
+ * all differ from the previous and next pixels.
+ * @param start Pointer to the first pixel
+ * @param len Maximum number of pixels
+ * @param bpp Bytes per pixel
+ * @param same 1 if searching for identical pixel values, 0 for differing
+ * @return Number of matching consecutive pixels found
+ */
+int ff_rle_count_pixels(const uint8_t *start, int len, int bpp, int same);
+
+/**
* RLE compress the row, with maximum size of out_size. Value before repeated bytes is (count ^ xor_rep) + add_rep.
* Value before raw bytes is (count ^ xor_raw) + add_raw.
* @param outbuf Output buffer