Top
audio_capture
audio_decode
audio_encode
audio_lowpower
audio_mixer
audio_processor
audio_render
audio_splitter
image_decode
image_encode
image_fx
resize
source
transition
clock
null_sink
text_scheduler
visualisation
camera
egl_render
hvs
isp
rawcam
video_decode
video_encode
video_render
video_scheduler
video_splitter
Custom Index
Metadata

OMX.broadcom.video_encode

200
video_encode
201

This component accepts raw video frames and compresses them, emitting encoded video. It can accept YUV420 packed planar format, providing the slice height is the same as the frame height so a single buffer is a full frame. To gain efficiency it also accepts a proprietary image format from the camera component.

Header bytes from the codec are sent in buffers (before any data) with the buffer flag OMX_BUFFERFLAG_CODECCONFIG set. The last of these buffers will also have OMX_BUFFERFLAG_ENDOFFRAME set.

PortIndexNotes
200OMX_IndexParamPortDefinition Query / set the format of the raw video frames. eColorFormat must be OMX_COLOR_FormatYUV420PackedPlanar, OMX_COLOR_FormatYUV420PackedSemiPlanar, OMX_COLOR_Format16bitRGB565, OMX_COLOR_Format24bitBGR888, or OMX_COLOR_Format32bitABGR8888. nSliceHeight must be the same as nFrameHeight rounded up to the nearest multiple of 16. nStride must be a multiple of 32. Additional proprietary formats are allowed. This port also accepts being tunnelled with an image domain output port, and will convert fields as necessary.
OMX_IndexParamCameraPoolToEncoderFunction Used to set up proprietary communication with the previous component.
OMX_IndexConfigBrcmUseProprietaryCallback Forces use of proprietary tunnelling between ports.
OMX_IndexParamMinimumAlignment Query the minimum alignment that the component requries on the port.
201OMX_IndexParamPortDefinition Query / set the output format. eCompressionFormat specifies the format to which to encode. nBitrate specifies the target bit rate (unless overridden by OMX_IndexParamVideoBitrate). The output will either use VBR, or no rate control at all if the bitrate is zero.
OMX_IndexParamVideoBitrate Query / set the output bitrate type and target bitrate. Overrides any setting made via the port definition. Can only be set when in LOADED.
OMX_IndexConfigVideoBitrate Allows changing the target bitrate while the component is EXECUTING. Only valid if rate control is enabled (see OMX_IndexParamVideoBitrate).
OMX_IndexParamVideoProfileLevelCurrent Get or set the current profile and level, provided this is supported by the codec itself. At present only the H.264 codec supports this. Setting the level merely sets the bits sent in the headers, and does not change the way that encoding happens.

A value of -1 for either profile or level will result in using the codec's internal defaults for that property.

OMX_IndexParamVideoProfileLevelQuerySupported Allows to client to enumerate the various profile and level supported by the port. Only the highest level is reported for each supported profile.
OMX_IndexConfigVideoAVCIntraPeriod Enable and configure the IDR and intra periodicity for the AVC encoder.
OMX_IndexConfigBrcmVideoEncodedSliceSize Video encoding output slice size.

This config allows the client to set the slice size used in bytes, as opposed to the standard OMX parameters which are in macroblocks.

