Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gst-libav gst-libav
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 69
    • Issues 69
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamerGStreamer
  • gst-libavgst-libav
  • Issues
  • #8
Closed
Open
Issue created Nov 05, 2012 by Bugzilla Migration User@bugzilla-migration

gstavviddec doesn't set top field first and repeat field flags in some cases

Submitted by Michael Rubinstein

Link to original bug (#687684)

Description

We're using avdec_mpeg2video to decode MPEG2 from a broadcast encoder. All are content is interlaced. We find that the "top field first" and "repeat first field" flags are not always set in the decoded buffers.

gstavviddec.c only sets GST_VIDEO_BUFFER_FLAG_TFF and GST_VIDEO_BUFFER_FLAG_RFF when it thinks that the content is interlaced.

The code in question is in gst_ffmpegviddec_video_frame().

if (ffmpegdec->ctx_interlaced) {
/* set interlaced flags */
if (ffmpegdec->picture->repeat_pict)
GST_BUFFER_FLAG_SET (out_frame->output_buffer, GST_VIDEO_BUFFER_FLAG_RFF);
if (ffmpegdec->picture->top_field_first)
GST_BUFFER_FLAG_SET (out_frame->output_buffer, GST_VIDEO_BUFFER_FLAG_TFF);
if (ffmpegdec->picture->interlaced_frame)
GST_BUFFER_FLAG_SET (out_frame->output_buffer,
GST_VIDEO_BUFFER_FLAG_INTERLACED);
}

The frames in question have these variables:

progressive_sequence=0
picture_structure=3 (Frame)
progressive_frame=1

The MPEG spec. says that TFF and RFF have meaning in this case.

mpegvideo.c contains this line:

s->current_picture_ptr->f.interlaced_frame = !s->progressive_frame &&
!s->progressive_sequence;

Also, the above definition of interlaced causes our system to renegotiate frequently.

I'm not sure if these frames should be called "interlaced" but the flags should be set. IMHO I don't think we should renegotiate.

Version: 1.0.2

Assignee
Assign to
Time tracking