Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Kz_Liao
Beginner
148 Views

Questions about rate control method of MFX_RATECONTROL_ICQ and MFX_RATECONTROL_VCM

Jump to solution

Hi,

I tried to configure the Video_Conferencing_Sample_5.0.337.78585 to test these RC method. The code modified as follow:

void VideoConfPipeline::InitBrc()
{
    ......
    else
    {
        // Modified
        //m_mfxEncParams.mfx.TargetKbps          = m_initParams.nTargetKbps; // in Kbps
        //m_mfxEncParams.mfx.RateControlMethod   = MFX_RATECONTROL_VBR; //dynamic bitrate change requires for encoder to be initialized with VBR

        // Replaced by

        /*m_mfxEncParams.mfx.RateControlMethod   = MFX_RATECONTROL_ICQ;
        m_mfxEncParams.mfx.ICQQuality          = 27;*/

        m_mfxEncParams.mfx.RateControlMethod   = MFX_RATECONTROL_VCM;

        // end Modified
    }
}

But when comes to sts = m_encoder->Init(&m_mfxEncParams); the call returns MFX_ERR_INVALID_VIDEO_PARAM for both RC method.

Is that anything I did wrong? Could anyone give the features of these RC method? 

Thanks in advance.

0 Kudos
1 Solution
Surbhi_M_Intel
Employee
148 Views

Hi there, 

Just heard from the developer and has found that the ICQ and VCM methods are supported from Haswell(HD4400) and not supported on Ivy Bridge(HD4000). That's why it didn't work on your first machine, but worked in the other system you have even with old drivers. We have a gap in the existing documentation and we are trying to improve it in our future releases. 

Thanks, 
-Surbhi 

View solution in original post

12 Replies
Kz_Liao
Beginner
148 Views

Besides, the parameters passed to start the program was

-i "E:\foreman\foreman_cif.yuv" -o "E:\foreman\foreman_cif_ts4.h264" -w 352 -h 288 -hw -latency

 

Surbhi_M_Intel
Employee
148 Views

Hi kz,

I tested the video conference sample with MFX_RATECONTROL_VCM method and did not run into the issue you have mentioned. I have also tested with the params you have given and it has worked for me.
To debug more can you please send the system analyzer of your machine, details how to use the tool it can be found here - Suggested Format For Forum Questions
 I hope you are assigning the value of target kbps in your code and haven't the commented below line of the code before if statement.

m_mfxEncParams.mfx.TargetKbps = m_initParams.nTargetKbps; 

If you still see the issue, then try doing fresh install of video conferencing sample and run VCM Bitrate Control Method and check if that works for you.

Thanks,
-Surbhi

Kz_Liao
Beginner
148 Views

Hi Surbhi,

I've just tried you suggestions. I first made sure the nTargetKbps is set. And then I installed the latest MSDK 2014R2 client, as well as Video Conferencing Sample 5.0.461.91752. But the issue is still there. So I upload the analysis result. It seems the HW means are fully supported on my platform. Can something be figured out from this?

Intel Media SDK System Analyzer (32 bit)


The following versions of Media SDK API are supported by platform/driver:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X       X
        1.1     SW      Yes             X       X
        1.3     HW      Yes             X       X
        1.3     SW      Yes             X       X
        1.4     HW      Yes             X       X
        1.4     SW      No
        1.5     HW      Yes             X       X
        1.5     SW      No
        1.6     HW      Yes             X       X
        1.6     SW      No
        1.7     HW      Yes             X       X
        1.7     SW      No
        1.8     HW      Yes             X       X
        1.8     SW      No

Graphics Devices:
        Name                                         Version             State
        Intel(R) HD Graphics 4000                    10.18.10.3496       Active

System info:
        CPU:    Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
        OS:     Microsoft Windows 7
Installed Media SDK packages (be patient...processing takes some time):

Analysis complete... [press ENTER]

 

Kz_Liao
Beginner
148 Views

Hi Surbhi,

It seems the -HW lead to the problem. When I run the sample without the -HW param, it goes well for both VCM and IQC. Since the analyzer result shows the HW acceleration is supported, isn't that weird?

Surbhi_M_Intel
Employee
148 Views

This is quite a strange behavior. Great it worked with SW.
 Can you please confirm if you are running the code also on Win32 platform, so that there is no mismatch on Information as your system analyzer is for 32 bit. Also it would be good to update your graphics driver, it has been helpful to fix lot of issues in the past. Driver can be downloaded from this website - downloadcenter.intel.com

Thanks,
-Surbhi

 

Kz_Liao
Beginner
148 Views

Yes I'm running a 32bit Windows 7. I just upgrade the driver. According to the analysis result, nothing seems changed except the driver version.

Intel Media SDK System Analyzer (32 bit)


The following versions of Media SDK API are supported by platform/driver:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      Yes             X       X
        1.1     HW      Yes             X       X
        1.1     SW      Yes             X       X
        1.3     HW      Yes             X       X
        1.3     SW      Yes             X       X
        1.4     HW      Yes             X       X
        1.4     SW      No
        1.5     HW      Yes             X       X
        1.5     SW      No
        1.6     HW      Yes             X       X
        1.6     SW      No
        1.7     HW      Yes             X       X
        1.7     SW      No
        1.8     HW      Yes             X       X
        1.8     SW      No

Graphics Devices:
        Name                                         Version             State
        Intel(R) HD Graphics 4000                    10.18.10.3945       Active

System info:
        CPU:    Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz
        OS:     Microsoft Windows 7

