x265代码阅读:码率控制(二)
2017-04-24 15:42
761 查看
头文件x265.h中的码率控制参数:
成员变量aqMode和aqStrength是一起使用的,用于assign more bits to low complexity CTUs,这种应该属于空域的RDO,而complexityBlur、blurredComplexity、cuTree均属于时域的RDO。
aqMode和aqStrength的作用类似于HM中的CU级多QP优化,但不需要遍历多个QP。cuTree在HM编码器中没看到类似的技术。
struct { /* Explicit mode of rate-control, necessary for API users. It must * be one of the X265_RC_METHODS enum values. */ int rateControlMode; /* Base QP to use for Constant QP rate control. Adaptive QP may alter * the QP used for each block. If a QP is specified on the command line * CQP rate control is implied. Default: 32 */ int qp; /* target bitrate for Average BitRate (ABR) rate control. If a non- zero * bitrate is specified on the command line, ABR is implied. Default 0 */ int bitrate; /* qComp sets the quantizer curve compression factor. It weights the frame * quantizer based on the complexity of residual (measured by lookahead). * Default value is 0.6. Increasing it to 1 will effectively generate CQP */ double qCompress; /* QP offset between I/P and P/B frames. Default ipfactor: 1.4 * Default pbFactor: 1.3 */ double ipFactor; double pbFactor; /* Max QP difference between frames. Default: 4 */ int qpStep; /* Ratefactor constant: targets a certain constant "quality". * Acceptable values between 0 and 51. Default value: 28 */ double rfConstant; /* Enable adaptive quantization. This mode distributes available bits between all * CTUs of a frame, assigning more bits to low complexity areas. Turning * this ON will usually affect PSNR negatively, however SSIM and visual quality * generally improves. Default: X265_AQ_VARIANCE */ int aqMode; /* Sets the strength of AQ bias towards low detail CTUs. Valid only if * AQ is enabled. Default value: 1.0. Acceptable values between 0.0 and 3.0 */ double aqStrength; /* Sets the maximum rate the VBV buffer should be assumed to refill at * Default is zero */ int vbvMaxBitrate; /* Sets the size of the VBV buffer in kilobits. Default is zero */ int vbvBufferSize; /* Sets how full the VBV buffer must be before playback starts. If it is less than * 1, then the initial fill is vbv-init * vbvBufferSize. Otherwise, it is * interpreted as the initial fill in kbits. Default is 0.9 */ double vbvBufferInit; /* Enable CUTree ratecontrol. This keeps track of the CUs that propagate temporally * across frames and assigns more bits to these CUs. Improves encode efficiency. * Default: enabled */ int cuTree; /* In CRF mode, maximum CRF as caused by VBV. 0 implies no limit */ double rfConstantMax; /* In CRF mode, minimum CRF as caused by VBV */ double rfConstantMin; /* Multi-pass encoding */ /* Enable writing the stats in a multipass encode to the stat output file */ int bStatWrite; /* Enable loading data from the stat input file in a multi pass encode */ int bStatRead; /* Filename of the 2pass output/input stats file, if unspecified the * encoder will default to using x265_2pass.log */ char* statFileName; /* temporally blur quants */ double qblur; /* temporally blur complexity */ double complexityBlur; /* Enable slow and a more detailed first pass encode in multi pass rate control */ int bEnableSlowFirstPass; /* ratecontrol overrides */ int zoneCount; x265_zone* zones; /* specify a text file which contains MAX_MAX_QP + 1 floating point * values to be copied into x265_lambda_tab and a second set of * MAX_MAX_QP + 1 floating point values for x265_lambda2_tab. All values * are separated by comma, space or newline. Text after a hash (#) is * ignored. The lambda tables are process-global, so these new lambda * values will affect all encoders in the same process */ const char* lambdaFileName; /* Enable stricter conditions to check bitrate deviations in CBR mode. May compromise quality to maintain bitrate adherence */ int bStrictCbr; } rc;
成员变量aqMode和aqStrength是一起使用的,用于assign more bits to low complexity CTUs,这种应该属于空域的RDO,而complexityBlur、blurredComplexity、cuTree均属于时域的RDO。
aqMode和aqStrength的作用类似于HM中的CU级多QP优化,但不需要遍历多个QP。cuTree在HM编码器中没看到类似的技术。
相关文章推荐
- x265代码阅读:码率控制(一)
- HEVC码率控制浅析——HM代码阅读之二
- HEVC码率控制浅析——HM代码阅读之四
- HEVC码率控制浅析——HM代码阅读之一
- HEVC码率控制浅析——HM代码阅读之一
- HEVC码率控制浅析——HM代码阅读之四
- HEVC码率控制浅析——HM代码阅读之一
- HEVC码率控制浅析——HM代码阅读之三
- HM编码器代码阅读(41)——码率控制(二)
- HM编码器代码阅读(29)——码率控制
- HEVC码率控制浅析——HM代码阅读之三
- HEVC码率控制浅析——HM代码阅读之四
- HEVC码率控制浅析——HM代码阅读之二
- H.264码率控制算法研究及JM相应代码分析(三)
- H.264码率控制算法研究及JM相应代码分析(二)
- HM/JEM CTU级码率控制相关代码
- H.265/HEVC码率控制总体框架与代码解读(中)
- H.265/HEVC码率控制总体框架与代码解读(上)
- 2010-3-10 sculla具有访问控制的字符设备 sbull块设备 代码阅读
- HEVC码率控制算法研究与HM相应代码分析(三)——算法及代码分析