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
293293
294294 av_cold int ff_dct_encode_init(MpegEncContext *s)
295295 {
296+ s->dct_quantize = dct_quantize_c;
297+ s->denoise_dct = denoise_dct_c;
298+
296299 #if ARCH_MIPS
297300 ff_mpvenc_dct_init_mips(s);
298301 #elif ARCH_X86
299302 ff_dct_encode_init_x86(s);
300303 #endif
301304
302− if (!s->dct_quantize)
303− s->dct_quantize = dct_quantize_c;
304− if (!s->denoise_dct)
305− s->denoise_dct = denoise_dct_c;
306305 s->fast_dct_quantize = s->dct_quantize;
307306 if (s->avctx->trellis)
308307 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