Commit Graph

21 Commits

Author SHA1 Message Date
James Almer f78172b29a avcodec/libdav1d: add support for RGB streams
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27 13:21:52 -03:00
James Almer 254da41531 avcodec/libdav1d: assert Dav1dPicture allocator_data is set before referencing its data
To ensure the custom allocator is effectively used.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27 12:49:01 -03:00
James Almer 0e07b767c8 avcodec/libdav1d: export level from the Sequence Header
Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-27 12:47:33 -03:00
James Almer fbc5a27694 avcodec/libdav1d: fine tune thread distribution
As suggested by Ronald, don't map auto threads to frame threads only, and
instead distribute them between frame and tile more efficiently.
Add a new framethreads override option, similar to the tilethreads one.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-05-20 16:20:04 -03:00
James Almer 9e62e1a110 avcodec/libdav1d: use a reference to the allocated buffer instead of wrapping the Dav1dPicture
Removes an av_malloc() per frame.

Reviewed-by: BBB
Reviewed-by: nevcairiel
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-19 14:04:08 -03:00
James Almer 5cd60b6f2e avcodec/libdav1d: reset pool size on allocation failure
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-19 14:03:39 -03:00
James Almer f6803cfbd2 avcodec/libdav1d: unref the frame on failure
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:45:10 -03:00
Vittorio Giovara 38a4132132 libdav1d: Add support for reading hdr10 metadata
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:36:30 -03:00
James Almer 36bb2cc200 avcodec/libdav1d: consistently use AVERROR return values
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:18:14 -03:00
James Almer 28746a0e20 avcodec/libdav1d: use a custom picture allocator
Replaces the libdav1d internal allocator. It uses an AVBufferPool to reduce the
amount of allocated buffers.
About 5% speed up when decoding 720p or higher streams.

Reviewed-by: "Vittorio Giovara <vittorio.giovara@gmail.com>"
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:17:45 -03:00
James Almer 2a31bf2a35 avcodec/libdav1d: move the pix_fmt enum array up in the file
This is in preparation for the following commit.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:09:43 -03:00
James Almer dcf64b599d avcodec/libdav1d: route dav1d internal logs through av_log()
Bump the minimum required version to the first one with the logger API callback.

Reviewed-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-12 19:07:50 -03:00
James Almer 10931a0661 avcodec/libdav1d: properly free all output picture references
Dav1dPictures contain more than one buffer reference, so we're forced to use the
API properly to free them all.

Reviewed-by: BBB
Signed-off-by: James Almer <jamrial@gmail.com>
2019-01-08 15:40:50 -03:00
James Almer 0e833f615b avcodec/libdav1d: add support for 12bit streams
Signed-off-by: James Almer <jamrial@gmail.com>
2018-12-12 00:07:13 -03:00
James Almer e695b0beba avcodec/libdav1d: add an option to toggle Film Grain
Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-28 23:05:10 -03:00
James Almer 0fca2f60da avcodec/libdav1d: read profile from the sequence header referenced by the ouput picture
Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-28 23:04:22 -03:00
James Almer 3cd275bcde avcodec/libdav1d: use constants defined in the public API to limit thread count
Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-28 23:04:21 -03:00
James Almer 53ca505acc avcodec/libdav1d: remove init cleanup internal codec cap
It's no longer needed now that the AVFifoBuffer was removed.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-28 23:04:03 -03:00
James Almer cc25529420 avcodec/libdav1d: update the API usage after upstream changes
The color fields were moved to another struct, and a way to propagate
timestamps and other input metadata was introduced, so the packet fifo
can be removed.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-25 21:42:10 -03:00
James Almer 752659327d avcodec/libdav1d: fix build after a recent API break
Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-14 10:05:25 -03:00
James Almer beaa350e24 avcodec: libdav1d AV1 decoder wrapper.
Originally written by Ronald S. Bultje, with fixes, optimizations and
improvements by James Almer.

Signed-off-by: James Almer <jamrial@gmail.com>
2018-11-05 21:48:11 -03:00