avcodec/mpegvideo: Join loops when initializing ScanTable
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
66709df403
commit
f694db87ca
@ -296,20 +296,13 @@ static av_cold void dsp_init(MpegEncContext *s)
|
|||||||
av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st,
|
av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st,
|
||||||
const uint8_t *src_scantable)
|
const uint8_t *src_scantable)
|
||||||
{
|
{
|
||||||
int end;
|
|
||||||
|
|
||||||
st->scantable = src_scantable;
|
st->scantable = src_scantable;
|
||||||
|
|
||||||
for (int i = 0; i < 64; i++) {
|
for (int i = 0, end = -1; i < 64; i++) {
|
||||||
int j = src_scantable[i];
|
int j = src_scantable[i];
|
||||||
st->permutated[i] = permutation[j];
|
st->permutated[i] = permutation[j];
|
||||||
}
|
if (permutation[j] > end)
|
||||||
|
end = permutation[j];
|
||||||
end = -1;
|
|
||||||
for (int i = 0; i < 64; i++) {
|
|
||||||
int j = st->permutated[i];
|
|
||||||
if (j > end)
|
|
||||||
end = j;
|
|
||||||
st->raster_end[i] = end;
|
st->raster_end[i] = end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user