The patch number 8176 was added via Mike Isely <[EMAIL PROTECTED]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        [EMAIL PROTECTED]

------

From: Mike Isely  <[EMAIL PROTECTED]>
pvrusb2: Update video_gop_size


When switching video standard, ensure that video GOP size remains
appropriately configured.

Signed-off-by: Mike Isely <[EMAIL PROTECTED]>


---

 linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c |   29 ++++++++++++----
 1 file changed, 23 insertions(+), 6 deletions(-)

diff -r 3b0792127ce7 -r 26ae64c4e7cf 
linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c   Sun Jun 29 22:32:35 
2008 -0500
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c   Sun Jun 29 22:35:52 
2008 -0500
@@ -2480,17 +2480,34 @@ static int pvr2_hdw_commit_execute(struc
        /* Handle some required side effects when the video standard is
           changed.... */
        if (hdw->std_dirty) {
+               int nvres;
+               int gop_size;
+               if (hdw->std_mask_cur & V4L2_STD_525_60) {
+                       nvres = 480;
+                       gop_size = 15;
+               } else {
+                       nvres = 576;
+                       gop_size = 12;
+               }
                /* Rewrite the vertical resolution to be appropriate to the
                   video standard that has been selected. */
-               int nvres;
-               if (hdw->std_mask_cur & V4L2_STD_525_60) {
-                       nvres = 480;
-               } else {
-                       nvres = 576;
-               }
                if (nvres != hdw->res_ver_val) {
                        hdw->res_ver_val = nvres;
                        hdw->res_ver_dirty = !0;
+               }
+               /* Rewrite the GOP size to be appropriate to the video
+                  standard that has been selected. */
+               if (gop_size != hdw->enc_ctl_state.video_gop_size) {
+                       struct v4l2_ext_controls cs;
+                       struct v4l2_ext_control c1;
+                       memset(&cs, 0, sizeof(cs));
+                       memset(&c1, 0, sizeof(c1));
+                       cs.controls = &c1;
+                       cs.count = 1;
+                       c1.id = V4L2_CID_MPEG_VIDEO_GOP_SIZE;
+                       c1.value = gop_size;
+                       cx2341x_ext_ctrls(&hdw->enc_ctl_state, 0, &cs,
+                                         VIDIOC_S_EXT_CTRLS);
                }
        }
 


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/26ae64c4e7cf502cd6880d59c77a654bb506ceb0

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to