avcodec/proresenc_anatoliy: rework inner loop in encode_acs()
This matches the logic from the function of the same name in proresenc_kostya.
This commit is contained in:
parent
25f28b9308
commit
096a69ad43
@ -286,14 +286,17 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
|
|||||||
int blocks_per_slice,
|
int blocks_per_slice,
|
||||||
int *qmat, const uint8_t *scan)
|
int *qmat, const uint8_t *scan)
|
||||||
{
|
{
|
||||||
|
int idx;
|
||||||
int prev_run = 4;
|
int prev_run = 4;
|
||||||
int prev_level = 2;
|
int prev_level = 2;
|
||||||
|
int max_coeffs;
|
||||||
|
int run = 0, level, code, i;
|
||||||
|
|
||||||
|
max_coeffs = blocks_per_slice << 6;
|
||||||
|
|
||||||
int run = 0, level, code, i, j;
|
|
||||||
for (i = 1; i < 64; i++) {
|
for (i = 1; i < 64; i++) {
|
||||||
int indp = scan[i];
|
for (idx = scan[i]; idx < max_coeffs; idx += 64) {
|
||||||
for (j = 0; j < blocks_per_slice; j++) {
|
int val = blocks[idx] / qmat[scan[i]];
|
||||||
int val = (blocks[(j << 6) + indp]) / qmat[indp];
|
|
||||||
if (val) {
|
if (val) {
|
||||||
encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 15)], run);
|
encode_vlc_codeword(pb, ff_prores_run_to_cb[FFMIN(prev_run, 15)], run);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user