Skip to content

Commit

Permalink
0.04以降、vbrのビットレートが異常に大きくなってしまう問題を修正。
Browse files Browse the repository at this point in the history
  • Loading branch information
rigaya committed Jun 13, 2024
1 parent fc02658 commit 98e58d8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
13 changes: 12 additions & 1 deletion mppcore/mpp_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1990,7 +1990,17 @@ RGY_ERR MPPCore::initEncoderPrep(const MPPParam *prm) {
}

RGY_ERR MPPCore::initEncoderRC(const MPPParam *prm) {
m_enccfg.rc.change = MPP_ENC_RC_CFG_CHANGE_ALL;
m_enccfg.rc.change = MPP_ENC_RC_CFG_CHANGE_RC_MODE |
MPP_ENC_RC_CFG_CHANGE_QUALITY |
MPP_ENC_RC_CFG_CHANGE_BPS |
MPP_ENC_RC_CFG_CHANGE_FPS_IN |
MPP_ENC_RC_CFG_CHANGE_FPS_OUT |
MPP_ENC_RC_CFG_CHANGE_GOP |
MPP_ENC_RC_CFG_CHANGE_SKIP_CNT |
MPP_ENC_RC_CFG_CHANGE_QP_INIT |
MPP_ENC_RC_CFG_CHANGE_QP_RANGE |
MPP_ENC_RC_CFG_CHANGE_QP_RANGE_I |
MPP_ENC_RC_CFG_CHANGE_DROP_FRM;
m_enccfg.rc.rc_mode = (MppEncRcMode)prm->rateControl;
m_enccfg.rc.quality = (MppEncRcQuality)prm->qualityPreset;
m_enccfg.rc.bps_target = prm->bitrate * 1000;
Expand Down Expand Up @@ -2037,6 +2047,7 @@ RGY_ERR MPPCore::initEncoderRC(const MPPParam *prm) {

m_enccfg.rc.gop = prm->gopLen;
m_enccfg.rc.skip_cnt = 0;
m_enccfg.rc.drop_mode = MPP_ENC_RC_DROP_FRM_DISABLED;

auto ret = err_to_rgy(m_encoder->mpi->control(m_encoder->ctx, MPP_ENC_SET_RC_CFG, &m_enccfg.rc));
if (ret != RGY_ERR_NONE) {
Expand Down
6 changes: 3 additions & 3 deletions mppcore/rgy_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@
#ifndef __RGY_VERSION_H__
#define __RGY_VERSION_H__

#define VER_FILEVERSION 0,0,8,0
#define VER_STR_FILEVERSION "0.08"
#define VER_STR_FILEVERSION_TCHAR _T("0.08")
#define VER_FILEVERSION 0,0,9,0
#define VER_STR_FILEVERSION "0.09"
#define VER_STR_FILEVERSION_TCHAR _T("0.09")


#if (defined(_M_ARM64) || defined(__aarch64__) || defined(__arm64__) || defined(__ARM_ARCH))
Expand Down

0 comments on commit 98e58d8

Please sign in to comment.