[FFmpeg-devel] Realmedia patch
Reimar Döffinger
Reimar.Doeffinger
Wed Aug 27 15:04:32 CEST 2008
On Wed, Aug 27, 2008 at 07:53:14AM -0400, Ronald S. Bultje wrote:
> On Wed, Aug 27, 2008 at 3:24 AM, Benoit Fouet
> <benoit.fouet at purplelabs.com> wrote:
> I tried the following:
>
> int i;
> char *orig_buf = buf;
> const char hex_table[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
> '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
Why not static?
>
> for (i = 0; i < size; i++) {
> *buf++ = hex_table[src[i] >> 4];
> *buf++ = hex_table[src[i] & 0xF];
> }
Much funnier-looking (as seen in some base64-code):
*buf++ = "0123456789ABCDEF"[src[i] >> 4];
*buf++ = "0123456789ABCDEF"[src[i] & 0xF];
;-)
More information about the ffmpeg-devel
mailing list