[Bug 652951] New: matroskamux and vp8enc: filed to set invisble flag for vp8 altref frames

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Jun 19 08:56:56 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=652951
  GStreamer | gst-plugins-good | git

           Summary: matroskamux and vp8enc: filed to set invisble flag for
                    vp8 altref frames
    Classification: Platform
           Product: GStreamer
           Version: git
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: bug-track at fisher-privat.net
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


If using vp8enc with multipass and auto-alt-ref-frames=1 codec will produce
altref frames marked as invisible. But there are fallowing problems in the
code:

in gstvp8enc.c, function gst_vp8_enc_shape_output:
    if (l == hook->invisible && frame->is_sync_point) {
--> this part will be never called if we get invisible frame.....
      GST_BUFFER_FLAG_UNSET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
      encoder->keyframe_distance = 0;
    } else {
      GST_BUFFER_FLAG_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT);
      encoder->keyframe_distance++;
    }

so it looks like it invisible frame shouldn't have DELTA_UNIT flag

in matroskamux code:
  if (collect_pad->track->type == GST_MATROSKA_TRACK_TYPE_VIDEO &&
      !GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT)) {
    GST_LOG_OBJECT (mux, "have video keyframe, ts=%" GST_TIME_FORMAT,
        GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)));
    is_video_keyframe = TRUE;
  }

looks like frame with no DELTA flag will be interpreted as keyframe.

And later, for each keyframe 0x80 flag will be set:
    int flags =
        GST_BUFFER_FLAG_IS_SET (buf, GST_BUFFER_FLAG_DELTA_UNIT) ? 0 : 0x80;

    hdr =
        gst_matroska_mux_create_buffer_header (collect_pad->track,
        relative_timestamp, flags);


in libvpx/vpxenc.c code, keyframe=0x80 and invisible frame=0x08:
    flags = 0;
    if(is_keyframe)
        flags |= 0x80;
    if(pkt->data.frame.flags & VPX_FRAME_IS_INVISIBLE)
        flags |= 0x08;
    Ebml_Write(glob, &flags, 1);

    Ebml_Write(glob, pkt->data.frame.buf, pkt->data.frame.sz);
...................


So it looks like there is no gst_buffer flag for invisible frame. DELTA is just
frame and no_DELTA is a key frame. Probably GAP flag will be good for invisible
frame. And it should be fixed at same time in matrosk/webmmux and vp8enc.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list