#define MAX_PLANES 4
#define CONTEXT_SIZE 32
+extern const uint8_t ff_log2_run[32];
+
static const int8_t quant3[256]={
0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-4,-4,-4,-4,-4,-4,-4,-4,-4,-3,-3,-3,-3,-2,-2,-1,
};
-static const uint8_t log2_run[32]={
- 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
- 4, 4, 5, 5, 6, 6, 7, 7,
- 8, 9,10,11,12,13,14,15,
-};
-
typedef struct VlcState{
int16_t drift;
uint16_t error_sum;
if(run_mode){
if(diff){
- while(run_count >= 1<<log2_run[run_index]){
- run_count -= 1<<log2_run[run_index];
+ while(run_count >= 1<<ff_log2_run[run_index]){
+ run_count -= 1<<ff_log2_run[run_index];
run_index++;
put_bits(&s->pb, 1, 1);
}
- put_bits(&s->pb, 1 + log2_run[run_index], run_count);
+ put_bits(&s->pb, 1 + ff_log2_run[run_index], run_count);
if(run_index) run_index--;
run_count=0;
run_mode=0;
}
}
if(run_mode){
- while(run_count >= 1<<log2_run[run_index]){
- run_count -= 1<<log2_run[run_index];
+ while(run_count >= 1<<ff_log2_run[run_index]){
+ run_count -= 1<<ff_log2_run[run_index];
run_index++;
put_bits(&s->pb, 1, 1);
}
if(run_mode){
if(run_count==0 && run_mode==1){
if(get_bits1(&s->gb)){
- run_count = 1<<log2_run[run_index];
+ run_count = 1<<ff_log2_run[run_index];
if(x + run_count <= w) run_index++;
}else{
- if(log2_run[run_index]) run_count = get_bits(&s->gb, log2_run[run_index]);
+ if(ff_log2_run[run_index]) run_count = get_bits(&s->gb, ff_log2_run[run_index]);
else run_count=0;
if(run_index) run_index--;
run_mode=2;
decode_frame,
CODEC_CAP_DR1 /*| CODEC_CAP_DRAW_HORIZ_BAND*/,
NULL,
- .long_name= "FFmpeg codec #1",
+ .long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
};
#ifdef CONFIG_ENCODERS
encode_frame,
common_end,
.pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_RGB32, PIX_FMT_NONE},
- .long_name= "FFmpeg codec #1",
+ .long_name= NULL_IF_CONFIG_SMALL("FFmpeg codec #1"),
};
#endif