summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCorbin Simpson <MostAwesomeDude@gmail.com>2008-07-18 12:21:20 -0700
committerAlex Deucher <alexdeucher@gmail.com>2008-08-25 06:19:39 -0400
commita760e628134c6d7d42ec3c98118b6e5f6fcd3e7f (patch)
tree9de8a359b1b0b40c80eebb150d1af9851fff304b /src
parentb6c9e2bb5365de82315c6814f915e57b0c4fa444 (diff)
Allocate memory for the bicubic filter texture.
Diffstat (limited to 'src')
-rw-r--r--src/radeon_textured_video.c9
-rw-r--r--src/radeon_video.c4
-rw-r--r--src/radeon_video.h13
3 files changed, 23 insertions, 3 deletions
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index cfa349d3..1e4ce1de 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -199,6 +199,15 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
return BadAlloc;
}
+ /* Bicubic filter loading */
+ if (pPriv->bicubic_memory == NULL) {
+ pPriv->bicubic_offset = RADEONAllocateMemory(pScrn,
+ &pPriv->bicubic_memory,
+ sizeof(bicubic_tex_128));
+ if (pPriv->bicubic_offset == 0)
+ pPriv->bicubic_enabled = FALSE;
+ }
+
if (pDraw->type == DRAWABLE_WINDOW)
pPriv->pPixmap = (*pScreen->GetWindowPixmap)((WindowPtr)pDraw);
else
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 57dcd8ac..d22e00a5 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -1678,6 +1678,10 @@ RADEONStopVideo(ScrnInfoPtr pScrn, pointer data, Bool cleanup)
RADEONFreeMemory(pScrn, pPriv->video_memory);
pPriv->video_memory = NULL;
}
+ if (pPriv->bicubic_memory != NULL) {
+ RADEONFreeMemory(pScrn, pPriv->bicubic_memory);
+ pPriv->bicubic_memory = NULL;
+ }
pPriv->videoStatus = 0;
} else {
if(pPriv->videoStatus & CLIENT_VIDEO_ON) {
diff --git a/src/radeon_video.h b/src/radeon_video.h
index 096de372..e81ac945 100644
--- a/src/radeon_video.h
+++ b/src/radeon_video.h
@@ -13,6 +13,8 @@
#include "xf86Crtc.h"
+#include "bicubic_table.h"
+
/* Xvideo port struct */
typedef struct {
uint32_t transform_index;
@@ -37,7 +39,7 @@ typedef struct {
uint32_t radeon_N;
uint32_t i2c_status;
uint32_t i2c_cntl;
-
+
FI1236Ptr fi1236;
uint8_t tuner_type;
MSP3430Ptr msp3430;
@@ -46,7 +48,7 @@ typedef struct {
/* VIP bus and devices */
GENERIC_BUS_Ptr VIP;
- TheatrePtr theatre;
+ TheatrePtr theatre;
Bool video_stream_active;
int encoding;
@@ -56,7 +58,7 @@ typedef struct {
int sap_channel;
int v;
uint32_t adjustment; /* general purpose variable */
-
+
#define METHOD_BOB 0
#define METHOD_SINGLE 1
#define METHOD_WEAVE 2
@@ -89,6 +91,11 @@ typedef struct {
void *video_memory;
int video_offset;
+ /* bicubic filtering */
+ void *bicubic_memory;
+ int bicubic_offset;
+ Bool bicubic_enabled;
+
Atom device_id, location_id, instance_id;
/* textured video */