Mercurial > libavcodec.hg
comparison dv.c @ 8714:ba1e52769fc5 libavcodec
assume widescreen when ratio also > 17, patch by Ben Hutchings, ben at decadent dot org dot uk
author | bcoudurier |
---|---|
date | Sat, 31 Jan 2009 22:16:17 +0000 |
parents | eaae57fe72b2 |
children | 6056e34b9504 |
comparison
equal
deleted
inserted
replaced
8713:fa6d97b7f4e8 | 8714:ba1e52769fc5 |
---|---|
1182 */ | 1182 */ |
1183 int apt = (c->sys->pix_fmt == PIX_FMT_YUV420P ? 0 : 1); | 1183 int apt = (c->sys->pix_fmt == PIX_FMT_YUV420P ? 0 : 1); |
1184 int stype = (c->sys->pix_fmt == PIX_FMT_YUV422P ? 4 : 0); | 1184 int stype = (c->sys->pix_fmt == PIX_FMT_YUV422P ? 4 : 0); |
1185 | 1185 |
1186 uint8_t aspect = 0; | 1186 uint8_t aspect = 0; |
1187 if ((int)(av_q2d(c->avctx->sample_aspect_ratio) * c->avctx->width / c->avctx->height * 10) == 17) /* 16:9 */ | 1187 if ((int)(av_q2d(c->avctx->sample_aspect_ratio) * c->avctx->width / c->avctx->height * 10) >= 17) /* 16:9 */ |
1188 aspect = 0x02; | 1188 aspect = 0x02; |
1189 | 1189 |
1190 buf[0] = (uint8_t)pack_id; | 1190 buf[0] = (uint8_t)pack_id; |
1191 switch (pack_id) { | 1191 switch (pack_id) { |
1192 case dv_header525: /* I can't imagine why these two weren't defined as real */ | 1192 case dv_header525: /* I can't imagine why these two weren't defined as real */ |