Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

The problem about H264 encoder

chi_xu
Beginner
1,193 Views

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
1,193 Views

Hi Chi,

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

0 Kudos
chi_xu
Beginner
1,193 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.

0 Kudos
Alexey_F_Intel
Employee
1,193 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".

0 Kudos
chi_xu
Beginner
1,193 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.

0 Kudos
Alexey_F_Intel
Employee
1,192 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

0 Kudos
chi_xu
Beginner
1,192 Views

Hi,

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

Thanks.

0 Kudos
Alexey_F_Intel
Employee
1,192 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

0 Kudos
chi_xu
Beginner
1,192 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.

0 Kudos
chi_xu
Beginner
1,192 Views

Hi,

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

Thanks.

0 Kudos
Alexey_F_Intel
Employee
1,192 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+with+Intel%C2%AE+HD+Graphics+4600

Thanks, Alexey

0 Kudos
chi_xu
Beginner
1,193 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.

0 Kudos
Alexey_F_Intel
Employee
1,193 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

0 Kudos
chi_xu
Beginner
1,193 Views

Hi,Alexey

Thank you for your help!

0 Kudos
Reply