]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/kmvc: Move commonly used variables to the front of the context
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Mon, 22 Mar 2021 01:28:11 +0000 (02:28 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 24 Mar 2021 23:32:47 +0000 (00:32 +0100)
Reduces codesize because the offset in pointer+offset addressing
requires less bytes to encode. Reduces the size of .text from 8871B
to 8146B (GCC 10, -O3, x64).

Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/kmvc.c

index 8d9f0a96937a3d2e8ece287a866d572a3b652bda..dd1ae05f2dbae7e6be79ff7e194eff9c7e8ac382 100644 (file)
 typedef struct KmvcContext {
     AVCodecContext *avctx;
 
+    GetByteContext g;
+    uint8_t *cur, *prev;
     int setpal;
     int palsize;
     uint32_t pal[MAX_PALSIZE];
-    uint8_t *cur, *prev;
     uint8_t frm0[320 * 200], frm1[320 * 200];
-    GetByteContext g;
 } KmvcContext;
 
 typedef struct BitBuf {