Community
cancel
Showing results for 
Search instead for 
Did you mean: 
chi_xu
Beginner
49 Views

The problem about H264 encoder

Hello,

I use H264 encoder in directshow to encode the same video.I use CQP and change GopRefDist with 1,2,4.I find the size of I frame increased with the GopRefDist.It is right?How to understand it?

Thanks.

0 Kudos
13 Replies
Shaojuan_Z_Intel
Employee
49 Views

Hi Chi,

May I know which sample example you are using to make the modification? Are the attached videos all I frames? Thanks!

chi_xu
Beginner
49 Views

Hi,

I use the h264_enc_filter in sample_dshow_plugins.The example contains 3 videos.They have different GopRefDist and same other properties.

Thanks.

Alexey_F_Intel
Employee
49 Views

"I fields" are identical in all 3 clips but subsequent P or B fields are different in 1 vs (2 & 4). that is the reason you see "I- frame" has a different size. Your frame is consist of 2 fields actually where the bottom one is not "I".

chi_xu
Beginner
49 Views

Hi,

Yes."I fields" should be the same and subsequent P or B fields are different in 1 vs (2 & 4).But the bottom field of "I-frame" is only related to "I field".Why does its size change?

Thanks.

Alexey_F_Intel
Employee
49 Views

The construction you name frame does not exist in that encoded sequences you provided. All of them field encoded.  #1 is I fields only – so Top and Bottom fields are both Intra type. Other 2 bitstreams are very similar for first 2 fields -  I and P fields – Top field is Intra, Bottom is P type

chi_xu
Beginner
49 Views

Hi,

I use StreamEye to analyse 3 bitstreams.The Top fields are Intra type and Bottom fields are both P type.

Thanks.

Alexey_F_Intel
Employee
49 Views

you are right. now I see your point - bottom P fields are really different in size. same size in GopRefDist 2 and 4 but different from GopRefDist = 1 case. can you upload a short sample of your original uncompressed clip? 16 field pair would be just right. also give us information on your CPU and driver version installed on the platform

chi_xu
Beginner
49 Views

Hi,

The original stream contains 7 bitstream.The sample's PID is 0x4ec.I use MPEG-2 Demultiplexer,Intel MPEG-2 Decoder,Intel H264 Encoder and Intel MPEG2 Muxer to get the outcomes.

CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz

OS: Microsoft Windows 7

Graphics Devices: Intel(R) HD Graphics 4600   10.18.14.4080

Thanks.

chi_xu
Beginner
49 Views

Hi,

Do you confirm the problem?Is there something wrong with the encoder?

Thanks.

Alexey_F_Intel
Employee
49 Views

Dear Chi Xu, Thank you for your patience! so far issue was escalated but not yet confirmed. While you are waiting please take a chance to upgrade your graphics driver to latest. Currently available 4222 version, your 4080 is almost a half a year old.

https://downloadcenter.intel.com/search?keyword=4th+Generation+Intel%C2%AE+Core%E2%84%A2+Processors+...

Thanks, Alexey

chi_xu
Beginner
49 Views

Hi,Alexey

Thank you for your reply! I will wait but i hope if you have the solution please tell me about it.

Thanks.

Alexey_F_Intel
Employee
49 Views

Hi Chi Xu, sorry for a long turn around. I have got the confirmation that it is an expected behavior by design.

The main reason is the adaptive rounding offset control. When there is no B frame/field, the rounding offset for P frame is minimal to reduce the frame size. When there are B fields, the rounding offset for P field is bigger, so P field quality can be improved because it is used as reference for B field. The reference frame size increase to be compensated by overall PSNR improvement.

Regards, Alexey

chi_xu
Beginner
49 Views

Hi,Alexey

Thank you for your help!

Reply