<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Why is happened the difference during H264 encoding? in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Why-is-happened-the-difference-during-H264-encoding/m-p/948693#M18419</link>
    <description>&lt;P&gt;Hi, All&lt;/P&gt;
&lt;P&gt;I have a meet the problems&amp;nbsp;during tesing&amp;nbsp;H264 fielding coding on IPP(Ver.7.0.5.059).&lt;/P&gt;
&lt;P&gt;I set the parameter for fielding as following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding_type = 1;&lt;/P&gt;
&lt;P&gt;But there is the difference a generated bitstream according to image.&lt;/P&gt;
&lt;P&gt;one(A) is general H264 bitstream,&amp;nbsp;other(B) is strange H264 bitstream.&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;decoing result of A is good, but B's bitstream is as following and not decoding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;00 00 00 01 21 B8 04 07 4B ED 4B 1D FF 9C 6F FC 16 B3 A1 AB C4 AB F9 9D EA BB 6E 39 48 56 F8 A4 C5 3B 3D 08 65 C9 75 00 F1 B1 18 0B 71 A2 80 8E 39 B9 E9 F9 96 4A B1 30 A4 83 59 A9 8C 60 63 5A 4E 2F 14 A0 5B 77 94 AA B3 A1 03 51 5A 2D A2 97~~~~&lt;/P&gt;
&lt;P&gt;I think that SPS and PPS of B is wrong or fielding coding is incompletely.&lt;/P&gt;
&lt;P&gt;How do I solve the problem or advice?&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;nrson&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Nov 2012 06:07:07 GMT</pubDate>
    <dc:creator>nrson</dc:creator>
    <dc:date>2012-11-14T06:07:07Z</dc:date>
    <item>
      <title>Why is happened the difference during H264 encoding?</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Why-is-happened-the-difference-during-H264-encoding/m-p/948693#M18419</link>
      <description>&lt;P&gt;Hi, All&lt;/P&gt;
&lt;P&gt;I have a meet the problems&amp;nbsp;during tesing&amp;nbsp;H264 fielding coding on IPP(Ver.7.0.5.059).&lt;/P&gt;
&lt;P&gt;I set the parameter for fielding as following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; coding_type = 1;&lt;/P&gt;
&lt;P&gt;But there is the difference a generated bitstream according to image.&lt;/P&gt;
&lt;P&gt;one(A) is general H264 bitstream,&amp;nbsp;other(B) is strange H264 bitstream.&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;decoing result of A is good, but B's bitstream is as following and not decoding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;00 00 00 01 21 B8 04 07 4B ED 4B 1D FF 9C 6F FC 16 B3 A1 AB C4 AB F9 9D EA BB 6E 39 48 56 F8 A4 C5 3B 3D 08 65 C9 75 00 F1 B1 18 0B 71 A2 80 8E 39 B9 E9 F9 96 4A B1 30 A4 83 59 A9 8C 60 63 5A 4E 2F 14 A0 5B 77 94 AA B3 A1 03 51 5A 2D A2 97~~~~&lt;/P&gt;
&lt;P&gt;I think that SPS and PPS of B is wrong or fielding coding is incompletely.&lt;/P&gt;
&lt;P&gt;How do I solve the problem or advice?&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;nrson&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2012 06:07:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Why-is-happened-the-difference-during-H264-encoding/m-p/948693#M18419</guid>
      <dc:creator>nrson</dc:creator>
      <dc:date>2012-11-14T06:07:07Z</dc:date>
    </item>
    <item>
      <title>Good day.</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Why-is-happened-the-difference-during-H264-encoding/m-p/948694#M18420</link>
      <description>Good day.

There was a problem with missing SPS headers in field encoding. It was fixed in 7.1
However I must warn you what we have a bug in motion estimation in filed mode which can cause significant artifacts on P frames.

Here is a fix for 7.0.5:

umc_h264_gen_enc_tmpl.cpp.h

line 593, add firstFieldClass variable
[cpp]
Status H264ENC_MAKE_NAME(H264CoreEncoder_CompressFrame)(
    void* state,
    EnumPicCodType&amp;amp; ePictureType,
    EnumPicClass&amp;amp; ePic_Class,
    MediaData* dst)
{
...
    EnumPicClass firstFieldClass;
[/cpp]

line 618, store picture type for first field in firstFieldClass 
[cpp]
  // reencode frame loop
    for (;;) {
        brcRecode = false;
        core_enc-&amp;gt;m_is_cur_pic_afrm = (Ipp32s)(core_enc-&amp;gt;m_pCurrentFrame-&amp;gt;m_PictureStructureForDec==AFRM_STRUCTURE);
        firstFieldClass = ePic_Class;
[/cpp]

line 953, replace this condition:
[cpp]
            if (ePic_Class == IDR_PIC &amp;amp;&amp;amp; (!core_enc-&amp;gt;m_field_index)) {
              core_enc-&amp;gt;m_SliceHeader.idr_pic_id--;
              core_enc-&amp;gt;m_SliceHeader.idr_pic_id &amp;amp;= 0xff; //Restrict to 255 to reduce number of bits(max value 65535 in standard)
            }
[/cpp]
with this:
[cpp]
            if(core_enc-&amp;gt;m_field_index)
            {
                if(firstFieldClass == IDR_PIC) // restore IDR flag or SPS header will be lost
                {
                    core_enc-&amp;gt;m_SliceHeader.idr_pic_id--;
                    ePic_Class = IDR_PIC;
                }
                core_enc-&amp;gt;m_HeightInMBs &amp;lt;&amp;lt;= 1;
            }
            else
            {
                if(ePic_Class == IDR_PIC)
                {
                    core_enc-&amp;gt;m_SliceHeader.idr_pic_id--;
                    core_enc-&amp;gt;m_SliceHeader.idr_pic_id &amp;amp;= 0xff; //Restrict to 255 to reduce number of bits(max value 65535 in standard)
                }
            }
[/cpp]</description>
      <pubDate>Wed, 14 Nov 2012 12:03:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Why-is-happened-the-difference-during-H264-encoding/m-p/948694#M18420</guid>
      <dc:creator>Pavel_V_Intel</dc:creator>
      <dc:date>2012-11-14T12:03:43Z</dc:date>
    </item>
  </channel>
</rss>

