+av_unused static inline int vc1_get_INTCOMPFIELD(const VC1Context *v)
+{
+ if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
+ v->fcm == ILACE_FIELD &&
+ v->mv_mode == MV_PMODE_INTENSITY_COMP)
+ switch (v->intcompfield) {
+ case 1: return 1;
+ case 2: return 2;
+ case 3: return 0;
+ }
+ return 0;
+}
+
+static inline int vc1_get_LUMSCALE(const VC1Context *v)
+{
+ if (v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) {
+ if ((v->fcm == PROGRESSIVE && v->mv_mode == MV_PMODE_INTENSITY_COMP) ||
+ (v->fcm == ILACE_FRAME && v->intcomp))
+ return v->lumscale;
+ else if (v->fcm == ILACE_FIELD && v->mv_mode == MV_PMODE_INTENSITY_COMP)
+ switch (v->intcompfield) {
+ case 1: return v->lumscale;
+ case 2: return v->lumscale2;
+ case 3: return v->lumscale;
+ }
+ }
+ return 0;
+}
+
+static inline int vc1_get_LUMSHIFT(const VC1Context *v)
+{
+ if (v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) {
+ if ((v->fcm == PROGRESSIVE && v->mv_mode == MV_PMODE_INTENSITY_COMP) ||
+ (v->fcm == ILACE_FRAME && v->intcomp))
+ return v->lumshift;
+ else if (v->fcm == ILACE_FIELD && v->mv_mode == MV_PMODE_INTENSITY_COMP)
+ switch (v->intcompfield) {
+ case 1: return v->lumshift;
+ case 2: return v->lumshift2;
+ case 3: return v->lumshift;
+ }
+ }
+ return 0;
+}
+
+av_unused static inline int vc1_get_LUMSCALE2(const VC1Context *v)
+{
+ if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
+ v->fcm == ILACE_FIELD &&
+ v->mv_mode == MV_PMODE_INTENSITY_COMP &&
+ v->intcompfield == 3)
+ return v->lumscale2;
+ return 0;
+}
+
+av_unused static inline int vc1_get_LUMSHIFT2(const VC1Context *v)
+{
+ if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
+ v->fcm == ILACE_FIELD &&
+ v->mv_mode == MV_PMODE_INTENSITY_COMP &&
+ v->intcompfield == 3)
+ return v->lumshift2;
+ return 0;
+}
+