OMX_IndexConfigBrcmVideoIntraPeriodTime Configure the time between intra frames, in microseconds. Only valid if the framerate is zero (and hence the framerate is inferred from timestamps). This overrides the setting in OMX_IndexConfigBrcmVideoIntraPeriod.
OMX_IndexConfigBrcmVideoIntraPeriod Configure the number of frames between intra frames. This overrides the setting in OMX_IndexConfigBrcmVideoIntraPeriodTime.
OMX_IndexParamBrcmPixelAspectRatio Allows configuring the pixel aspect ratio. Allowed values are: 1:1, 10:11, 16:11, 40:33, 59:54, and 118:81.
OMX_IndexParamBrcmPixelValueRange Allows configuring the pixel value range.
OMX_IndexParamVideoIntraRefresh Configures the intra refresh mode, if supported by the codec.
OMX_IndexConfigBrcmVideoIntraRefresh Configures the intra refresh mode, if supported by the codec. Can be used when the component is executing.
OMX_IndexConfigBrcmVideoEncoderMBRowsPerSlice Configures the number of macro-block rows per slice. Setting the value to zero resets to the default (one slice per frame).
OMX_IndexConfigVideoFramerate Allows run-time changing of the encoder frame rate setting. Overrides any framerate setting found from the source component.
OMX_IndexParamILFifoConfig Allows configuration of the FIFO settings. The FIFO size itself is ignored (the value from the codec is used) but the number of FIFO headers can be modified.
OMX_IndexParamBrcmVideoAVCSEIEnable Enable/disable SEI messages. Enable or disable Supplemental Enhancement Information (SEI) messages to be inserted in the H.264 bitstream.
OMX_IndexParamBrcmVideoAVC_VCLHRDEnable Enable/disable VCL HRD parameters to be inserted to the H.264 SPS header
OMX_IndexParamBrcmVideoAVC_LowDelayHRDEnable Enable/Disable setting low_delay_hrd flag in H.264 header. "big_pictures" that violate the nominal CPB removal times due to the number of bits used by an access unit are permitted when the flag is set.
OMX_IndexParamBrcmVideoAVCInlineHeaderEnable Enable SPS/PPS insertion in the encoder bitstream. If this property is set then SPS/PPS will be output before each IDR frame or P=intrarefresh frame. Whilst designated as a Param, this property can now be changed while the component and/or port is executing. The setting will be forwarded on to the codec to take effect after the next IDR or P=intrarefresh frame.
OMX_IndexParamBrcmVideoAVCSPSTimingEnable Enable the insertion of timing information into the SPS based on the specified output port frame rate.
OMX_IndexParamBrcmVideoAVCInlineVectorsEnable Enable insertion of vectors into the bitstream. Will be added with flags so it is possible to identify the data in the stream
OMX_IndexParamVideoQuantization Query / set the quantization parameters for P and I frames. Only used if rate control has been disabled.
OMX_IndexParamVideoErrorCorrection Allows configuring the error correction modes. Resynch marker spacing is ignored.
OMX_IndexParamCodecConfig Query for codec-specific information.
OMX_IndexParamBrcmNALSSeparate Force NALs to come out in separate buffers. With this enabled, those encoders that support it will produce NALs in separate OMX buffers.
OMX_IndexParamVideoMpeg4 This parameter is handled but only partially filled in by the component. A query might return some zero values and some values might be ignored upon a set depending on what the encoder supports.
OMX_IndexParamVideoAvc This parameter is handled but only partially filled in by the component. A query might return some zero values and some values might be ignored upon a set depending on what the encoder supports.
OMX_IndexParamVideoH263 This parameter is handled but only partially filled in by the component. A query might return some zero values and some values might be ignored upon a set depending on what the encoder supports.
OMX_IndexParamBrcmCRC Query for the latest CRC for output data on this port.
OMX_IndexParamBrcmDataUnit Query the type of data delivery for the encoded data. This port emits OMX_DataUnitCodedPicture format data.
OMX_IndexParamNalStreamFormatSupported Query the supported NAL stream formats (valid only for H.264). For now only OMX_NaluFormatStartCodes and OMX_NaluFormatFourByteInterleaveLength are supported.
OMX_IndexParamNalStreamFormat Query the native NAL stream format (valid only for H.264). The native format is always OMX_NaluFormatStartCodes.
OMX_IndexParamNalStreamFormatSelect Set the NAL stream format (valid only for H.264).
OMX_IndexConfigEncLevelExtension Allow the video encoder to encode at extended capabilities (frame size, bitrate, number of macroblocks per second), instead of those specified by the requested level. Enabled for AVC encoder only.
OMX_IndexParamBrcmVideoEncodeMinQuant Query / set the codec's minimum quantization level.
OMX_IndexParamBrcmVideoEncodeMaxQuant Query / set the codec's maximum quantization level.
OMX_IndexParamBrcmVideoInitialQuant Query / set the codec's initial quantization level.
OMX_IndexParamBrcmVideoRCSliceDQuant Query / set the codec's Slice DQuant level.
OMX_IndexParamBrcmVideoFrameLimitBits Query / set the codec's frame limit in bits (used in RC) .
OMX_IndexParamBrcmVideoPeakRate Query / set the codec's peak rate (used in RC).
OMX_IndexParamBrcmVideoEncodeQpP EncodeQP control. Query / set the codec's P Frame QP if different from I-frames and rate control is disabled
OMX_IndexConfigVideoIntraVOPRefresh Khronos specified equivalent to OMX_IndexConfigBrcmVideoRequestIFrame. Requests an I-frame to be encoded next (it doesn't force a P-frame to be coded next if we are at the OMX_IndexConfigVideoAVCIntraPeriod value).
OMX_IndexConfigBrcmDroppableRunLength When used in conjunction with OMX_IndexParamBrcmDroppablePFrames, set the number of P frames to be treated as droppable before a reference is inserted. A value of 1 is equivalent to OMX_IndexParamBrcmDroppablePFrames=OMX_FALSE, and if the value exceeds nPFrames in OMX_IndexParamVideoAvc then all P frames will be droppable.
200 201OMX_IndexConfigBrcmPortStats Return port statistics.
OMX_IndexParamVideoPortFormat Query / set the video port format. The input port supports uncompressed pixel data, the output port supports a varietary of compressed formats.
 OMX_IndexParamBrcmAllowMemChange Allow the component to change the amount of memory allocated when it goes from LOADED to IDLE and has already allocated memory during an earlier transition. Enabled by default.
OMX_IndexParamBrcmRetainMemory Controls memory allocating during state transitions.
OMX_IndexParamBrcmImmutableInput Require the encoder to not modify the input images. This uses the standard OMX_CONFIG_BOOLEANTYPE structure. If set to OMX_TRUE, the encoder will not modify the input images. Only relevant when using proprietary tunnels.
OMX_IndexParamBrcmDroppablePFrames Require the encoder to select alternate PFrames as not droppable PFrames. This uses the standard code (OMX_CONFIG_BOOLEANTYPE) structure.
OMX_IndexConfigBrcmVideoH264LowLatency Require the encoder to configure the low-latency mode.
OMX_IndexConfigBrcmVideoH264AUDelimiters Access Unit delimiters. Enable/Disable appropriate encoder flags for supplying Access Unit delimiters along with the encoded stream.
OMX_IndexConfigBrcmVideoH264DisableCABAC CABAC Control. Enable/Disable appropriate encoder flags to enable or disable CABAC (H264 ONLY).
OMX_IndexConfigBrcmVideoH264DeblockIDC DEblock IDC control. Enable/Disable Flags for deblock IDC (H264 Only).
OMX_IndexConfigBrcmVideoH264IntraMBMode Intra Macroblock mode. Query/Set intra MB mode (H264 Only).
OMX_IndexConfigBrcmVideoRequestIFrame Request an I frame. If set to OMX_TRUE, the next job submitted will be flagged to be converted as an I-frame. This automatically resets itself. This works with proprietary tunnelling and OMX buffers.
OMX_IndexParamBrcmCRCEnable Query / set whether this component should calcualte CRCs on output data. Setting this index resets CRCs to zero. CRC calculation defaults to off.
OMX_IndexConfigMinimiseFragmentation Query / set whether the component should minimise the fragmentation of output data when copying into genuine OMX buffers. This does not change the behaviour when a pointer to the output FIFO is used as the output buffer with appropriate offsets and lengths.
OMX_IndexParamCodecHeadersWithFrame Query / set whether the component should create a separate buffer for the codec header bytes, or include them with the first frame. This does not change the behaviour when a pointer to the output FIFO is used as the output buffer with appropriate offsets and lengths.
OMX_IndexParamComponentName Sets the component name to be used in internal logging messages.
OMX_IndexParamBrcmEEDEEnable Allow video encoder to enable end to end distortion estimator. Enabling/disabling can only be performed at setup time. 1 enables EEDE, 0 disables EEDE. By default, EEDE is disabled.
OMX_IndexParamBrcmEEDELossRate Sets the packet loss rate used by end to end distortion estimator. This can be done during setup or runtime. The loss rate is an integer value, for example, 5 means 5% packet loss. By default, loss rate is set to be 0 to begin with.
OMX_IndexConfigBrcmPoolMemAllocSize Query for the size of the allocated image pool.
OMX_IndexParamRateControlModel Query / set the rate control method to be used. This parameter uses internal configuration to determine used, so should not be changed without explicit internal knowledge.
OMX_IndexParamBrcmAlignHoriz Query / set the horizonal alignment of the input buffer to be a given multiple of bytes in width. Setting this to anything other than the default of 32 may have a negative impact of performance because the input buffer may need to be re-pitched before it is encoded. Supported values are 32 or 1 (no padding).
OMX_IndexParamBrcmAlignVert Query / set the vertical alignment of the input buffer to be a given multiple of rows in height. Setting this to anything other than the default of 16 may have a negative impact of performance because the input buffer may need to be re-pitched before it is encoded. Supported values are 16 or 1 (no padding).
OMX_IndexParamBrcmHeaderOnOpen Header production control. Query / set whether this component should output the header immediately on opening the codec, before any input images have been received.
OMX_IndexParamBrcmVideoPrecodeForQP Query /set the option of precoding the first frame to set up a good initial QP value.