aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/rl.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2021-01-27 17:21:01 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-05 18:00:25 +0200
commitb30851c87274730749f282b61875393e29918d8e (patch)
tree63501266746a13d3c8c39c86cd9aa59138158284 /libavcodec/rl.h
parent03008c2811ec26cf338780a89b6b2b849b399e3c (diff)
downloadffmpeg-b30851c87274730749f282b61875393e29918d8e.tar.gz
avcodec/rl: Improve documentation of ff_rl_init/ff_rl_init_vlc
In particular, document that they initialize different parts of an RLTable and therefore need not be synchronized. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/rl.h')
-rw-r--r--libavcodec/rl.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/libavcodec/rl.h b/libavcodec/rl.h
index 26e0b32a90..5aae698e31 100644
--- a/libavcodec/rl.h
+++ b/libavcodec/rl.h
@@ -49,10 +49,25 @@ typedef struct RLTable {
} RLTable;
/**
+ * Initialize index_run, max_level and max_run from n, last, table_vlc,
+ * table_run and table_level.
* @param static_store static uint8_t array[2][2*MAX_RUN + MAX_LEVEL + 3]
* to hold the level and run tables.
+ * @note This function does not touch rl_vlc at all, hence there is no need
+ * to synchronize calls to ff_rl_init() and ff_rl_init_vlc() using the
+ * same RLTable.
*/
void ff_rl_init(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
+
+/**
+ * Initialize rl_vlc from n, last, table_vlc, table_run and table_level.
+ * All rl_vlc pointers to be initialized must already point to a static
+ * buffer of `static_size` RL_VLC_ELEM elements; if a pointer is NULL,
+ * initializing further VLCs stops.
+ * @note This function does not touch what ff_rl_init() initializes at all,
+ * hence there is no need to synchronize calls to ff_rl_init() and
+ * ff_rl_init_vlc() using the same RLTable.
+ */
void ff_rl_init_vlc(RLTable *rl, unsigned static_size);
#define INIT_VLC_RL(rl, static_size)\