[Mplayer-cvslog] CVS: main/vidix/drivers Makefile,NONE,1.1 radeon_vid.c,NONE,1.1 radeon.h,NONE,1.1

Nick Kurshev nick at mplayer.dev.hu
Sat Jan 5 19:18:21 CET 2002


Update of /cvsroot/mplayer/main/vidix/drivers
In directory mplayer:/var/tmp.root/cvs-serv26095

Added Files:
	Makefile radeon_vid.c radeon.h 
Log Message:
preliminary version

--- NEW FILE ---
# makefile

include ../../config.mak


RADEON_VID=radeon_vid.so
RADEON_SRCS=radeon_vid.c
RADEON_OBJS=radeon_vid.o
RADEON_LIBS=-L../../libdha -ldha -lm
RADEON_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W

RAGE128_VID=rage128_vid.so
RAGE128_SRCS=radeon_vid.c
RAGE128_OBJS=rage128_vid.o
RAGE128_LIBS=-L../../libdha -ldha
RAGE128_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W -DRAGE128

all:    $(RADEON_VID) $(RAGE128_VID)


.SUFFIXES: .c .o

# .PHONY: all clean

$(RADEON_OBJS):    $(RADEON_SRCS)
	$(CC) -c $(RADEON_CFLAGS) -o $@ $<

$(RADEON_VID):     $(RADEON_OBJS)
	$(CC) $(RADEON_LIBS) -shared -o $(RADEON_VID) $(RADEON_OBJS)

$(RAGE128_OBJS):    $(RAGE128_SRCS)
	$(CC) -c $(RAGE128_CFLAGS) -o $@ $<

$(RAGE128_VID):     $(RAGE128_OBJS)
	$(CC) $(RAGE128_LIBS) -shared -o $(RAGE128_VID) $(RAGE128_OBJS)

clean:
	rm -f *.o *.so *~

distclean:
	rm -f Makefile.bak *.o *.so test *~ .depend

dep:    depend

depend:
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend

install:

#
# include dependency files if they exist
#
ifneq ($(wildcard .depend),)
include .depend
endif

--- NEW FILE ---
/*
   radeon_vid - VIDIX based video driver for Radeon and Rage128 chips
*/

#include <linux/pci_ids.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
#include "../vidix.h"
#include "../fourcc.h"
#include "../../libdha/libdha.h"
#include "radeon.h"

#ifdef RAGE128
#define RADEON_MSG "Rage128_vid:"
#define X_ADJUST 0
[...1004 lines suppressed...]
}

int 	vixPlaybackSetEq( const vidix_video_eq_t * eq)
{
#ifdef RAGE128
  int br,sat;
#endif
    memcpy(&equal,eq,sizeof(vidix_video_eq_t));
#ifdef RAGE128
    br = equal.brightness * 64 / 1000;
    sat = equal.saturation * 32 / 1000;
    if(sat < 0) sat = 0;
    OUTREG(OV0_COLOUR_CNTL, (br & 0x7f) | (sat << 8) | (sat << 16));
#else
  radeon_set_transform(equal.brightness,equal.contrast,
		       equal.saturation,equal.hue,0);
#endif
  return 0;
}


--- NEW FILE ---
/*
 * radeon.h
 * This	software has been released under the terms of the GNU Public
 * license. See	http://www.gnu.org/copyleft/gpl.html for details.
 *
 * This	collection of definition was written by	Nick Kurshev
 * It's	based on radeonfb, X11,	GATOS sources
 * and partly compatible with Rage128 set (in OV0, CAP0, CAP1 parts)
*/

#ifndef	_RADEON_H
#define	_RADEON_H


/* radeon PCI ids */
#define	PCI_DEVICE_ID_RADEON_QD		0x5144
#define	PCI_DEVICE_ID_RADEON_QE		0x5145
#define	PCI_DEVICE_ID_RADEON_QF		0x5146
#define	PCI_DEVICE_ID_RADEON_QG		0x5147
[...2007 lines suppressed...]
#define	fld_ADC_PREFHI_def			0x00000000
#define	fld_ADC_CH_GAIN_SEL_def			0x00000001

#define	fld_HS_PLL_SGAIN_def			0x00000003

#define	fld_NREn_def				0x00000000
#define	fld_NRGainCntl_def			0x00000000
#define	fld_NRBWTresh_def			0x00000000
#define	fld_NRGCTresh_def			0x00000000
#define	fld_NRCoefDespeclMode_def		0x00000000

#define	fld_GPIO_5_OE_def			0x00000000
#define	fld_GPIO_6_OE_def			0x00000000

#define	fld_GPIO_5_OUT_def			0x00000000
#define	fld_GPIO_6_OUT_def			0x00000000

/* End of field	default	values.	*/

#endif	/* RADEON_H */




More information about the MPlayer-cvslog mailing list