V4L/DVB (5210): Pvrusb2: Fix printk format typo
[powerpc.git] / drivers / media / video / cx2341x.c
index 657e0b9..d60cd5e 100644 (file)
@@ -56,7 +56,6 @@ const u32 cx2341x_mpeg_ctrls[] = {
        V4L2_CID_MPEG_VIDEO_B_FRAMES,
        V4L2_CID_MPEG_VIDEO_GOP_SIZE,
        V4L2_CID_MPEG_VIDEO_GOP_CLOSURE,
-       V4L2_CID_MPEG_VIDEO_PULLDOWN,
        V4L2_CID_MPEG_VIDEO_BITRATE_MODE,
        V4L2_CID_MPEG_VIDEO_BITRATE,
        V4L2_CID_MPEG_VIDEO_BITRATE_PEAK,
@@ -118,9 +117,6 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params,
        case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE:
                ctrl->value = params->video_gop_closure;
                break;
-       case V4L2_CID_MPEG_VIDEO_PULLDOWN:
-               ctrl->value = params->video_pulldown;
-               break;
        case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
                ctrl->value = params->video_bitrate_mode;
                break;
@@ -231,9 +227,6 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params,
        case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE:
                params->video_gop_closure = ctrl->value;
                break;
-       case V4L2_CID_MPEG_VIDEO_PULLDOWN:
-               params->video_pulldown = ctrl->value;
-               break;
        case V4L2_CID_MPEG_VIDEO_BITRATE_MODE:
                /* MPEG-1 only allows CBR */
                if (params->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1 &&
@@ -679,7 +672,6 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
        .video_b_frames = 2,
        .video_gop_size = 12,
        .video_gop_closure = 1,
-       .video_pulldown = 0,
        .video_bitrate_mode = V4L2_MPEG_VIDEO_BITRATE_MODE_VBR,
        .video_bitrate = 6000000,
        .video_bitrate_peak = 8000000,
@@ -742,7 +734,6 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
 
        if (old == NULL || old->width != new->width || old->height != new->height ||
                        old->video_encoding != new->video_encoding) {
-               int is_scaling;
                u16 w = new->width;
                u16 h = new->height;
 
@@ -752,20 +743,18 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
                }
                err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_SIZE, 2, h, w);
                if (err) return err;
+       }
 
+       if (new->width != 720 || new->height != (new->is_50hz ? 576 : 480)) {
                /* Adjust temporal filter if necessary. The problem with the temporal
                   filter is that it works well with full resolution capturing, but
                   not when the capture window is scaled (the filter introduces
-                  a ghosting effect). So if the capture window changed, and there is
-                  no updated filter value, then the filter is set depending on whether
-                  the new window is full resolution or not.
+                  a ghosting effect). So if the capture window is scaled, then
+                  force the filter to 0.
 
-                  For full resolution a setting of 8 really improves the video
+                  For full resolution the filter really improves the video
                   quality, especially if the original video quality is suboptimal. */
-               is_scaling = new->width != 720 || new->height != (new->is_50hz ? 576 : 480);
-               if (old && old->video_temporal_filter == temporal) {
-                       temporal = is_scaling ? 0 : 8;
-               }
+               temporal = 0;
        }
 
        if (old == NULL || old->stream_type != new->stream_type) {
@@ -786,10 +775,6 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
                err = cx2341x_api(priv, func, CX2341X_ENC_SET_GOP_CLOSURE, 1, new->video_gop_closure);
                if (err) return err;
        }
-       if (old == NULL || old->video_pulldown != new->video_pulldown) {
-               err = cx2341x_api(priv, func, CX2341X_ENC_SET_3_2_PULLDOWN, 1, new->video_pulldown);
-               if (err) return err;
-       }
        if (old == NULL || old->audio_properties != new->audio_properties) {
                err = cx2341x_api(priv, func, CX2341X_ENC_SET_AUDIO_PROPERTIES, 1, new->audio_properties);
                if (err) return err;
@@ -866,6 +851,7 @@ invalid:
 void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
 {
        int is_mpeg1 = p->video_encoding == V4L2_MPEG_VIDEO_ENCODING_MPEG_1;
+       int temporal = p->video_temporal_filter;
 
        /* Stream */
        printk(KERN_INFO "%s: Stream: %s\n",
@@ -890,11 +876,10 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
                printk(", Peak %d", p->video_bitrate_peak);
        }
        printk("\n");
-       printk(KERN_INFO "%s: Video:  GOP Size %d, %d B-Frames, %sGOP Closure, %s3:2 Pulldown\n",
+       printk(KERN_INFO "%s: Video:  GOP Size %d, %d B-Frames, %sGOP Closure\n",
                prefix,
                p->video_gop_size, p->video_b_frames,
-               p->video_gop_closure ? "" : "No ",
-               p->video_pulldown ? "" : "No ");
+               p->video_gop_closure ? "" : "No ");
        if (p->video_temporal_decimation) {
                printk(KERN_INFO "%s: Video: Temporal Decimation %d\n",
                        prefix, p->video_temporal_decimation);
@@ -922,10 +907,13 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
                cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE),
                cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_SPATIAL_FILTER_TYPE),
                p->video_spatial_filter);
+       if (p->width != 720 || p->height != (p->is_50hz ? 576 : 480)) {
+               temporal = 0;
+       }
        printk(KERN_INFO "%s: Temporal Filter: %s, %d\n",
                prefix,
                cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_TEMPORAL_FILTER_MODE),
-               p->video_temporal_filter);
+               temporal);
        printk(KERN_INFO "%s: Median Filter:   %s, Luma [%d, %d], Chroma [%d, %d]\n",
                prefix,
                cx2341x_menu_item(p, V4L2_CID_MPEG_CX2341X_VIDEO_MEDIAN_FILTER_TYPE),