Mercurial > libavcodec.hg
changeset 315:40d8092e2ff0 libavcodec
* using pixtype as enum - by Philip Gladstone
author | kabi |
---|---|
date | Mon, 08 Apr 2002 21:03:35 +0000 |
parents | 289eb941b8ba |
children | 02d6d988399e |
files | avcodec.h imgconvert.c mpegvideo.c utils.c |
diffstat | 4 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/avcodec.h Mon Apr 08 12:08:03 2002 +0000 +++ b/avcodec.h Mon Apr 08 21:03:35 2002 +0000 @@ -39,6 +39,7 @@ }; enum PixelFormat { + PIX_FMT_ANY, PIX_FMT_YUV420P, PIX_FMT_YUV422, PIX_FMT_RGB24, @@ -98,7 +99,7 @@ #define FF_ASPECT_16_9_625 4 #define FF_ASPECT_16_9_525 5 int gop_size; /* 0 = intra only */ - int pix_fmt; /* pixel format, see PIX_FMT_xxx */ + enum PixelFormat pix_fmt; /* pixel format, see PIX_FMT_xxx */ /* if non NULL, 'draw_horiz_band' is called by the libavcodec decoder to draw an horizontal band. It improve cache usage. Not
--- a/imgconvert.c Mon Apr 08 12:08:03 2002 +0000 +++ b/imgconvert.c Mon Apr 08 21:03:35 2002 +0000 @@ -361,6 +361,8 @@ { int i; + assert(pix_fmt != PIX_FMT_ANY && dst_pix_fmt != PIX_FMT_ANY); + if (dst_pix_fmt == pix_fmt) { switch(pix_fmt) { case PIX_FMT_YUV420P:
--- a/mpegvideo.c Mon Apr 08 12:08:03 2002 +0000 +++ b/mpegvideo.c Mon Apr 08 21:03:35 2002 +0000 @@ -286,6 +286,8 @@ MpegEncContext *s = avctx->priv_data; int i; + avctx->pix_fmt = PIX_FMT_YUV420P; + s->bit_rate = avctx->bit_rate; s->bit_rate_tolerance = avctx->bit_rate_tolerance; s->frame_rate = avctx->frame_rate;
--- a/utils.c Mon Apr 08 12:08:03 2002 +0000 +++ b/utils.c Mon Apr 08 21:03:35 2002 +0000 @@ -205,6 +205,7 @@ } const char *pix_fmt_str[] = { + "??", "yuv420p", "yuv422", "rgb24", @@ -259,6 +260,9 @@ enc->width, enc->height, (float)enc->frame_rate / FRAME_RATE_BASE); } + snprintf(buf + strlen(buf), buf_size - strlen(buf), + ", q=%d-%d", enc->qmin, enc->qmax); + bitrate = enc->bit_rate; break; case CODEC_TYPE_AUDIO: