aspect_ratio = is->video_st->codec.aspect_ratio;
aspect_ratio = av_q2d(is->video_st->codec.sample_aspect_ratio) * is->video_st->codec.width / is->video_st->codec.height;;
static void video_image_display(VideoState *is){    VideoPicture *vp;    float aspect_ratio;    int width, height, x, y;    SDL_Rect rect;    vp = &is->pictq[is->pictq_rindex];    if (vp->bmp) {        /* XXX: use variable in the frame */        aspect_ratio = is->video_st->codec.aspect_ratio;        if (aspect_ratio <= 0.0)            aspect_ratio = (float)is->video_st->codec.width /                 (float)is->video_st->codec.height;        /* if an active format is indicated, then it overrides the           mpeg format */#if 0        if (is->video_st->codec.dtg_active_format != is->dtg_active_format) {            is->dtg_active_format = is->video_st->codec.dtg_active_format;            printf("dtg_active_format=%d\n", is->dtg_active_format);        }#endif#if 0        switch(is->video_st->codec.dtg_active_format) {        case FF_DTG_AFD_SAME:        default:            /* nothing to do */            break;        case FF_DTG_AFD_4_3:            aspect_ratio = 4.0 / 3.0;            break;        case FF_DTG_AFD_16_9:            aspect_ratio = 16.0 / 9.0;            break;        case FF_DTG_AFD_14_9:            aspect_ratio = 14.0 / 9.0;            break;        case FF_DTG_AFD_4_3_SP_14_9:            aspect_ratio = 14.0 / 9.0;            break;        case FF_DTG_AFD_16_9_SP_14_9:            aspect_ratio = 14.0 / 9.0;            break;        case FF_DTG_AFD_SP_4_3:            aspect_ratio = 4.0 / 3.0;            break;        }#endif        /* XXX: we suppose the screen has a 1.0 pixel ratio */        height = is->height;        width = ((int)rint(height * aspect_ratio)) & -3;        if (width > is->width) {            width = is->width;            height = ((int)rint(width / aspect_ratio)) & -3;        }        x = (is->width - width) / 2;        y = (is->height - height) / 2;        if (!is->no_background) {            /* fill the background */            //            fill_border(is, x, y, width, height, QERGB(0x00, 0x00, 0x00));        } else {            is->no_background = 0;        }        rect.x = is->xleft + x;        rect.y = is->xleft + y;        rect.w = width;        rect.h = height;        SDL_DisplayYUVOverlay(vp->bmp, &rect);    } else {#if 0        fill_rectangle(screen,                        is->xleft, is->ytop, is->width, is->height,                        QERGB(0x00, 0x00, 0x00));#endif    }}