diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-03-30 23:28:24 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-04-05 20:02:37 +0200 |
commit | 4243da4ff42e306b3622b181e12f5cd127d21414 (patch) | |
tree | a74a6b85a179795431a0ee2b259be8c35f0ed799 /libavcodec/mpegaudiodec_float.c | |
parent | ce7dbd0481f990e249c2a05f179228489d3062cf (diff) | |
download | ffmpeg-4243da4ff42e306b3622b181e12f5cd127d21414.tar.gz |
avcodec/codec_internal: Use union for FFCodec decode/encode callbacks
This is possible, because every given FFCodec has to implement
exactly one of these. Doing so decreases sizeof(FFCodec) and
therefore decreases the size of the binary.
Notice that in case of position-independent code the decrease
is in .data.rel.ro, so that this translates to decreased
memory consumption.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mpegaudiodec_float.c')
-rw-r--r-- | libavcodec/mpegaudiodec_float.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/mpegaudiodec_float.c b/libavcodec/mpegaudiodec_float.c index c4fd64a85f..bcd55069a0 100644 --- a/libavcodec/mpegaudiodec_float.c +++ b/libavcodec/mpegaudiodec_float.c @@ -81,7 +81,7 @@ const FFCodec ff_mp1float_decoder = { .p.id = AV_CODEC_ID_MP1, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, - .decode = decode_frame, + FF_CODEC_DECODE_CB(decode_frame), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .flush = flush, @@ -99,7 +99,7 @@ const FFCodec ff_mp2float_decoder = { .p.id = AV_CODEC_ID_MP2, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, - .decode = decode_frame, + FF_CODEC_DECODE_CB(decode_frame), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .flush = flush, @@ -117,7 +117,7 @@ const FFCodec ff_mp3float_decoder = { .p.id = AV_CODEC_ID_MP3, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, - .decode = decode_frame, + FF_CODEC_DECODE_CB(decode_frame), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .flush = flush, @@ -135,7 +135,7 @@ const FFCodec ff_mp3adufloat_decoder = { .p.id = AV_CODEC_ID_MP3ADU, .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, - .decode = decode_frame_adu, + FF_CODEC_DECODE_CB(decode_frame_adu), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .flush = flush, @@ -154,7 +154,7 @@ const FFCodec ff_mp3on4float_decoder = { .priv_data_size = sizeof(MP3On4DecodeContext), .init = decode_init_mp3on4, .close = decode_close_mp3on4, - .decode = decode_frame_mp3on4, + FF_CODEC_DECODE_CB(decode_frame_mp3on4), .p.capabilities = AV_CODEC_CAP_CHANNEL_CONF | AV_CODEC_CAP_DR1, .flush = flush_mp3on4, |