aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/g726.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-03-30 23:28:24 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-04-05 20:02:37 +0200
commit4243da4ff42e306b3622b181e12f5cd127d21414 (patch)
treea74a6b85a179795431a0ee2b259be8c35f0ed799 /libavcodec/g726.c
parentce7dbd0481f990e249c2a05f179228489d3062cf (diff)
downloadffmpeg-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/g726.c')
-rw-r--r--libavcodec/g726.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/g726.c b/libavcodec/g726.c
index 0e19a2a8fc..3bf0da3949 100644
--- a/libavcodec/g726.c
+++ b/libavcodec/g726.c
@@ -408,7 +408,7 @@ const FFCodec ff_adpcm_g726_encoder = {
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
.priv_data_size = sizeof(G726Context),
.init = g726_encode_init,
- .encode2 = g726_encode_frame,
+ FF_CODEC_ENCODE_CB(g726_encode_frame),
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.p.priv_class = &g726_class,
@@ -426,7 +426,7 @@ const FFCodec ff_adpcm_g726le_encoder = {
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_SMALL_LAST_FRAME,
.priv_data_size = sizeof(G726Context),
.init = g726_encode_init,
- .encode2 = g726_encode_frame,
+ FF_CODEC_ENCODE_CB(g726_encode_frame),
.p.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.p.priv_class = &g726_class,
@@ -509,7 +509,7 @@ const FFCodec ff_adpcm_g726_decoder = {
.p.id = AV_CODEC_ID_ADPCM_G726,
.priv_data_size = sizeof(G726Context),
.init = g726_decode_init,
- .decode = g726_decode_frame,
+ FF_CODEC_DECODE_CB(g726_decode_frame),
.flush = g726_decode_flush,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
@@ -523,7 +523,7 @@ const FFCodec ff_adpcm_g726le_decoder = {
.p.id = AV_CODEC_ID_ADPCM_G726LE,
.priv_data_size = sizeof(G726Context),
.init = g726_decode_init,
- .decode = g726_decode_frame,
+ FF_CODEC_DECODE_CB(g726_decode_frame),
.flush = g726_decode_flush,
.p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_CHANNEL_CONF,
.p.long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM little-endian"),