mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
avcodec/blockdsp: Remove unused AVCodecContext parameter
Possible since be95df12bb
.
Reviewed-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
57f3ca20dc
commit
fd72d8aea3
@ -1012,7 +1012,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
f->version = AV_RL32(avctx->extradata) >> 16;
|
||||
ff_blockdsp_init(&f->bdsp, avctx);
|
||||
ff_blockdsp_init(&f->bdsp);
|
||||
ff_bswapdsp_init(&f->bbdsp);
|
||||
f->avctx = avctx;
|
||||
|
||||
|
@ -292,7 +292,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
ff_asv_common_init(avctx);
|
||||
ff_blockdsp_init(&a->bdsp, avctx);
|
||||
ff_blockdsp_init(&a->bdsp);
|
||||
ff_idctdsp_init(&a->idsp, avctx);
|
||||
ff_init_scantable(a->idsp.idct_permutation, &a->scantable, ff_asv_scantab);
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
|
@ -1384,7 +1384,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
avctx->pix_fmt = c->has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P;
|
||||
avctx->color_range = c->version == 'k' ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG;
|
||||
|
||||
ff_blockdsp_init(&c->bdsp, avctx);
|
||||
ff_blockdsp_init(&c->bdsp);
|
||||
ff_hpeldsp_init(&hdsp, avctx->flags);
|
||||
c->put_pixels_tab = hdsp.put_pixels_tab[1][0];
|
||||
ff_binkdsp_init(&c->binkdsp);
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "libavutil/attributes.h"
|
||||
#include "avcodec.h"
|
||||
#include "blockdsp.h"
|
||||
|
||||
static void clear_block_c(int16_t *block)
|
||||
@ -56,7 +55,7 @@ static void fill_block8_c(uint8_t *block, uint8_t value, ptrdiff_t line_size,
|
||||
}
|
||||
}
|
||||
|
||||
av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
|
||||
av_cold void ff_blockdsp_init(BlockDSPContext *c)
|
||||
{
|
||||
c->clear_block = clear_block_c;
|
||||
c->clear_blocks = clear_blocks_c;
|
||||
@ -71,7 +70,7 @@ av_cold void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx)
|
||||
#elif ARCH_PPC
|
||||
ff_blockdsp_init_ppc(c);
|
||||
#elif ARCH_X86
|
||||
ff_blockdsp_init_x86(c, avctx);
|
||||
ff_blockdsp_init_x86(c);
|
||||
#elif ARCH_MIPS
|
||||
ff_blockdsp_init_mips(c);
|
||||
#endif
|
||||
|
@ -22,8 +22,6 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "avcodec.h"
|
||||
|
||||
/* add and put pixel (decoding)
|
||||
* Block sizes for op_pixels_func are 8x4,8x8 16x8 16x16.
|
||||
* h for op_pixels_func is limited to { width / 2, width },
|
||||
@ -38,12 +36,12 @@ typedef struct BlockDSPContext {
|
||||
op_fill_func fill_block_tab[2];
|
||||
} BlockDSPContext;
|
||||
|
||||
void ff_blockdsp_init(BlockDSPContext *c, AVCodecContext *avctx);
|
||||
void ff_blockdsp_init(BlockDSPContext *c);
|
||||
|
||||
void ff_blockdsp_init_alpha(BlockDSPContext *c);
|
||||
void ff_blockdsp_init_arm(BlockDSPContext *c);
|
||||
void ff_blockdsp_init_ppc(BlockDSPContext *c);
|
||||
void ff_blockdsp_init_x86(BlockDSPContext *c, AVCodecContext *avctx);
|
||||
void ff_blockdsp_init_x86(BlockDSPContext *c);
|
||||
void ff_blockdsp_init_mips(BlockDSPContext *c);
|
||||
|
||||
#endif /* AVCODEC_BLOCKDSP_H */
|
||||
|
@ -793,7 +793,7 @@ av_cold int ff_cavs_init(AVCodecContext *avctx)
|
||||
{
|
||||
AVSContext *h = avctx->priv_data;
|
||||
|
||||
ff_blockdsp_init(&h->bdsp, avctx);
|
||||
ff_blockdsp_init(&h->bdsp);
|
||||
ff_h264chroma_init(&h->h264chroma, 8);
|
||||
ff_idctdsp_init(&h->idsp, avctx);
|
||||
ff_videodsp_init(&h->vdsp, 8);
|
||||
|
@ -273,7 +273,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, AVFrame *frame,
|
||||
|
||||
ctx->avctx->bits_per_raw_sample = ctx->bit_depth = bitdepth;
|
||||
if (ctx->bit_depth != old_bit_depth) {
|
||||
ff_blockdsp_init(&ctx->bdsp, ctx->avctx);
|
||||
ff_blockdsp_init(&ctx->bdsp);
|
||||
ff_idctdsp_init(&ctx->idsp, ctx->avctx);
|
||||
ff_init_scantable(ctx->idsp.idct_permutation, &ctx->scantable,
|
||||
ff_zigzag_direct);
|
||||
|
@ -419,7 +419,7 @@ static av_cold int dnxhd_encode_init(AVCodecContext *avctx)
|
||||
|
||||
avctx->bits_per_raw_sample = ctx->bit_depth;
|
||||
|
||||
ff_blockdsp_init(&ctx->bdsp, avctx);
|
||||
ff_blockdsp_init(&ctx->bdsp);
|
||||
ff_fdctdsp_init(&ctx->m.fdsp, avctx);
|
||||
ff_mpv_idct_init(&ctx->m);
|
||||
ff_mpegvideoencdsp_init(&ctx->m.mpvencdsp, avctx);
|
||||
|
@ -69,7 +69,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
MadContext *s = avctx->priv_data;
|
||||
s->avctx = avctx;
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
ff_blockdsp_init(&s->bdsp, avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
ff_bswapdsp_init(&s->bbdsp);
|
||||
ff_idctdsp_init(&s->idsp, avctx);
|
||||
ff_init_scantable_permutation(s->idsp.idct_permutation, FF_IDCT_PERM_NONE);
|
||||
|
@ -62,7 +62,7 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx)
|
||||
{
|
||||
TqiContext *t = avctx->priv_data;
|
||||
|
||||
ff_blockdsp_init(&t->bdsp, avctx);
|
||||
ff_blockdsp_init(&t->bdsp);
|
||||
ff_bswapdsp_init(&t->bsdsp);
|
||||
ff_idctdsp_init(&t->idsp, avctx);
|
||||
ff_init_scantable_permutation(t->idsp.idct_permutation, FF_IDCT_PERM_NONE);
|
||||
|
@ -180,7 +180,7 @@ static av_cold int jpg_init(AVCodecContext *avctx, JPGContext *c)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ff_blockdsp_init(&c->bdsp, avctx);
|
||||
ff_blockdsp_init(&c->bdsp);
|
||||
ff_idctdsp_init(&c->idsp, avctx);
|
||||
ff_init_scantable(c->idsp.idct_permutation, &c->scantable,
|
||||
ff_zigzag_direct);
|
||||
|
@ -722,7 +722,7 @@ av_cold int ff_intrax8_common_init(AVCodecContext *avctx,
|
||||
ff_wmv1_scantable[3]);
|
||||
|
||||
ff_intrax8dsp_init(&w->dsp);
|
||||
ff_blockdsp_init(&w->bdsp, avctx);
|
||||
ff_blockdsp_init(&w->bdsp);
|
||||
|
||||
ff_thread_once(&init_static_once, x8_vlc_init);
|
||||
|
||||
|
@ -56,7 +56,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
avctx->pix_fmt = AV_PIX_FMT_PAL8;
|
||||
ff_blockdsp_init(&s->bdsp, avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
|
||||
a->avctx = avctx;
|
||||
|
||||
ff_blockdsp_init(&a->bdsp, avctx);
|
||||
ff_blockdsp_init(&a->bdsp);
|
||||
ff_bswapdsp_init(&a->bbdsp);
|
||||
ff_idctdsp_init(&a->idsp, avctx);
|
||||
ff_mpeg12_init_vlcs();
|
||||
|
@ -133,7 +133,7 @@ static av_cold int mimic_decode_init(AVCodecContext *avctx)
|
||||
ctx->prev_index = 0;
|
||||
ctx->cur_index = 15;
|
||||
|
||||
ff_blockdsp_init(&ctx->bdsp, avctx);
|
||||
ff_blockdsp_init(&ctx->bdsp);
|
||||
ff_bswapdsp_init(&ctx->bbdsp);
|
||||
ff_hpeldsp_init(&ctx->hdsp, avctx->flags);
|
||||
ff_idctdsp_init(&ctx->idsp, avctx);
|
||||
|
@ -134,7 +134,7 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
|
||||
s->pkt = avctx->internal->in_pkt;
|
||||
|
||||
s->avctx = avctx;
|
||||
ff_blockdsp_init(&s->bdsp, avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
ff_hpeldsp_init(&s->hdsp, avctx->flags);
|
||||
init_idct(avctx);
|
||||
s->buffer_size = 0;
|
||||
|
@ -281,7 +281,7 @@ static void gray8(uint8_t *dst, const uint8_t *src, ptrdiff_t linesize, int h)
|
||||
/* init common dct for both encoder and decoder */
|
||||
static av_cold int dct_init(MpegEncContext *s)
|
||||
{
|
||||
ff_blockdsp_init(&s->bdsp, s->avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
ff_h264chroma_init(&s->h264chroma, 8); //for lowres
|
||||
ff_hpeldsp_init(&s->hdsp, s->avctx->flags);
|
||||
ff_mpegvideodsp_init(&s->mdsp);
|
||||
|
@ -670,7 +670,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
|
||||
avctx->color_range = AVCOL_RANGE_JPEG;
|
||||
|
||||
ff_blockdsp_init(&s->bdsp, avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
|
||||
s->prev_frame = av_frame_alloc();
|
||||
if (!s->prev_frame)
|
||||
|
@ -177,7 +177,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
av_log(avctx, AV_LOG_DEBUG, "Auto bitdepth precision. Use 12b decoding based on codec tag.\n");
|
||||
}
|
||||
|
||||
ff_blockdsp_init(&ctx->bdsp, avctx);
|
||||
ff_blockdsp_init(&ctx->bdsp);
|
||||
ret = ff_proresdsp_init(&ctx->prodsp, avctx);
|
||||
if (ret < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Fail to init proresdsp for bits per raw sample %d\n", avctx->bits_per_raw_sample);
|
||||
|
@ -665,7 +665,7 @@ static av_cold int speedhq_decode_init(AVCodecContext *avctx)
|
||||
if (ret)
|
||||
return AVERROR_UNKNOWN;
|
||||
|
||||
ff_blockdsp_init(&s->bdsp, avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
ff_idctdsp_init(&s->idsp, avctx);
|
||||
ff_init_scantable(s->idsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct);
|
||||
|
||||
|
@ -540,7 +540,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
|
||||
// That this is necessary might indicate a bug.
|
||||
ff_vc1_decode_end(avctx);
|
||||
|
||||
ff_blockdsp_init(&s->bdsp, avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
ff_h264chroma_init(&v->h264chroma, 8);
|
||||
ff_qpeldsp_init(&s->qdsp);
|
||||
|
||||
|
@ -29,7 +29,7 @@ av_cold void ff_wmv2_common_init(MpegEncContext *s)
|
||||
{
|
||||
WMV2Context *const w = s->private_ctx;
|
||||
|
||||
ff_blockdsp_init(&s->bdsp, s->avctx);
|
||||
ff_blockdsp_init(&s->bdsp);
|
||||
ff_wmv2dsp_init(&w->wdsp);
|
||||
s->idsp.perm_type = w->wdsp.idct_perm;
|
||||
ff_init_scantable_permutation(s->idsp.idct_permutation,
|
||||
|
@ -29,8 +29,7 @@ void ff_clear_block_avx(int16_t *block);
|
||||
void ff_clear_blocks_sse(int16_t *blocks);
|
||||
void ff_clear_blocks_avx(int16_t *blocks);
|
||||
|
||||
av_cold void ff_blockdsp_init_x86(BlockDSPContext *c,
|
||||
AVCodecContext *avctx)
|
||||
av_cold void ff_blockdsp_init_x86(BlockDSPContext *c)
|
||||
{
|
||||
#if HAVE_X86ASM
|
||||
int cpu_flags = av_get_cpu_flags();
|
||||
|
@ -57,10 +57,9 @@ void checkasm_check_blockdsp(void)
|
||||
LOCAL_ALIGNED_32(uint16_t, buf0, [6 * 8 * 8]);
|
||||
LOCAL_ALIGNED_32(uint16_t, buf1, [6 * 8 * 8]);
|
||||
|
||||
AVCodecContext avctx = { 0 };
|
||||
BlockDSPContext h;
|
||||
|
||||
ff_blockdsp_init(&h, &avctx);
|
||||
ff_blockdsp_init(&h);
|
||||
|
||||
check_clear(clear_block, 8 * 8);
|
||||
check_clear(clear_blocks, 8 * 8 * 6);
|
||||
|
Loading…
Reference in New Issue
Block a user