Hi Marco,

On Tuesday 24 June 2008, Marco Argiolas wrote:
> Hi everybody,
> I wrote a very quick HOW-TO in order to solve the problem of those webcams
> mounted upside-down on laptop!!!
> I've just added few lines in one function of the UVCVIDEO driver!!
> But it will work only for those webcams who use YUV image format (in
> particular YUY2)!!
> Obiously the webcam has to be UVC capable !! ;)
>
> However in this HOW-TO you won't find patches, but just the whole code of
> the modded function (however it is a very short function).
> I know patches should be more usefull, but I know also the most of the
> people have problems just in reading an HOW-TO...
> so why make things more difficults? ;)

Because people will crash their kernel as soon as I release a new driver 
version if you don't provide a patch. If a new driver version includes 
changes in uvc_video.c, users will blindly overwrite them by replacing the 
driver-supplied uvc_video.c with your version. A patch can still suffer from 
the same problem, but it will likely not apply if changes are made to the 
sections you modify.

> You can find this HOW-TO here:
> http://ubuntuforums.org/showthread.php?p=5244475#post5244475
>
> There are 2 solutions: the first with memory allocation and the second
> without allocation.
> For both this solutions there are 2 variant: with or without MIRRORED
> images!! ;)
>
> So you are free to choose which is the best solution for you!!
>
> Please let me know if you think I made some mistakes or if you have some
> suggestions!!
>
> Regards,
>
> Marco Argiolas
>
> ps.
> For the Italian guys is also available an Italian HOW-TO, that sincerely is
> more detailed and complete!!
> Just have a look here:
> http://forum.ubuntu-it.org/index.php/topic,199106.msg1326411.html#msg132641
>1
>
> pps.
> Just a question to *Laurent Pinchart:*
> in uvc_video.c in function "uvc_video_decode_data()" I think it should be
> better to change the condition of the last "if":
>
> if (len > maxlen) {
>               uvc_trace(UVC_TRACE_FRAME, "Frame complete (overflow).\n");
>               buf->state = UVC_BUF_STATE_DONE;
> }
>
> into
> "if (len >= maxlen)"
> What do you think?

Please don't change that. That test is meant to detect an overflow which 
should not happen. The common case is handled either by 
uvc_video_decode_end() detecting an EOF condition, or 
uvc_video_decode_start() detecting the FID bit being toggled.

Best regards,

Laurent Pinchart
_______________________________________________
Linux-uvc-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to