summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2005-04-25 18:29:06 +0000
committerMichael Niedermayer <michaelni@gmx.at>2005-04-25 18:29:06 +0000
commit644a92626a94d6f24110309cb2dc7d9ec3e79f25 (patch)
tree536101865dc2b937f4e4587909c299dc6f434b84 /libavcodec
parent3ca4b65479f587d5d79080699d16cdd5c9ec7e0a (diff)
downloadffmpeg-644a92626a94d6f24110309cb2dc7d9ec3e79f25.tar.gz
PIX_FMT_NONE and related fixes
Originally committed as revision 4161 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/asv1.c1
-rw-r--r--libavcodec/avcodec.h3
-rw-r--r--libavcodec/rv10.c6
-rw-r--r--libavcodec/snow.c2
-rw-r--r--libavcodec/utils.c1
5 files changed, 9 insertions, 4 deletions
diff --git a/libavcodec/asv1.c b/libavcodec/asv1.c
index 4ab2518ab7..13976db619 100644
--- a/libavcodec/asv1.c
+++ b/libavcodec/asv1.c
@@ -557,6 +557,7 @@ static int decode_init(AVCodecContext *avctx){
common_init(avctx);
init_vlcs(a);
ff_init_scantable(a->dsp.idct_permutation, &a->scantable, scantab);
+ avctx->pix_fmt= PIX_FMT_YUV420P;
a->inv_qscale= ((uint8_t*)avctx->extradata)[0];
if(a->inv_qscale == 0){
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 8e6b2c0738..9efb95ee0a 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -17,7 +17,7 @@ extern "C" {
#define FFMPEG_VERSION_INT 0x000409
#define FFMPEG_VERSION "0.4.9-pre1"
-#define LIBAVCODEC_BUILD 4752
+#define LIBAVCODEC_BUILD 4753
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION
@@ -206,6 +206,7 @@ enum CodecType {
* to run on the IBM VGA graphics adapter use 6-bit palette components.
*/
enum PixelFormat {
+ PIX_FMT_NONE= -1,
PIX_FMT_YUV420P, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
PIX_FMT_YUV422, ///< Packed pixel, Y0 Cb Y1 Cr
PIX_FMT_RGB24, ///< Packed pixel, 3 bytes per pixel, RGBRGB...
diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c
index c5068c5685..8183391e93 100644
--- a/libavcodec/rv10.c
+++ b/libavcodec/rv10.c
@@ -560,7 +560,9 @@ static int rv10_decode_init(AVCodecContext *avctx)
if(avctx->debug & FF_DEBUG_PICT_INFO){
av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", avctx->sub_id, avctx->extradata_size >= 4 ? ((uint32_t*)avctx->extradata)[0] : -1);
}
-
+
+ avctx->pix_fmt = PIX_FMT_YUV420P;
+
if (MPV_common_init(s) < 0)
return -1;
@@ -576,8 +578,6 @@ static int rv10_decode_init(AVCodecContext *avctx)
rv_chrom_code, 2, 2, 1);
done = 1;
}
-
- avctx->pix_fmt = PIX_FMT_YUV420P;
return 0;
}
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index a79cb1ad6e..e34cbac0f3 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -3652,6 +3652,8 @@ static int decode_init(AVCodecContext *avctx)
{
SnowContext *s = avctx->priv_data;
int block_size;
+
+ avctx->pix_fmt= PIX_FMT_YUV420P;
common_init(avctx);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index afff2f98a8..f675ce8831 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -459,6 +459,7 @@ void avcodec_get_context_defaults(AVCodecContext *s){
s->profile= FF_PROFILE_UNKNOWN;
s->level= FF_LEVEL_UNKNOWN;
s->me_penalty_compensation= 256;
+ s->pix_fmt= PIX_FMT_NONE;
s->intra_quant_bias= FF_DEFAULT_QUANT_BIAS;
s->inter_quant_bias= FF_DEFAULT_QUANT_BIAS;