#9647: Non Intra H.264 files are not muxed correctly in mxf
-------------------------------------+-------------------------------------
             Reporter:  Francesco    |                    Owner:  (none)
  Bucciantini                        |
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  git-master   |               Resolution:
             Keywords:  mxf          |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
Comment (by ariley):

 In ''mxf_parse_mpeg2_frame()'', there's a bit of code that reads:
 {{{
           } else if (c == 0x100) { // pic
               int pict_type = (pkt->data[i+2]>>3) & 0x07;
               e->temporal_ref = (pkt->data[i+1]<<2) | (pkt->data[i+2]>>6);
               if (pict_type == 2) { // P-frame
                   e->flags |= 0x22;
                   sc->closed_gop = 0; // reset closed GOP, don't matter
 anymore
               } else if (pict_type == 3) { // B-frame
                   if (sc->closed_gop)
                       e->flags |= 0x13; // only backward prediction
                   else
                       e->flags |= 0x33;
                   sc->temporal_reordering = -1;
 }}}

 The corresponding code setting ''e->temporal_ref'' and
 ''sc->temporal_reordering'' in ''mxf_parse_h264_frame()'' is missing:
 {{{
           case H264_NAL_SLICE:
               init_get_bits8(&gb, buf, buf_end - buf);
               get_ue_golomb_long(&gb); // skip first_mb_in_slice
               slice_type = get_ue_golomb_31(&gb);
               switch (slice_type % 5) {
               case 0:
                   e->flags |= 0x20; // P Picture
                   e->flags |= 0x06; // P Picture
                   break;
               case 1:
                   e->flags |= 0x30; // B Picture
                   e->flags |= 0x03; // non-referenced B Picture
                   break;
               }
 }}}
 Unfortunately, while the temporal order is carried in the mpeg2 picture
 header, it's not quite so trivial with H264.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9647#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
_______________________________________________
FFmpeg-trac mailing list
FFmpeg-trac@avcodec.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-trac

To unsubscribe, visit link above, or email
ffmpeg-trac-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to