From 59e3f4e598ae381600ef54e1f6e6a8a5270ac245 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 20 Nov 2015 02:17:33 +0100 Subject: 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. --- libavcodec/rle.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libavcodec/rle.h') diff --git a/libavcodec/rle.h b/libavcodec/rle.h index 00261d3598..c9677647cb 100644 --- a/libavcodec/rle.h +++ b/libavcodec/rle.h @@ -23,6 +23,17 @@ #include +/** + * 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. -- cgit v1.2.1