You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Merge commit '324e50ee95929a9491b855c5e15451145bd5d1ec'
* commit '324e50ee95929a9491b855c5e15451145bd5d1ec': rl: Add a function for freeing dynamically allocated tables. Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -19,9 +19,21 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "libavutil/attributes.h"
|
#include "libavutil/attributes.h"
|
||||||
|
#include "libavutil/mem.h"
|
||||||
|
|
||||||
#include "rl.h"
|
#include "rl.h"
|
||||||
|
|
||||||
|
void ff_rl_free(RLTable *rl)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
for (i = 0; i < 2; i++) {
|
||||||
|
av_freep(&rl->max_run[i]);
|
||||||
|
av_freep(&rl->max_level[i]);
|
||||||
|
av_freep(&rl->index_run[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
av_cold void ff_rl_init(RLTable *rl,
|
av_cold void ff_rl_init(RLTable *rl,
|
||||||
uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3])
|
uint8_t static_store[2][2 * MAX_RUN + MAX_LEVEL + 3])
|
||||||
{
|
{
|
||||||
|
@@ -55,6 +55,11 @@ typedef struct RLTable {
|
|||||||
void ff_rl_init(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
|
void ff_rl_init(RLTable *rl, uint8_t static_store[2][2*MAX_RUN + MAX_LEVEL + 3]);
|
||||||
void ff_rl_init_vlc(RLTable *rl, unsigned static_size);
|
void ff_rl_init_vlc(RLTable *rl, unsigned static_size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Free the contents of a dynamically allocated table.
|
||||||
|
*/
|
||||||
|
void ff_rl_free(RLTable *rl);
|
||||||
|
|
||||||
#define INIT_VLC_RL(rl, static_size)\
|
#define INIT_VLC_RL(rl, static_size)\
|
||||||
{\
|
{\
|
||||||
int q;\
|
int q;\
|
||||||
|
Reference in New Issue
Block a user