Andreas Rheinhardt
c9168717bf
avcodec/h274: Make H274FilmGrainDatabase a shared object
...
Right now, the private contexts of every decoder supporting
H.274 film grain synthesis (namely H.264, HEVC and VVC)
contain a H274FilmGrainDatabase; said structure is very large
700442B before this commit) and takes up the overwhelming
majority of said contexts: Removing it reduces sizeof(H264Context)
by 92.88%, sizeof(HEVCContext) by 97.78% and sizeof(VVCContext)
by 99.86%. This is especially important for H.264 and HEVC
when using frame-threading.
The content of said film grain database does not depend on
any input parameter; it is shareable between all its users and
could be hardcoded in the binary (but isn't, because it is so huge).
This commit adds a database with static storage duration to h274.c
and uses it instead of the elements in the private contexts above.
It is still lazily initialized as-needed; a mutex is used
for the necessary synchronization. An alternative would be to use
an AV_ONCE to initialize the whole database either in the decoders'
init function (which would be wasteful given that most videos
don't use film grain synthesis) or in ff_h274_apply_film_grain().
Reviewed-by: Niklas Haas <ffmpeg@haasn.dev >
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com >
2025-09-22 04:54:22 +02:00
..
2025-08-19 14:32:21 +00:00
2025-09-21 19:39:27 +00:00
2025-09-13 20:45:42 +00:00
2025-09-22 04:54:22 +02:00
2025-09-22 04:54:22 +02:00
2025-09-19 23:12:59 +00:00
2025-09-02 16:05:46 +02:00
2025-09-03 06:48:02 +00:00
2025-09-01 09:22:39 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-08-20 11:20:11 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-08-29 12:29:52 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-15 17:52:21 +02:00
2025-09-02 17:06:24 +02:00
2025-09-02 17:06:24 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-04 10:15:09 +02:00
2025-09-04 10:15:09 +02:00
2025-09-04 10:15:09 +02:00
2025-09-04 10:15:09 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-08 21:13:09 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-08-31 16:48:03 +05:30
2025-09-02 17:06:24 +02:00
2025-09-02 17:06:24 +02:00
2025-09-02 17:06:24 +02:00
2025-09-03 11:56:06 +02:00
2025-09-03 11:56:06 +02:00
2025-09-03 11:56:06 +02:00
2025-09-16 15:41:50 -03:00
2025-09-01 12:07:41 -03:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-08-31 07:05:36 +00:00
2025-08-31 07:05:36 +00:00
2025-08-31 07:05:36 +00:00
2025-09-13 20:37:03 +00:00
2025-08-19 11:25:39 -03:00
2025-09-15 17:52:21 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-01 12:07:41 -03:00
2025-09-18 11:06:16 +00:00
2025-08-24 12:34:15 +00:00
2025-09-02 17:06:25 +02:00
2025-09-02 17:06:25 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-22 04:54:22 +02:00
2025-09-13 20:37:03 +00:00
2025-09-22 04:54:22 +02:00
2025-09-22 04:54:22 +02:00
2025-09-22 04:54:22 +02:00
2025-09-16 15:42:03 -03:00
2025-08-15 13:55:51 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-02 17:06:25 +02:00
2025-09-02 17:06:25 +02:00
2025-09-02 17:06:25 +02:00
2025-08-25 10:43:23 -03:00
2025-09-02 15:56:56 +02:00
2025-09-02 15:56:56 +02:00
2025-09-15 17:52:21 +02:00
2025-09-06 15:51:41 -04:00
2025-09-02 17:06:25 +02:00
2025-09-04 07:01:13 -04:00
2025-09-13 20:37:03 +00:00
2025-08-19 11:25:39 -03:00
2025-08-19 11:25:39 -03:00
2025-09-12 17:11:26 +02:00
2025-09-01 12:40:36 +00:00
2025-09-13 20:37:03 +00:00
2025-09-15 17:52:22 +02:00
2025-09-15 17:52:22 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-12 21:39:27 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-15 17:52:22 +02:00
2025-08-19 11:25:39 -03:00
2025-09-02 17:06:24 +02:00
2025-09-13 20:37:03 +00:00
2025-09-16 16:28:12 +03:00
2025-09-16 16:28:12 +03:00
2025-09-01 12:07:07 -03:00
2025-09-13 20:37:03 +00:00
2025-09-12 21:37:42 +02:00
2025-09-06 15:11:48 +00:00
2025-09-06 15:11:48 +00:00
2025-09-13 20:37:03 +00:00
2025-09-02 17:06:25 +02:00
2025-09-02 17:06:25 +02:00
2025-08-15 15:06:58 +00:00
2025-09-16 15:41:50 -03:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-14 21:35:54 +08:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-08-21 21:02:40 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-08-19 11:26:40 -04:00
2025-08-19 11:26:40 -04:00
2025-08-21 22:48:16 +00:00
2025-09-17 02:17:09 +00:00
2025-09-17 02:17:09 +00:00
2025-08-15 18:00:11 +02:00
2025-09-05 17:21:30 +00:00
2025-09-13 20:37:03 +00:00
2025-08-15 13:55:51 +00:00
2025-08-15 13:55:51 +00:00
2025-08-15 13:55:51 +00:00
2025-08-15 13:55:51 +00:00
2025-08-15 13:55:51 +00:00
2025-09-17 06:40:16 +00:00
2025-09-08 00:19:06 +00:00
2025-09-08 14:03:52 +00:00
2025-09-13 20:37:03 +00:00
2025-09-01 11:00:44 -03:00
2025-08-29 17:32:52 +02:00
2025-09-02 17:06:24 +02:00
2025-09-10 20:33:40 +08:00
2025-08-20 11:20:14 +02:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-08-14 00:08:10 +00:00
2025-09-13 20:37:03 +00:00
2025-08-15 13:55:51 +00:00
2025-08-15 13:55:51 +00:00
2025-08-15 13:55:51 +00:00
2025-08-19 10:07:01 -04:00
2025-09-13 20:37:03 +00:00
2025-09-15 17:52:21 +02:00
2025-09-01 12:07:41 -03:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00
2025-09-13 20:37:03 +00:00