Code Search for Developers
 
 
  

color_common.c from aMSN at Krugle


Show color_common.c syntax highlighted

#define NG_PRIVATE
#include "config.h"

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/time.h>
#include <sys/types.h>

#include "grab-ng.h"

/* ------------------------------------------------------------------- */

void*
ng_packed_init(struct ng_video_fmt *out, void *priv)
{
    return priv;
}

void
ng_packed_frame(void *handle, struct ng_video_buf *out,
		struct ng_video_buf *in)
{
    int (*func)(unsigned char *dest, unsigned char *src, int p) = handle;
    unsigned char *sp,*dp;
    unsigned int i,sw,dw;

    dw  = (out->fmt.width * ng_vfmt_to_depth[out->fmt.fmtid]) >> 3;
    sw  = (in->fmt.width  * ng_vfmt_to_depth[in->fmt.fmtid])  >> 3;
    if (in->fmt.bytesperline == sw && out->fmt.bytesperline == dw) {
	/* can convert in one go */
	func(out->data, in->data, in->fmt.width * in->fmt.height);
    } else {
	/* convert line by line */
	dp = out->data;
	sp = in->data;
	for (i = 0; i < in->fmt.height; i++) {
	    func(dp,sp,in->fmt.width);
	    dp += out->fmt.bytesperline;
	    sp += in->fmt.bytesperline;
	}
    }
    out->info = in->info;
}

/* ------------------------------------------------------------------- */

void*
ng_conv_nop_init(struct ng_video_fmt *out, void *priv)
{
    /* nothing */
    return NULL;
}

void
ng_conv_nop_fini(void *handle)
{
    /* nothing */
}




See more files for this project here

aMSN

A very nice MSN compatible messenger application, aMSN Messenger is a multiplatform MSN messenger clone. Works pretty much like its Windows based counterpart. Perfect for keeping in touch with those friends who have not yet seen the light. Works on linux

Project homepage: http://sourceforge.net/projects/amsn
Programming language(s): C,C++,PHP,Tcl,XML
License: other

  plugins/
    Makefile
    Rules.mk
    conv-mjpeg.c
    drv0-bsd.c
    drv0-v4l2-old.c
    drv0-v4l2.c
    drv1-v4l.c
    sn9c10x.c
  Makefile
  OVERVIEW
  README
  Rules.mk
  byteswap.h
  color_common.c
  color_lut.c
  color_packed.c
  color_unused.c
  color_yuv2rgb.c
  convert.c
  devices.c
  devices.h
  grab-ng.c
  grab-ng.h
  list.h
  misc.c
  misc.h
  parse-dvb.c
  parse-mpeg.c
  parse-mpeg.h
  videodev.h
  videodev2-old.h
  videodev2.h
  writefile.c
  writefile.h