1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
Commit Graph

15 Commits

Author SHA1 Message Date
James Almer
5a562f518f avcodec/av1_parser: don't set AVCodecContext frame dimensions
Let the internal decoder take care of it, as frame reordering
may result in different values exported by either module.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-09-12 13:10:16 -03:00
James Almer
bab3c32351 avcodec/av1_parser: don't set AVCodecContext pixel format
This is a property a decoder must set, not a parser.

Signed-off-by: James Almer <jamrial@gmail.com>
2020-09-12 12:16:06 -03:00
James Almer
0892b04509 avcodec/av1_parser: fix parsing show_existing_frame headers
Regression since c8716b5029

Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-25 15:01:43 -03:00
James Almer
c8716b5029 avcodec/av1_parser: read frame properties directly from AV1RawFrameHeader
Simplifies code

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-08-23 20:54:15 -03:00
Andreas Rheinhardt
1bdbc50bf4 avcodec/cbs: Remove unused function parameters
Several cbs-functions had an unused CodedBitstreamContext parameter.
This commit removes these.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2020-07-07 04:46:51 +02:00
Manoj Bonda
23d06f606e avcodec/av1_parser: initialize avctx->pix_fmt
Initialize avctx->pix_fmt in av1_parser.c
AV1 Chroma format is invalid when quering using below code if no AV1 decoder
is available:

iVideoStream = av_find_best_stream(fmtc, AVMEDIA_TYPE_VIDEO, -1, -1, NULL, 0);
eChromaFormat = (AVPixelFormat)fmtc->streams[iVideoStream]->codecpar->format;

Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-19 11:05:30 -03:00
James Almer
af6cddae1f avcodec/av1_parser: add missing parsing for RGB pixel format signaling
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-19 11:05:30 -03:00
James Almer
634a44db5a avcodec/av1_parser: set context values outside the OBU parsing loop
Signed-off-by: James Almer <jamrial@gmail.com>
2020-06-19 11:05:30 -03:00
James Almer
5e62100152 avcodec/av1_parser: export color information
Should fix fate-lavf-fate-av1.mkv failures on builds without an AV1 decoder.

Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
2020-01-26 15:30:26 -03:00
James Almer
5985ca0436 avcodec/av1_parser: skip frames with spatial_id > 0
This fixes marking keyframes in svc samples.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-12-02 14:38:52 -03:00
James Almer
378065f08f avcodec/av1_parser: export stream dimensions in avctx
This is required to demux annexb samples when a decoder isn't available.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-29 18:58:34 -03:00
James Almer
0b8742521f avcodec/av1_parser: export bitstream timing info when available
Based on h264_parser code.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-11-12 22:21:40 -03:00
James Almer
699d0c2a30 avcodec/av1_parser: don't abort parsing the first frame if extradata parsing fails
The first frame contains the sequence header, which is needed to parse every
following frame.

This fixes parsing streams with broken extradata but correct packet data.

Signed-off-by: James Almer <jamrial@gmail.com>
2019-03-24 18:26:49 -03:00
Andreas Rheinhardt
b8c45bbcbc libavcodec/cbs: Stop needlessly reallocating the units array
Currently, a fragment's unit array is constantly reallocated during
splitting of a packet. This commit changes this: One can keep the units
array by distinguishing between the number of allocated and the number
of valid units in the units array.

The more units a packet is split into, the bigger the benefit.
So MPEG-2 benefits the most; for a video coming from an NTSC-DVD
(usually 32 units per frame) the average cost of cbs_insert_unit (for a
single unit) went down from 6717 decicycles to 450 decicycles (based
upon 10 runs with 4194304 runs each); if each packet consists of only
one unit, it went down from 2425 to 448; for a H.264 video where most
packets contain nine units, it went from 4431 to 450.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@googlemail.com>
2019-02-25 21:40:13 +00:00
James Almer
ebc3d04b8d avcodec: add an AV1 parser
Simple parser to set keyframes, frame type, structure, width, height, and pixel
format, plus stream profile and level.

Reviewed-by: Mark Thompson <sw@jkqxz.net>
Signed-off-by: James Almer <jamrial@gmail.com>
2018-10-03 20:48:49 -03:00