Advertisement
Guest User

Untitled

a guest
Oct 15th, 2012
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.21 KB | None | 0 0
  1. diff --git a/libavcodec/dv.c b/libavcodec/dv.c
  2. index a7dfbdc..5b4ad23 100644
  3. --- a/libavcodec/dv.c
  4. +++ b/libavcodec/dv.c
  5. @@ -818,6 +818,7 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c,
  6.       *      compression scheme (if any).
  7.       */
  8.      int apt   = (c->sys->pix_fmt == AV_PIX_FMT_YUV420P ? 0 : 1);
  9. +    int fs    = c->picture.top_field_first ? 0x00 : 0x40;
  10.  
  11.      uint8_t aspect = 0;
  12.      if ((int)(av_q2d(c->avctx->sample_aspect_ratio) * c->avctx->width / c->avctx->height * 10) >= 17) /* 16:9 */
  13. @@ -856,7 +857,7 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c,
  14.            buf[2] = 0xc8 |     /* reserved -- always b11001xxx */
  15.                     aspect;
  16.            buf[3] = (1 << 7) | /* frame/field flag 1 -- frame, 0 -- field */
  17. -                   (1 << 6) | /* first/second field flag 0 -- field 2, 1 -- field 1 */
  18. +                   fs       | /* first/second field flag 0 -- field 2, 1 -- field 1 */
  19.                     (1 << 5) | /* frame change flag 0 -- same picture as before, 1 -- different */
  20.                     (1 << 4) | /* 1 - interlaced, 0 - noninterlaced */
  21.                     0xc;       /* reserved -- always b1100 */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement