Note that support of very big block sizes is not currently supported at all due
too flawed logic in decoder.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Move wi.clipping computation outside of psy_lame_window, LFE
channels don't even call that, and make the LFE path also
initialize window_type[1] which is needed by analyze_channel
Modifying global header extradata in encode_frame is an API violation
and only happens to work currently because mov writes its header
at the end of the file.
Heavily based off of a patch from 2012.
Original-by: Nicolas George <george@nsup.org>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This fixes issues if the permutation changes, as quantizations tables would need to be reread
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
The AVCodecContext is only used for logging, so instead take any valid log context.
This allows reusing the exif functions more easily in avformat.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
CMVideoFormatDescriptionGetH264ParameterSetAtIndex() fails on some
hardware/OS versions when retrieving the parameter set count alone.
Signed-off-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
Fixes crash in #5352. VTCompressionSessionInvalidate() crashes if the
internal encoder hasn't completed, but hasn't experienced an error.
The function call isn't needed since the encoder is invalidated when
the reference count reaches 0 anyway.
Signed-off-by: Rick Kern <kernrj@gmail.com>
Signed-off-by: wm4 <nfxjfg@googlemail.com>
lavc/utils already rescales avpkt->pts to sub->pts in AV_TIME_BASE_Q
before calling the decode callback. This prevents from rescaling again
into the decoder, and avoid the use of avctx->time_base which will
disappear in the incoming codecpar merge.
This commit also replaces the use of "20 centisecond" (ass time base)
with "200 ms".
This is added in 10.11, so we add a #define when building against older SDKs.
The decoder actually supports 7.1-channel eac3, but since the parser only
reports 6 channels, we end up decoding the 5.1 downmix (same as the internal
decoder) for now.
- ADTS-formatted AAC didn't work
- Channel layouts were never exported
- Channel mappings were incorrect beyond stereo
- Channel counts weren't updated after packets were decoded
- Timestamps were exported incorrectly
The build failure here is caused by the enum value not being defined, but
as long as we're on a newer SDK that has it, it's safe to use it even
when our deployment target is older. Setting the property will error, but
we're not failing on errors there.
- size variables were used in a confusing way
- incorrect size var use led to channel layouts not being set properly
- channel layouts were incorrectly mapped for >2-channel AAC
- bitrates not accepted by the encoder were discarded instead of being clamped
- some minor style/indentation fixes