......

I also run the sample on another PC with HD4400 graphic card installed. The VCM and ICQ mode both running successfully with HW enable! Following is the analysis result of that PC.

Intel Media SDK System Analyzer (32 bit)


The following versions of Media SDK API are supported by platform/driver:

        Version Target  Supported       Dec     Enc
        1.0     HW      Yes             X       X
        1.0     SW      No
        1.1     HW      Yes             X       X
        1.1     SW      No
        1.3     HW      Yes             X       X
        1.3     SW      No
        1.4     HW      Yes             X       X
        1.4     SW      No
        1.5     HW      Yes             X       X
        1.5     SW      No
        1.6     HW      Yes             X       X
        1.6     SW      No
        1.7     HW      Yes             X       X
        1.7     SW      No
        1.8     HW      No
        1.8     SW      No

Graphics Devices:
        Name                                         Version             State
        Intel(R) HD Graphics 4400                    10.18.10.3412       Active

System info:
        CPU:    Intel(R) Core(TM) i3-4130 CPU @ 3.40GHz
        OS:     Microsoft Windows Embedded Standard
        Arch:   32-bit

Installed Media SDK packages (be patient...processing takes some time):
......

 

Then I tested the CQP mode on both PC with HW enable and compared the sample log, I found something interesting. On my PC (on which the ICQ and VCM mode failed with HW enable, but the VBR and CQP runs successfully) the log shows

Intel(R) Media SDK Video Conference Sample Version 5.0.461.92695


Input file format       YUV420
Output video            AVC
Resolution              352x288
Crop X,Y,W,H            0,0,352,288
Frame rate              30.00
Bit rate(Kbps)          29
Memory type             d3d
Media SDK impl          hw
Media SDK version       1.10

Processing started
Processing finished
Frame number: 300

And on the PC with HD4400, the log shows

Input file format     	YUV420
Output video		          AVC 
Resolution		            352x288
Crop X,Y,W,H		          0,0,352,288
Frame rate            		24.00
Bit rate(Kbps)		        29
Memory type		           system
Media SDK impl		        hw
Media SDK version	     1.7

Only the mem type and the SDK version differs. I tried change the mem type, it had noting to do with the result. So it seems the SDK version has will affect my result. So is the SDK version means the SDK API version? Also, isn't the latest API version is only 1.8? How it detect a version of 1.10?

Surbhi_M_Intel
Employee
148 Views

Hi there,

The maximum API version we support is 1.10 currently. According to the Manual docs, Bit rate control VCM algorithm is supported in SDK API 1.8 version. Also, the system analyzer tells us analyzes the system, but not the capability to support the features present in the Media SDK on the system.
I am in talks with the expert regarding this issue, In the mean time can you please tell us what Media SDK version you are using like Media SDK 2014 R2 ? Also can you please run tracer logs when you run your code and send it to us. Details can be found in this link - Suggested Format For Forum Questions
Just wanted to let you VCM, ICQ, LA_ICQ, LA_VCM modes are experimental modes and couldn't be confirmed to work on all the platform. 

Thanks,
-Surbhi
 

Kz_Liao
Beginner
148 Views

Thanks for telling those RC method are still under experiment.

I'm using Media SDK 2014 R2 now. I configured the sample using VCM RC method and ran it on both PC and traced the log. The result is just as the same as before: the PC installed HD4400 ran the sample successfully with HW enable, while the one installed HD4000 failed.  Log files were uploaded as the attachment. Hope it helps. I really found some difference between the two logs. But I'm not understand what it tells.

Surbhi_M_Intel
Employee
149 Views

Hi there, 

Just heard from the developer and has found that the ICQ and VCM methods are supported from Haswell(HD4400) and not supported on Ivy Bridge(HD4000). That's why it didn't work on your first machine, but worked in the other system you have even with old drivers. We have a gap in the existing documentation and we are trying to improve it in our future releases. 

Thanks, 
-Surbhi 

View solution in original post

Kz_Liao
Beginner
148 Views

SURBHI M. (Intel) wrote:

Hi there, 

Just heard from the developer and has found that the ICQ and VCM methods are supported from Haswell(HD4400) and not supported on Ivy Bridge(HD4000). That's why it didn't work on your first machine, but worked in the other system you have even with old drivers. We have a gap in the existing documentation and we are trying to improve it in our future releases. 

Thanks, 
-Surbhi 

Thanks a lot! It really helps!

Besides, could you get some detailed information about how VCM and ICQ work? Or, how they determine the bitrate? So far I found nothing except some words in the MSDK document.

Surbhi_M_Intel
Employee
148 Views

Hi there,

Little more Info about ICQ and VCM

ICQ is a intelligent constant quality factor, requires ICQQuality factor only – it is not bitrate control actually(not controlling bitrate and HRD), but quality control method(adjusts QP values for better visual quality).This mode tries to encode frames for constant and better subjective quality. 

VCM is an algorithm for video conferencing usage i.e for talking head with static background. It is not supported for B frames, so only I & P frames can be used. It works pretty much as VBR(requires TargetKbps and MaxKbps). Again it can provide better subjective quality for talking head type content, but would be worse for any other type.  
Just for FYI it is currently broken(gives same result for any bitrates) on the latest driver versions available at intel.com, and will be available only in December.

Hope this helps!
-Surbhi

Kz_Liao
Beginner
148 Views

Hi Surbhi,

Really thanks for telling so much about the VCM and the ICQ. It helps a lot in my work!

Reply