mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-12 10:15:22 +00:00
avcodec/mimic: Inline constants
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
parent
7781aa85bc
commit
33fbc90735
@ -34,6 +34,7 @@
|
|||||||
#include "thread.h"
|
#include "thread.h"
|
||||||
|
|
||||||
#define MIMIC_HEADER_SIZE 20
|
#define MIMIC_HEADER_SIZE 20
|
||||||
|
#define MIMIC_VLC_BITS 11
|
||||||
|
|
||||||
typedef struct MimicContext {
|
typedef struct MimicContext {
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
@ -141,7 +142,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx)
|
|||||||
ctx->prev_index = 0;
|
ctx->prev_index = 0;
|
||||||
ctx->cur_index = 15;
|
ctx->cur_index = 15;
|
||||||
|
|
||||||
if ((ret = init_vlc(&ctx->vlc, 11, FF_ARRAY_ELEMS(huffbits),
|
if ((ret = init_vlc(&ctx->vlc, MIMIC_VLC_BITS, FF_ARRAY_ELEMS(huffbits),
|
||||||
huffbits, 1, 1, huffcodes, 4, 4, 0)) < 0) {
|
huffbits, 1, 1, huffcodes, 4, 4, 0)) < 0) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n");
|
av_log(avctx, AV_LOG_ERROR, "error initializing vlc table\n");
|
||||||
return ret;
|
return ret;
|
||||||
@ -239,7 +240,7 @@ static int vlc_decode_block(MimicContext *ctx, int num_coeffs, int qscale)
|
|||||||
int value;
|
int value;
|
||||||
int coeff;
|
int coeff;
|
||||||
|
|
||||||
vlc = get_vlc2(&ctx->gb, ctx->vlc.table, ctx->vlc.bits, 3);
|
vlc = get_vlc2(&ctx->gb, ctx->vlc.table, MIMIC_VLC_BITS, 3);
|
||||||
if (!vlc) /* end-of-block code */
|
if (!vlc) /* end-of-block code */
|
||||||
return 0;
|
return 0;
|
||||||
if (vlc == -1)
|
if (vlc == -1)
|
||||||
|
Loading…
Reference in New Issue
Block a user