mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/proresenc_anatoliy: move DC codebook LUT to shared proresdata
This is going to be shared with proresenc_kostya in the upcoming commit.
This commit is contained in:
parent
9f547e2f15
commit
f06f2cf16a
@ -44,6 +44,8 @@ const uint8_t ff_prores_interlaced_scan[64] = {
|
|||||||
46, 39, 47, 54, 61, 62, 55, 63
|
46, 39, 47, 54, 61, 62, 55, 63
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const uint8_t ff_prores_dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 0x70 };
|
||||||
|
|
||||||
const uint8_t ff_prores_run_to_cb[16] = { 0x06, 0x06, 0x05, 0x05, 0x04, 0x29,
|
const uint8_t ff_prores_run_to_cb[16] = { 0x06, 0x06, 0x05, 0x05, 0x04, 0x29,
|
||||||
0x29, 0x29, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x4C };
|
0x29, 0x29, 0x29, 0x28, 0x28, 0x28, 0x28, 0x28, 0x28, 0x4C };
|
||||||
|
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
extern const uint8_t ff_prores_progressive_scan[64];
|
extern const uint8_t ff_prores_progressive_scan[64];
|
||||||
extern const uint8_t ff_prores_interlaced_scan[64];
|
extern const uint8_t ff_prores_interlaced_scan[64];
|
||||||
|
extern const uint8_t ff_prores_dc_codebook[7];
|
||||||
extern const uint8_t ff_prores_run_to_cb[16];
|
extern const uint8_t ff_prores_run_to_cb[16];
|
||||||
extern const uint8_t ff_prores_level_to_cb[10];
|
extern const uint8_t ff_prores_level_to_cb[10];
|
||||||
|
|
||||||
|
@ -266,7 +266,6 @@ static av_always_inline int get_level(int val)
|
|||||||
return (val ^ sign) - sign;
|
return (val ^ sign) - sign;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const uint8_t dc_codebook[7] = { 0x04, 0x28, 0x28, 0x4D, 0x4D, 0x70, 0x70};
|
|
||||||
|
|
||||||
static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
|
static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
|
||||||
int blocks_per_slice, int *qmat)
|
int blocks_per_slice, int *qmat)
|
||||||
@ -286,7 +285,7 @@ static void encode_dc_coeffs(PutBitContext *pb, int16_t *in,
|
|||||||
diff_sign = DIFF_SIGN(delta, sign);
|
diff_sign = DIFF_SIGN(delta, sign);
|
||||||
new_code = TO_GOLOMB2(get_level(delta), diff_sign);
|
new_code = TO_GOLOMB2(get_level(delta), diff_sign);
|
||||||
|
|
||||||
encode_codeword(pb, new_code, dc_codebook[FFMIN(code, 6)]);
|
encode_codeword(pb, new_code, ff_prores_dc_codebook[FFMIN(code, 6)]);
|
||||||
|
|
||||||
code = new_code;
|
code = new_code;
|
||||||
sign = delta >> 31;
|
sign = delta >> 31;
|
||||||
|
Loading…
Reference in New Issue
Block a user