Browse Source

avcodec/rv34: Move dsp init code to rv30/rv40

It avoids both runtime and compile-time checks.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
master
Andreas Rheinhardt 4 years ago
parent
commit
4e65a41a5c
3 changed files with 2 additions and 9 deletions
  1. +1
    -0
      libavcodec/rv30.c
  2. +0
    -9
      libavcodec/rv34.c
  3. +1
    -0
      libavcodec/rv40.c

+ 1
- 0
libavcodec/rv30.c View File

@@ -285,6 +285,7 @@ static av_cold int rv30_decode_init(AVCodecContext *avctx)
r->loop_filter = rv30_loop_filter; r->loop_filter = rv30_loop_filter;
r->luma_dc_quant_i = rv30_luma_dc_quant; r->luma_dc_quant_i = rv30_luma_dc_quant;
r->luma_dc_quant_p = rv30_luma_dc_quant; r->luma_dc_quant_p = rv30_luma_dc_quant;
ff_rv30dsp_init(&r->rdsp);
return 0; return 0;
} }




+ 0
- 9
libavcodec/rv34.c View File

@@ -1503,15 +1503,6 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx)


ff_h264_pred_init(&r->h, AV_CODEC_ID_RV40, 8, 1); ff_h264_pred_init(&r->h, AV_CODEC_ID_RV40, 8, 1);


#if CONFIG_RV30_DECODER
if (avctx->codec_id == AV_CODEC_ID_RV30)
ff_rv30dsp_init(&r->rdsp);
#endif
#if CONFIG_RV40_DECODER
if (avctx->codec_id == AV_CODEC_ID_RV40)
ff_rv40dsp_init(&r->rdsp);
#endif

if ((ret = rv34_decoder_alloc(r)) < 0) { if ((ret = rv34_decoder_alloc(r)) < 0) {
ff_mpv_common_end(&r->s); ff_mpv_common_end(&r->s);
return ret; return ret;


+ 1
- 0
libavcodec/rv40.c View File

@@ -567,6 +567,7 @@ static av_cold int rv40_decode_init(AVCodecContext *avctx)
r->loop_filter = rv40_loop_filter; r->loop_filter = rv40_loop_filter;
r->luma_dc_quant_i = rv40_luma_dc_quant[0]; r->luma_dc_quant_i = rv40_luma_dc_quant[0];
r->luma_dc_quant_p = rv40_luma_dc_quant[1]; r->luma_dc_quant_p = rv40_luma_dc_quant[1];
ff_rv40dsp_init(&r->rdsp);
return 0; return 0;
} }




Loading…
Cancel
Save