On Tue, Jan 05, 2016 at 09:35:41PM +0100, Clément Bœsch wrote: > On Mon, Jan 04, 2016 at 07:28:03PM -0800, Aman Gupta wrote: > > From: Aman Gupta <a...@tmm1.net> [...] > > } else if ( (hi == 0x10 && (lo >= 0x40 || lo <= 0x5f)) || > > ( (hi >= 0x11 && hi <= 0x17) && (lo >= 0x40 && lo <= 0x7f) ) > > ) { > > handle_pac(ctx, hi, lo); > > } else if ( ( hi == 0x11 && lo >= 0x20 && lo <= 0x2f ) || > > ( hi == 0x17 && lo >= 0x2e && lo <= 0x2f) ) { > > handle_textattr(ctx, hi, lo); [...] > Looks OK, but the command handling really is clumsy in that decoder. I'm > pretty sure we can do something better by handling the command as a > uint16. >
To expand on this, the first condition would look something like this: if ((cmd & 0x7f60) == 0x1040 || (cmd & 0x7940) == 0x1140) with cmd = bptr[i+1]<<8 | bptr[i+2] (Note: cmd is assumed to be already masked with a 0x7f7f) [...] -- Clément B.
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel