Page 2 of 2

Posted: Mon Feb 16, 2009 5:18 pm
by zoneminder
I will apply your patch for non-ffmpeg conversions. Is that last post the entirety of it?

Posted: Mon Feb 16, 2009 6:13 pm
by ris2t
zoneminder wrote:I will apply your patch for non-ffmpeg conversions. Is that last post the entirety of it?
Essentially yes.

Below is the same update for the latest 1.24 official release. This also includes an additional tweak for the unknown video standard problem I get with my uvc cams. The 2740 tweaks didn't quite wrap all the impacted calls.

Code: Select all

raymond@Hammerstien:~/src/ZoneMinder-1.24.0/src$ diff -c zm_local_camera.cpp zm_local_camera.save  
*** zm_local_camera.cpp 2009-02-15 11:36:17.000000000 +1300                                        
--- zm_local_camera.save        2009-02-14 14:19:39.000000000 +1300                                
***************                                                                                    
*** 356,362 ****                                                                                   
          }                                                                                        
                                                                                                   
          stdId = format;                                                                          
!         if ( (input.std != V4L2_STD_UNKNOWN) && vidioctl( vid_fd, VIDIOC_S_STD, &stdId ) < 0 )   
          {                                                                                        
              Fatal( "Failed to set video standard %d: %s", format, strerror(errno) );             
          }                                                                                        
--- 356,362 ----                                                                                   
          }                                                                                        
                                                                                                   
          stdId = format;                                                                          
!         if ( vidioctl( vid_fd, VIDIOC_S_STD, &stdId ) < 0 )                                      
          {                                                                                        
              Fatal( "Failed to set video standard %d: %s", format, strerror(errno) );             
          }                                                                                        
***************                                                                                    
*** 608,614 ****                                                                                   
        g_v_table = new short[255];                                                                
        g_u_table = new short[255];                                                                
        b_u_table = new short[255];
-       /* RIS - removed & replaced
        r_v_table += 127;
        g_v_table += 127;
        g_u_table += 127;
--- 608,613 ----
***************
*** 621,636 ****
                g_v_table[c] = (714*c)/1000;
                b_u_table[c] = (1772*c)/1000;
        }
-       */
-        for ( int i = 0; i < 255; i++ )
-        {
-                r_v_table[i] = (1402*(i-128))/1000;
-                g_u_table[i] = (344*(i-128))/1000;
-                g_v_table[i] = (714*(i-128))/1000;
-                b_u_table[i] = (1772*(i-128))/1000;
-        }
-
-
  }

  void LocalCamera::Terminate()
--- 620,625 ----

Posted: Mon Feb 16, 2009 6:35 pm
by zoneminder
Thanks. The first section I have done slightly differently but I think it does the same thing. Ie ignore unknown standards if none is set.