changeset 10030:a5396aaf128d

Support for codec 14_4 and 28_8
author rtognimp
date Wed, 30 Apr 2003 19:45:34 +0000
parents 2d31643a3c22
children c346ede2140c
files libmpcodecs/ad_realaud.c
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_realaud.c	Wed Apr 30 19:35:28 2003 +0000
+++ b/libmpcodecs/ad_realaud.c	Wed Apr 30 19:45:34 2003 +0000
@@ -136,7 +136,7 @@
     raSetDLLAccessPath = dlsym(handle, "SetDLLAccessPath");
     raSetPwd = dlsym(handle, "RASetPwd"); // optional, used by SIPR
     
-    if (raCloseCodec && raDecode && raFlush && raFreeDecoder &&
+    if (raCloseCodec && raDecode && /*raFlush && */raFreeDecoder &&
 	raGetFlavorProperty && (raOpenCodec||raOpenCodec2) && raSetFlavor &&
 	/*raSetDLLAccessPath &&*/ raInitDecoder)
     {
@@ -398,12 +398,26 @@
   int sps=((short*)(sh->wf+1))[0];
   int w=sh->wf->nBlockAlign; // 5
   int h=((short*)(sh->wf+1))[1];
+  int cfs=((short*)(sh->wf+1))[3];
 
 //  printf("bs=%d  sps=%d  w=%d h=%d \n",sh->wf->nBlockAlign,sps,w,h);
   
 #if 1
   if(sh->a_in_buffer_len<=0){
       // fill the buffer!
+		if (sh->format == mmioFOURCC('1','4','_','4')) {
+			demux_read_data(sh->ds, sh->a_in_buffer, sh->wf->nBlockAlign);
+			sh->a_in_buffer_size=
+			sh->a_in_buffer_len=sh->wf->nBlockAlign;
+		} else
+		if (sh->format == mmioFOURCC('2','8','_','8')) {
+			int i,j;
+			for (j = 0; j < h; j++)
+				for (i = 0; i < h/2; i++)
+					demux_read_data(sh->ds, sh->a_in_buffer+i*2*w+j*cfs, cfs);
+			sh->a_in_buffer_size=
+			sh->a_in_buffer_len=sh->wf->nBlockAlign*h;
+		} else
     if(!sps){
       // 'sipr' way
       int j,n;