From 5ddab7e162f7477089d495eb9a76ff13f4b2b0a4 Mon Sep 17 00:00:00 2001 From: pixel Date: Sun, 12 Dec 2004 02:14:37 +0000 Subject: Fixing STR decoding/encoding (yeah!) --- psxdev/bs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'psxdev/bs.c') diff --git a/psxdev/bs.c b/psxdev/bs.c index a79a877..41c2a8c 100644 --- a/psxdev/bs.c +++ b/psxdev/bs.c @@ -152,6 +152,7 @@ static void encode_init (bs_context_t *ctxt, void *outbuf, int type, int q_scale static void encode_finish (bs_context_t *ctxt) { + putbits(ctxt, 32704, 16); putbits_flush(ctxt); ctxt->bsbuf[0] = (((ctxt->rlsize+1)/2)+31)&~31; } @@ -277,7 +278,7 @@ void bs_init (void) } int bs_encode (bs_header_t *outbuf,bs_input_image_t *img,int type,int q_scale, - const unsigned char *myiqtab) + const unsigned char *myiqtab) { unsigned char image[16][16][3]; BLOCK blk[6][DCTSIZE2]; @@ -340,7 +341,7 @@ int bs_encode (bs_header_t *outbuf,bs_input_image_t *img,int type,int q_scale, } } - encode_finish(ctxt); + encode_finish(ctxt); rl = (ctxt->bs_size * 2); free (ctxt); -- cgit v1.2.3