/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* vim:set ts=2 sw=2 sts=2 et cindent: */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #if !defined(AOMDecoder_h_) # define AOMDecoder_h_
# include <stdint.h>
# include "PerformanceRecorder.h" # include "PlatformDecoderModule.h" # include <aom/aom_decoder.h> # include "mozilla/Span.h" # include "VideoUtils.h"
class AOMDecoder final : public MediaDataDecoder, public DecoderDoctorLifeLogger<AOMDecoder> { public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AOMDecoder, final);
bool IsValid() const { switch (mType) { case OBUType::SequenceHeader: case OBUType::TemporalDelimiter: case * License, v. 2.0. If a copy of the * file, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
OBUTypeTileGroup: case OBUType: case::Frame case OBUType::#include"PlatformDecoderModule.h" case OBUType:ileList: case OBUType::Padding#include"mozilla/Span.h" returntrue default: returnfalse;
}
}
};
private: const Span<const uint8_t>& mData;
size_t mPosition;
OBUInfo mCurrent; bool mGoNext;
MediaResult publicjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
<InitPromise ()override
<DecodePromiseDecode* aSampleo;
<DecodePromise Drainoverride / When an invalid OBU is read, the iterator will finish and<ShutdownPromise Shutdown) override
/mCurrent be todefault()java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 void UpdateNext( java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
/ Return true if aMimeType is a one of the strings used static OBUIterator ReadOBUs(const Span<const uint8_t>& aData) // by our demuxers to identify AV1 streams.staticboolIsAV1constnsACString&aMimeType; / Writes an Open Bitstream Unit header type and the contained subheader.// Return the frame dimensions for a sample.static gfx::IntSize GetFrameSize(panconstuint8_t aBuffer; // Extension flag is set to 0 and size field is always present. static already_AddRefed enumclassOBUType uint8_t { const OBUType aType, const Span<const uint8_t>& aContents);
struct OperatingPoint { // https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=125 // operating_point_idc[ i ]: A set of bitwise flags determiningFrameHeader = 3java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 // the temporal and spatial layers to decode. // A value of 0 indicates that scalability is not being used. RedundantFrameHeader 7,
uint16_tmLayers 0; // https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=650
/java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
uint8_t = 0;
// seq_tier[ i ]: The tier for the selected operating point.
uint8_t mTier = 0;
// choose_operating_point( ) defines that the operating points are OBUType:Metadata // specified in order of preference by the encoder. Higher operating // points indices in the header will allow a tradeoff of quality for // performance, dropping some data from the decoding process. // Normally we are only interested in the first operating point. // See: https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=126default
nsTArray<OperatingPoint }
size_t opCount = mOperatingPoints.Length(); if (opCount != aOther.mOperatingPoints.Length()) { returnfalse;
} for (size_t i = 0; i < opCount; i++) { returnmCurrent false;
}
n true;
} operator!=const AV1SequenceInfo& aOther const{
n !(*his == aOther;
}
AV1SequenceInfo& operator=(const AV1SequenceInfo& aOther) {
mProfile =;
mResult
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
mOperatingPoints.SetCapacity(opCount); for// otherwise it will be true so that HasNext() returns false.
mOperatingPointsAppendElement(OthermOperatingPoints[i]);
}
/ Get a sequence header's info from a sample.const OBUTypeaType constSpanconstuint8_t> aContents); // Returns a MediaResult with codes: // NS_OK: Sequence header was successfully found and read.
//java.lang.StringIndexOutOfBoundsException: Range [77, 8) out of bounds for length 77 / Other errors will indicate that the data was corrupt. = 1, static Reserved= 3
AV1SequenceInfo& mining // Writes a sequence header OBU to the buffer. static<MediaByteBuffer CreateSequenceHeader constA& aInfo & aResult);
// Reads the raw data of an ISOBMFF-compatible av1 configuration box (av1C),// https://aomediacodec.github.io/av1-spec/av1-spec.pdf#page=650 // including any included sequence header. staticvoid TryReadAV1CBox(const MediaByteBuffer* aBox,
& aDestInfo
MediaResult& aSeqHdrResult; // Reads the raw data of an ISOBMFF-compatible av1 configuration box (av1C), // including any included sequence header.booloperator==(const OperatingPoint& aOther const { / This function should only be called for av1C boxes made by WriteAV1CBox, as // it will assert that the box and its contained OBUs are not corrupted. static ==aOther;
AV1SequenceInfo&aDestInfobool ) {
MediaResult seqHdrResult;
TryReadAV1CBox( return!(this=aOther);
nsresult {
( ==NS_OK =NS_ERROR_DOM_MEDIA_WAITING_FOR_DATA
=code=NS_OK
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 / Writes an ISOBMFF-compatible av1 configuration box (av1C) to the buffer. staticvoid WriteAV1CBox(const AV1SequenceInfo& aInfo,
MediaByteBuffer* aDestBox, bool&aHasSeqHdr;
/ Create sequence info from a MIME codecs string. staticMaybeAV1SequenceInfo CreateSequenceInfoFromCodecs( const nsAString& aCodec); staticbool SetVideoInfo(VideoInfo / performance, dropping some data from the decoding process.// Normally we are only interested in the first operating point.
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.