History

avcodec/mpegvideo_enc: Always set c funcs in ff_dct_encode_init()

Use the common approach whereby the _c versions are set first and then (potentially) overwritten by the arch-specific ones instead of calling the arch-specific code first, followed by setting the function pointers that have not already been set.

Andreas Rheinhardt committed 2 years ago

Commit e80bd061 parent 83278281 file · +3 −4Browse files

Unified · Split

libavcodec/mpegvideo_enc.c+3−4
@@ -293,16 +293,15 @@ static void mpv_encode_defaults(MpegEncContext *s) · 292 unmodified lines
293 293
294av_cold int ff_dct_encode_init(MpegEncContext *s)294av_cold int ff_dct_encode_init(MpegEncContext *s)
295{295{
296 s->dct_quantize = dct_quantize_c;
297 s->denoise_dct = denoise_dct_c;
298
296#if ARCH_MIPS299#if ARCH_MIPS
297 ff_mpvenc_dct_init_mips(s);300 ff_mpvenc_dct_init_mips(s);
298#elif ARCH_X86301#elif ARCH_X86
299 ff_dct_encode_init_x86(s);302 ff_dct_encode_init_x86(s);
300#endif303#endif
301 304
302 if (!s->dct_quantize)
303 s->dct_quantize = dct_quantize_c;
304 if (!s->denoise_dct)
305 s->denoise_dct = denoise_dct_c;
306 s->fast_dct_quantize = s->dct_quantize;305 s->fast_dct_quantize = s->dct_quantize;
307 if (s->avctx->trellis)306 if (s->avctx->trellis)
308 s->dct_quantize = dct_quantize_trellis_c;307 s->dct_quantize = dct_quantize_trellis_c;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t