Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

H.264 HP encoder for C66x release wrong buffer

$
0
0

Hi,

I use official H.264 HP encoder for C66x 1.0.0.1 version. I implemented aspect ratio change with flush like described in http://e2e.ti.com/support/embedded/multimedia_software_codecs/f/356/t/240820.aspx

After flush encoder releases wrong buffer that had been released before.

Log:

Release buffer 287
Bytes generated 8145
Release buffer 290
Bytes generated 7940
Release buffer 289
Bytes generated 20716
Release buffer 296
Bytes generated 6658
Release buffer 291
Bytes generated 8870
Release buffer 294
Bytes generated 7729
Release buffer 293
Bytes generated 40535
Release buffer 300
Bytes generated 6774
Release buffer 295
New aspect ratio 2304 2112
Entering flush mode
Flush
Bytes generated 8274
Release buffer 298
Bytes generated 6472
Release buffer 297
Bytes generated 5421
Release buffer 43
Error releasing YUV buffer in queue

To simulate the bug I change aspect ratio each 50 or 100 or 250 frames. Interesting fact that the bug disappears if I change aspect ratio each 25 frames.

Full log attached. Encoder configuration:

width = 704;
height = 576;
bitRate = 1600000; # Target bit rate in bits per second

# General H.264 encoder settings
entropyCodingMode = 0; # 0: CAVLC, 1: CABAC (for HP and MP only)
gopStructure = 0; # 0: NONUNIFORM = IBBPBBP, 1: UNIFORM = BBIBBPBB
IDRFrameInterval = 3; # 0: Only first I frame as IDR, 1: All I frames are IDR, 2: 1 out of 2 I frames are IDR starting from first I frame
transformBlockSize = 0; # Transform blocks size. 0: 4x4, 1: 8x8 (valid for HP only), 2: adaptive - encoder decides as per content
log2MaxFNumMinus4 = 0; # Limits the maximum frame number in the bit-stream to (1<< (log2MaxFNumMinus4 + 4)) Range[0,12]
picOrderCountType = 0; # POC type: 0, 1, 2
interlaceCodingType = 4; # 0: PICAFF, 1: MBAFF, 2: FIELDONLY_MRF, 3: FIELDONLY_ARF, 4: FIELDONLY_SPF (adaptive)
intraFrameInterval = 12; # The number of frames between two I frames. 0: IPPPP..., 1: IIII..., 2: IPIPIPIPI, 3: IPPIPPIPPI or IPBIPBIPBI, etc.
mvAccuracy = 2; # Motion vectors accuracy. 0: integer pel., 2: quarter pel.

# General video encoder settings
encodingPreset = 3; # 0: DEFAULT, 1: HIGH_QUALITY, 2: HIGH_SPEED, 3: USER_DEFINED. If not USER_DEFINED most of configuration parameters are chosen by encoder, thus ignored.
maxInterFrameInterval = 4; # I to P frame distance. 1: no B frames, 2: one B frame, 3: two B frames, etc [1, 255]
profile = 77; # 66: BASELINE, 77: MAIN, 100: HIGH
level = 40; # 9: 1b, 10: 1.0, 11: 1.1, 12, 13, 20: 2.0, 21, 22, 30, 31, 32, 40, 41, 42, 50, 51

# Rate control
rateControlPreset = 5; # 1: LOW_DELAY,  2: STORAGE, 4: NONE,  5: USER_DEFINED
rcAlgo = 0; # Rate control algorithm used, 0: Variable Bitrate, 1 : Constant bitrate (low dealy), 2: Constrained CBR (No Frame Skips). Useful only if rateControlPreset is set to USER_DEFINED
qpI = -1; # Initial QP for I/IDR frames, -1 indicates codec chosen
qpP = -1; # Initial QP for P frames, -1 indicates codec chosen
qpOffsetB = 4; # Offset of B frames QP from P frames
qpMaxI = 51; # Maximum QP for I/IDR frames
qpMinI = 1; # Minimum QP for I/IDR frames
qpMaxP = 51; # Maximum QP for P frames
qpMinP = 1; # Minimum QP for P frames
qpMaxB = 51; # Maximum QP for B frames
qpMinB = 1; # Minimum QP for B frames
CbQPIndexOffset = 0; # Specifies offset to be added to luma QP for addressing QPC values table for Cb components
CrQPIndexOffset = 0; # Specifies offset to be added to luma QP for addressing QPC values table for Cr components
initialBufferLevel = 2000000; # Initial Buffer level for HRD compliance, keep same as HRDBufferSize for best quality
HRDBufferSize = 2000000; # Hypothetical Reference Decoder Buffer Size in bits - 2*bitrate for VBR
enablePRC = 1; # Control Flag to enable MB level Perceptual Rate Control, 0 => Disable, 1 => Enable
frameSkipAfterSceneChange = 1; # 0=> no forced skip after scenechange, 1 => force skip frame after coding scene change frame.
scalingMatrixPreset = 0; # Scaling Matrix selection of encoder, 0: no scaling matrices, 1: normal, 2: noisy, 3 : standard default, 4 : user defined

