blob: f33755bd65738ca43604e038e1ab08a2246817b9 [file] [log] [blame]
Copyright 2011 Intel Corporation All Rights Reserved.
The source code contained or described herein and all documents related to the source code ("Material") are owned by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted, transmitted, distributed, or disclosed in any way without Intel’s prior express written permission.
No license under any patent, copyright, trade secret or other intellectual property right is granted to or conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement, estoppel or otherwise. Any license under such intellectual property rights must be express and approved by Intel in writing.
#include "VideoEncoderBase.h"
class VideoEncoderAVC : public VideoEncoderBase {
~VideoEncoderAVC() {};
virtual Encode_Status start();
virtual Encode_Status derivedSetParams(VideoParamConfigSet *videoEncParams);
virtual Encode_Status derivedGetParams(VideoParamConfigSet *videoEncParams);
virtual Encode_Status derivedGetConfig(VideoParamConfigSet *videoEncConfig);
virtual Encode_Status derivedSetConfig(VideoParamConfigSet *videoEncConfig);
virtual Encode_Status sendEncodeCommand(EncodeTask *task);
virtual Encode_Status getExtFormatOutput(VideoEncOutputBuffer *outBuffer);
virtual Encode_Status updateFrameInfo(EncodeTask* task);
// Local Methods
Encode_Status getOneNALUnit(uint8_t *inBuffer, uint32_t bufSize, uint32_t *nalSize, uint32_t *nalType, uint32_t *nalOffset, uint32_t status);
Encode_Status getHeader(uint8_t *inBuffer, uint32_t bufSize, uint32_t *headerSize, uint32_t status);
Encode_Status outputCodecData(VideoEncOutputBuffer *outBuffer);
Encode_Status outputOneNALU(VideoEncOutputBuffer *outBuffer, bool startCode);
Encode_Status outputLengthPrefixed(VideoEncOutputBuffer *outBuffer);
Encode_Status renderMaxSliceSize();
Encode_Status renderAIR();
Encode_Status renderSequenceParams(EncodeTask *task);
Encode_Status renderPictureParams(EncodeTask *task);
Encode_Status renderSliceParams(EncodeTask *task);
int calcLevel(int numMbs);
Encode_Status renderPackedSequenceParams(EncodeTask *task);
Encode_Status renderPackedPictureParams(EncodeTask *task);
VideoParamsAVC mVideoParamsAVC;
uint32_t mSliceNum;
VABufferID packed_seq_header_param_buf_id;
VABufferID packed_seq_buf_id;
VABufferID packed_pic_header_param_buf_id;
VABufferID packed_pic_buf_id;
VABufferID packed_sei_header_param_buf_id; /* the SEI buffer */
VABufferID packed_sei_buf_id;
#endif /* __VIDEO_ENCODER_AVC_H__ */