[FFmpeg-trac] #5092(avcodec:open): Field order wrong for DV HD

FFmpeg trac at avcodec.org
Mon Mar 13 13:04:58 EET 2017


#5092: Field order wrong for DV HD
------------------------------------+-----------------------------------
             Reporter:  Dan203      |                    Owner:
                 Type:  defect      |                   Status:  open
             Priority:  normal      |                Component:  avcodec
              Version:  git-master  |               Resolution:
             Keywords:  dvvideo     |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------

Comment (by Aleksandr_Slobodeniuk):

 some useful info from ffmbc:
 https://github.com/bcoudurier/FFmbc/commit/736133a20bf6fab65b06f447e07b6b91fcdc0270


 {{{
     /* Determine the codec's sample_aspect ratio from the packet */
     vsc_pack = buf + 80*5 + 48 + 5;
     if (*vsc_pack == dv_video_control) {
         int apt = buf[4] & 0x07;
         int is16_9 = (vsc_pack[2] & 0x07) == 0x02 || (!apt && (vsc_pack[2]
 & 0x07) == 0x07);
         avctx->sample_aspect_ratio = s->sys->sar[is16_9];
         if (avctx->height != 720) {
             s->picture.interlaced_frame = (vsc_pack[3] & 0x10) == 0x10;
             if (avctx->height == 1080)
                 s->picture.top_field_first = (vsc_pack[3] & 0x40) == 0x40;
             else
                 s->picture.top_field_first = (vsc_pack[3] & 0x40) != 0x40;
         }
     }
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5092#comment:17>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list