[FFmpeg-cvslog] h264_cabac: Mark functions calling decode_cabac_residual_internal as noinline

Diego Biurrun git at videolan.org
Sun Aug 25 12:39:10 CEST 2013


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Fri Aug 16 00:29:23 2013 +0200| [ff9d57e7dfc8c171bea3fb9129aa87fa28d89f18] | committer: Diego Biurrun

h264_cabac: Mark functions calling decode_cabac_residual_internal as noinline

This ensures that decode_cabac_residual_internal actually does get inlined,
which it otherwise does not, even though it is marked as always_inline.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ff9d57e7dfc8c171bea3fb9129aa87fa28d89f18
---

 libavcodec/h264_cabac.c |   29 +++++++++++++++++------------
 1 file changed, 17 insertions(+), 12 deletions(-)

diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 79b715f..43ddf7d 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -27,6 +27,7 @@
 
 #define CABAC(h) 1
 
+#include "libavutil/attributes.h"
 #include "config.h"
 #include "cabac.h"
 #include "cabac_functions.h"
@@ -1740,26 +1741,30 @@ decode_cabac_residual_internal(H264Context *h, int16_t *block,
 
 }
 
-static void decode_cabac_residual_dc_internal(H264Context *h, int16_t *block,
-                                              int cat, int n,
-                                              const uint8_t *scantable,
-                                              int max_coeff)
+static av_noinline void decode_cabac_residual_dc_internal(H264Context *h,
+                                                          int16_t *block,
+                                                          int cat, int n,
+                                                          const uint8_t *scantable,
+                                                          int max_coeff)
 {
     decode_cabac_residual_internal(h, block, cat, n, scantable, NULL, max_coeff, 1, 0);
 }
 
-static void decode_cabac_residual_dc_internal_422(H264Context *h, int16_t *block,
-                                                  int cat, int n, const uint8_t *scantable,
-                                                  int max_coeff)
+static av_noinline void decode_cabac_residual_dc_internal_422(H264Context *h,
+                                                              int16_t *block,
+                                                              int cat, int n,
+                                                              const uint8_t *scantable,
+                                                              int max_coeff)
 {
     decode_cabac_residual_internal(h, block, cat, n, scantable, NULL, max_coeff, 1, 1);
 }
 
-static void decode_cabac_residual_nondc_internal(H264Context *h, int16_t *block,
-                                                 int cat, int n,
-                                                 const uint8_t *scantable,
-                                                 const uint32_t *qmul,
-                                                 int max_coeff)
+static av_noinline void decode_cabac_residual_nondc_internal(H264Context *h,
+                                                             int16_t *block,
+                                                             int cat, int n,
+                                                             const uint8_t *scantable,
+                                                             const uint32_t *qmul,
+                                                             int max_coeff)
 {
     decode_cabac_residual_internal(h, block, cat, n, scantable, qmul, max_coeff, 0, 0);
 }



More information about the ffmpeg-cvslog mailing list