avcodec/mpegvideo: Move ff_init_scantable() to mpegvideo_unquantize.c

This is necessary so that the mpegvideo_unquantize checkasm test
does not pull mpegvideo.o and then all of libavcodec into checkasm.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-11-29 01:17:08 +01:00
parent 357fc5243c
commit 0f7cc6aeea
2 changed files with 14 additions and 15 deletions

View File

@@ -42,7 +42,6 @@
#include "mpegutils.h"
#include "mpegvideo.h"
#include "mpegvideodata.h"
#include "mpegvideo_unquantize.h"
#include "libavutil/refstruct.h"
@@ -79,20 +78,6 @@ static av_cold void dsp_init(MpegEncContext *s)
}
}
av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st,
const uint8_t *src_scantable)
{
st->scantable = src_scantable;
for (int i = 0, end = -1; i < 64; i++) {
int j = src_scantable[i];
st->permutated[i] = permutation[j];
if (permutation[j] > end)
end = permutation[j];
st->raster_end[i] = end;
}
}
av_cold void ff_mpv_idct_init(MpegEncContext *s)
{
if (s->codec_id == AV_CODEC_ID_MPEG4)

View File

@@ -33,6 +33,20 @@
#include "mpegvideodata.h"
#include "mpegvideo_unquantize.h"
av_cold void ff_init_scantable(const uint8_t *permutation, ScanTable *st,
const uint8_t *src_scantable)
{
st->scantable = src_scantable;
for (int i = 0, end = -1; i < 64; i++) {
int j = src_scantable[i];
st->permutated[i] = permutation[j];
if (permutation[j] > end)
end = permutation[j];
st->raster_end[i] = end;
}
}
static void dct_unquantize_mpeg1_intra_c(const MPVContext *s,
int16_t *block, int n, int qscale)
{