# Inter coding
interCodingPreset = 1; # Inter coding mode preset, 0 => deafult values, 1 => user defined
MvRangeVerP = 32; # Vertical Motion Vector Range for P frames in integer pixels, Range supported is 16 to 496
MvRangeHorP = 144; # Horizontal Motion Vector Range for P frames in integer pixels, Range supported is 16 to 496
MvRangeVerB = 32; # Vertical Motion Vector Range for B frames in integer pixels, Range supported is 16 to 496
MvRangeHorB = 144; # Horizontal Motion Vector Range for B frames in integer pixels, Range supported is 16 to 496
maxMVperMB = 4; # Maximum MV per MB (Values of 1 & 4 are valid)

# Intra coding
intraCodingPreset = 1; # Intra coding mode preset, 0 => deafult values, 1 => user defined
enableIntraPartition = 4; # 0 => INTRA_PARTITION_NONE , 1 => INTRA_PARTITION_ISLICES, 2 => INTRA_PARTITION_IPSLICES, 3 => INTRA_PARTITION_IBSLICES, 4 => INTRA_PARTITION_IPBSLICES.
intraRefreshMethod = 0; # IH264_INTRAREFRESH_NONE  = 0, IH264_INTRAREFRESH_CYCLIC_MBS = 1
intraRefreshRate = 0; # Rate at which intra MB Refresh is done. e.g. 10 indicates every 10th MB will coded as Intra in inter pictures.
constrainedIntraPredEnable = 0; # Controls the intra macroblock coding in inter slices

# Slice coding
sliceCodingPreset = 1; # Preset value for slice coding mode, 0 => deafult values, 1 => user defined
streamFormat = 0; # Type of bitstream to be encoded. Only value 0 is supprted (Byte stream format)
sliceMode = 0; # Type of slice coding, 0 => slice coding mode is frame based, 1 => Slices are controlled based upon number of Macroblocks
sliceUnitSize = 1200; # Number of macroblocks per slice

# Loop filter
loopfilterPreset = 1; # Preset value for loop filter operation parameters, 0 => default values, 1 => user defined
loopfilterDisableIDC = 2; # Disable H.264 loop filter, (0=Filter, 1= NoFilter, 2 = No loop filter across slices)
filterOffsetA = 0; # Alpha offset for loop filter
filterOffsetB = 0; # Beta offset for loop filter

# VUI coding
vuiCodingPreset = 1; # Preset value for VUI Control Params, 0 => deafult values, 1 => user defined
videoSignalTypePresentFlag = 0; # controls the insertion of video signal type in VUI part of bit-stream
videoFormat = 2; # Video signal type
videoFullRangeFlag = 0; # Flag to specify Range of the pixels
colourDescriptionPresentFlag = 1; # Specifies whether colour_primaries, transfer_characteristics and matrix_coefficients are present or not.
colourPrimaries = 5; # chromaticity coordinates of the source primaries(Table E-3 in standard)
transferCharacteristics = 5; # opto-electronic transfer characteristic of the source picture(Table E-4 in standard)
matrixCoefficients = 5; # matrix coefficients used in deriving Y,Cb,Cr signals from the G,B,R primaries(Table E-5 in standard)
timingInfoPresentFlag = 1; # Controls the insertion of timing info related parameters in VUI part of bit-stream

Can you please check the encoder for this type of bug?

Regards,

Andrey Lisnevich


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>