" %s%s %s\n",
" %s%s %-15s %s\n",
static void show_formats(void){    AVInputFormat *ifmt;    AVOutputFormat *ofmt;    AVImageFormat *image_fmt;    URLProtocol *up;    AVCodec *p, *p2;    const char **pp, *last_name;    printf("File formats:\n");    last_name= "000";    for(;;){        int decode=0;        int encode=0;        const char *name=NULL;        for(ofmt = first_oformat; ofmt != NULL; ofmt = ofmt->next) {            if((name == NULL || strcmp(ofmt->name, name)<0) &&                strcmp(ofmt->name, last_name)>0){                name= ofmt->name;                encode=1;            }        }        for(ifmt = first_iformat; ifmt != NULL; ifmt = ifmt->next) {            if((name == NULL || strcmp(ifmt->name, name)<0) &&                strcmp(ifmt->name, last_name)>0){                name= ifmt->name;                encode=0;            }            if(name && strcmp(ifmt->name, name)==0)                decode=1;        }        if(name==NULL)            break;        last_name= name;                printf(            " %s%s %s\n",             decode ? "D":" ",             encode ? "E":" ",             name);    }    printf("\n");    printf("Image formats:\n");    for(image_fmt = first_image_format; image_fmt != NULL;         image_fmt = image_fmt->next) {        printf(            " %s%s %s\n",            image_fmt->img_read  ? "D":" ",            image_fmt->img_write ? "E":" ",            image_fmt->name);    }    printf("\n");    printf("Codecs:\n");    last_name= "000";    for(;;){        int decode=0;        int encode=0;        int cap=0;        p2=NULL;        for(p = first_avcodec; p != NULL; p = p->next) {            if((p2==NULL || strcmp(p->name, p2->name)<0) &&                strcmp(p->name, last_name)>0){                p2= p;                decode= encode= cap=0;            }            if(p2 && strcmp(p->name, p2->name)==0){                if(p->decode) decode=1;                if(p->encode) encode=1;                cap |= p->capabilities;            }        }        if(p2==NULL)            break;        last_name= p2->name;                printf(            " %s%s%s%s%s%s %s",             decode ? "D": (/*p2->decoder ? "d":*/" "),             encode ? "E":" ",             p2->type == CODEC_TYPE_AUDIO ? "A":"V",            cap & CODEC_CAP_DRAW_HORIZ_BAND ? "S":" ",            cap & CODEC_CAP_DR1 ? "D":" ",            cap & CODEC_CAP_TRUNCATED ? "T":" ",            p2->name);       /* if(p2->decoder && decode==0)            printf(" use %s for decoding", p2->decoder->name);*/        printf("\n");    }    printf("\n");    printf("Supported file protocols:\n");    for(up = first_protocol; up != NULL; up = up->next)        printf(" %s:", up->name);    printf("\n");        printf("Frame size, frame rate abbreviations:\n ntsc pal qntsc qpal sntsc spal film ntsc-film sqcif qcif cif 4cif\n");    printf("Motion estimation methods:\n");    pp = motion_str;    while (*pp) {        printf(" %s", *pp);        if ((pp - motion_str + 1) == ME_ZERO)             printf("(fastest)");        else if ((pp - motion_str + 1) == ME_FULL)             printf("(slowest)");        else if ((pp - motion_str + 1) == ME_EPZS)             printf("(default)");        pp++;    }    printf("\n\n");    printf("Note, the names of encoders and decoders dont always match, so there are\n""several cases where the above table shows encoder only or decoder only entries\n""even though both encoding and decoding are supported for example, the h263\n""decoder corresponds to the h263 and h263p encoders, for file formats its even\n""worse\n");    exit(1);}