summaryrefslogtreecommitdiff
path: root/libavcodec/h265_profile_level.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-01 16:15:54 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-04 07:56:40 +0200
commit0172deccc4e229e0b22f3e776f71e6e4b5a08e35 (patch)
treedf1fac6fce3b20412d78e987b2f8262c72a328c0 /libavcodec/h265_profile_level.h
parenta590dfc242620fc7bd628e9351cbcf940da0e965 (diff)
downloadffmpeg-0172deccc4e229e0b22f3e776f71e6e4b5a08e35.tar.gz
avcodec/h264_levels, h265_profile_level: Avoid relocations
H.264 and H.265 levels' names are usually of the form "x" or "x.y" with x and y being single digits; the one exception are the H.264 1b levels. All of those levels' names fit into a char[4] and it is likely that this future levels will do so, too. Therefore this commit changes the H26(4|5)LevelDescriptor structures to use such a char [4] instead of a pointer to a const char. This makes the structures smaller (when sizeof(char*) == 8) and avoids relocations, thereby moving the corresponding arrays from .data.rel.ro into .rodata. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/h265_profile_level.h')
-rw-r--r--libavcodec/h265_profile_level.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/h265_profile_level.h b/libavcodec/h265_profile_level.h
index f1a11f51dc..cd30ac5c50 100644
--- a/libavcodec/h265_profile_level.h
+++ b/libavcodec/h265_profile_level.h
@@ -25,7 +25,7 @@
typedef struct H265LevelDescriptor {
- const char *name;
+ char name[4]; // Large enough for all current levels like "4.1"
uint8_t level_idc;
// Table A.6.