comparison dv.c @ 8738:08f9871b035b libavcodec

No need to compute stype
author romansh
date Wed, 04 Feb 2009 16:16:53 +0000
parents e9d9d946f213
children 409d20e15da8
comparison
equal deleted inserted replaced
8737:eeca2fc122f8 8738:08f9871b035b
1181 * APT to 000 and for SMPTE314M to 001. 1181 * APT to 000 and for SMPTE314M to 001.
1182 * 2. It is not at all clear what STYPE is used for 4:2:0 PAL 1182 * 2. It is not at all clear what STYPE is used for 4:2:0 PAL
1183 * compression scheme (if any). 1183 * compression scheme (if any).
1184 */ 1184 */
1185 int apt = (c->sys->pix_fmt == PIX_FMT_YUV420P ? 0 : 1); 1185 int apt = (c->sys->pix_fmt == PIX_FMT_YUV420P ? 0 : 1);
1186 int stype = (c->sys->pix_fmt == PIX_FMT_YUV422P ? 4 : 0);
1187 1186
1188 uint8_t aspect = 0; 1187 uint8_t aspect = 0;
1189 if ((int)(av_q2d(c->avctx->sample_aspect_ratio) * c->avctx->width / c->avctx->height * 10) >= 17) /* 16:9 */ 1188 if ((int)(av_q2d(c->avctx->sample_aspect_ratio) * c->avctx->width / c->avctx->height * 10) >= 17) /* 16:9 */
1190 aspect = 0x02; 1189 aspect = 0x02;
1191 1190
1211 (1 << 6) | /* following CLF is valid - 0, invalid - 1 */ 1210 (1 << 6) | /* following CLF is valid - 0, invalid - 1 */
1212 (3 << 4) | /* CLF: color frames ID (see ITU-R BT.470-4) */ 1211 (3 << 4) | /* CLF: color frames ID (see ITU-R BT.470-4) */
1213 0xf; /* reserved -- always 1 */ 1212 0xf; /* reserved -- always 1 */
1214 buf[3] = (3 << 6) | /* reserved -- always 1 */ 1213 buf[3] = (3 << 6) | /* reserved -- always 1 */
1215 (c->sys->dsf << 5) | /* system: 60fields/50fields */ 1214 (c->sys->dsf << 5) | /* system: 60fields/50fields */
1216 stype; /* signal type video compression */ 1215 c->sys->video_stype; /* signal type video compression */
1217 buf[4] = 0xff; /* VISC: 0xff -- no information */ 1216 buf[4] = 0xff; /* VISC: 0xff -- no information */
1218 break; 1217 break;
1219 case dv_video_control: 1218 case dv_video_control:
1220 buf[1] = (0 << 6) | /* Copy generation management (CGMS) 0 -- free */ 1219 buf[1] = (0 << 6) | /* Copy generation management (CGMS) 0 -- free */
1221 0x3f; /* reserved -- always 1 */ 1220 0x3f; /* reserved -- always 1 */