diff options
-rw-r--r-- | drivers/media/video/cx2341x.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c index 657e0b969145..e796afdf533b 100644 --- a/drivers/media/video/cx2341x.c +++ b/drivers/media/video/cx2341x.c | |||
@@ -742,7 +742,6 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func, | |||
742 | 742 | ||
743 | if (old == NULL || old->width != new->width || old->height != new->height || | 743 | if (old == NULL || old->width != new->width || old->height != new->height || |
744 | old->video_encoding != new->video_encoding) { | 744 | old->video_encoding != new->video_encoding) { |
745 | int is_scaling; | ||
746 | u16 w = new->width; | 745 | u16 w = new->width; |
747 | u16 h = new->height; | 746 | u16 h = new->height; |
748 | 747 | ||
@@ -752,20 +751,18 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func, | |||
752 | } | 751 | } |
753 | err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_SIZE, 2, h, w); | 752 | err = cx2341x_api(priv, func, CX2341X_ENC_SET_FRAME_SIZE, 2, h, w); |
754 | if (err) return err; | 753 | if (err) return err; |
754 | } | ||
755 | 755 | ||
756 | if (new->width != 720 || new->height != (new->is_50hz ? 576 : 480)) { | ||
756 | /* Adjust temporal filter if necessary. The problem with the temporal | 757 | /* Adjust temporal filter if necessary. The problem with the temporal |
757 | filter is that it works well with full resolution capturing, but | 758 | filter is that it works well with full resolution capturing, but |
758 | not when the capture window is scaled (the filter introduces | 759 | not when the capture window is scaled (the filter introduces |
759 | a ghosting effect). So if the capture window changed, and there is | 760 | a ghosting effect). So if the capture window is scaled, then |
760 | no updated filter value, then the filter is set depending on whether | 761 | force the filter to 0. |
761 | the new window is full resolution or not. | ||
762 | 762 | ||
763 | For full resolution a setting of 8 really improves the video | 763 | For full resolution the filter really improves the video |
764 | quality, especially if the original video quality is suboptimal. */ | 764 | quality, especially if the original video quality is suboptimal. */ |
765 | is_scaling = new->width != 720 || new->height != (new->is_50hz ? 576 : 480); | 765 | temporal = 0; |
766 | if (old && old->video_temporal_filter == temporal) { | ||
767 | temporal = is_scaling ? 0 : 8; | ||
768 | } | ||
769 | } | 766 | } |
770 | 767 | ||
771 | if (old == NULL || old->stream_type != new->stream_type) { | 768 | if (old == NULL || old->stream_type != new->stream_type) { |