diff options
author | Diego Biurrun <diego@biurrun.de> | 2012-02-27 08:51:20 +0100 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2012-03-01 23:11:10 +0100 |
commit | 562b6c744abdde4e673038fcb0c126a4aadfa6c7 (patch) | |
tree | b4298ea102140993cfc2ebaad2dbee91f7f56a0c /libavcodec | |
parent | 2f4b476e04160dad9472a61db2dd575471f39812 (diff) | |
download | ffmpeg-562b6c744abdde4e673038fcb0c126a4aadfa6c7.tar.gz |
Remove unnecessary AVFrame pointer casts.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/a64multienc.c | 2 | ||||
-rw-r--r-- | libavcodec/avs.c | 2 | ||||
-rw-r--r-- | libavcodec/bmp.c | 4 | ||||
-rw-r--r-- | libavcodec/bmpenc.c | 6 | ||||
-rw-r--r-- | libavcodec/fraps.c | 4 | ||||
-rw-r--r-- | libavcodec/gif.c | 2 | ||||
-rw-r--r-- | libavcodec/indeo2.c | 2 | ||||
-rw-r--r-- | libavcodec/jpeglsenc.c | 2 | ||||
-rw-r--r-- | libavcodec/loco.c | 2 | ||||
-rw-r--r-- | libavcodec/mdec.c | 2 | ||||
-rw-r--r-- | libavcodec/pamenc.c | 2 | ||||
-rw-r--r-- | libavcodec/pnm.c | 4 | ||||
-rw-r--r-- | libavcodec/pnmdec.c | 2 | ||||
-rw-r--r-- | libavcodec/pnmenc.c | 2 | ||||
-rw-r--r-- | libavcodec/qdrw.c | 2 | ||||
-rw-r--r-- | libavcodec/qpeg.c | 4 | ||||
-rw-r--r-- | libavcodec/rawdec.c | 4 | ||||
-rw-r--r-- | libavcodec/rawenc.c | 2 | ||||
-rw-r--r-- | libavcodec/svq1enc.c | 4 | ||||
-rw-r--r-- | libavcodec/targa.c | 6 | ||||
-rw-r--r-- | libavcodec/tiff.c | 6 | ||||
-rw-r--r-- | libavcodec/tiffenc.c | 2 | ||||
-rw-r--r-- | libavcodec/truemotion2.c | 2 | ||||
-rw-r--r-- | libavcodec/ulti.c | 2 | ||||
-rw-r--r-- | libavcodec/vcr1.c | 6 | ||||
-rw-r--r-- | libavcodec/wnv1.c | 2 | ||||
-rw-r--r-- | libavcodec/xl.c | 2 | ||||
-rw-r--r-- | libavcodec/zmbvenc.c | 2 |
28 files changed, 42 insertions, 42 deletions
diff --git a/libavcodec/a64multienc.c b/libavcodec/a64multienc.c index cb2425fdf9..363b80c3ac 100644 --- a/libavcodec/a64multienc.c +++ b/libavcodec/a64multienc.c @@ -246,7 +246,7 @@ static int a64multi_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { A64Context *c = avctx->priv_data; - AVFrame *const p = (AVFrame *) & c->picture; + AVFrame *const p = &c->picture; int frame; int x, y; diff --git a/libavcodec/avs.c b/libavcodec/avs.c index b3cd5b1478..ce119ebd72 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -51,7 +51,7 @@ avs_decode_frame(AVCodecContext * avctx, int buf_size = avpkt->size; AvsContext *const avs = avctx->priv_data; AVFrame *picture = data; - AVFrame *const p = (AVFrame *) & avs->picture; + AVFrame *const p = &avs->picture; const uint8_t *table, *vect; uint8_t *out; int i, j, x, y, stride, vect_w = 3, vect_h = 3; diff --git a/libavcodec/bmp.c b/libavcodec/bmp.c index 1f725f5369..4d586dc89b 100644 --- a/libavcodec/bmp.c +++ b/libavcodec/bmp.c @@ -27,8 +27,8 @@ static av_cold int bmp_decode_init(AVCodecContext *avctx){ BMPContext *s = avctx->priv_data; - avcodec_get_frame_defaults((AVFrame*)&s->picture); - avctx->coded_frame = (AVFrame*)&s->picture; + avcodec_get_frame_defaults(&s->picture); + avctx->coded_frame = &s->picture; return 0; } diff --git a/libavcodec/bmpenc.c b/libavcodec/bmpenc.c index 3747784183..0bbbb61315 100644 --- a/libavcodec/bmpenc.c +++ b/libavcodec/bmpenc.c @@ -33,8 +33,8 @@ static const uint32_t rgb444_masks[] = { 0x0F00, 0x00F0, 0x000F }; static av_cold int bmp_encode_init(AVCodecContext *avctx){ BMPContext *s = avctx->priv_data; - avcodec_get_frame_defaults((AVFrame*)&s->picture); - avctx->coded_frame = (AVFrame*)&s->picture; + avcodec_get_frame_defaults(&s->picture); + avctx->coded_frame = &s->picture; switch (avctx->pix_fmt) { case PIX_FMT_BGR24: @@ -68,7 +68,7 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { BMPContext *s = avctx->priv_data; - AVFrame * const p= (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; int n_bytes_image, n_bytes_per_row, n_bytes, i, n, hsize, ret; const uint32_t *pal = NULL; int pad_bytes_per_row, pal_entries = 0, compression = BMP_RGB; diff --git a/libavcodec/fraps.c b/libavcodec/fraps.c index e2355d8f2f..dc74b5112f 100644 --- a/libavcodec/fraps.c +++ b/libavcodec/fraps.c @@ -60,7 +60,7 @@ static av_cold int decode_init(AVCodecContext *avctx) { FrapsContext * const s = avctx->priv_data; - avctx->coded_frame = (AVFrame*)&s->frame; + avctx->coded_frame = &s->frame; avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */ s->avctx = avctx; @@ -131,7 +131,7 @@ static int decode_frame(AVCodecContext *avctx, int buf_size = avpkt->size; FrapsContext * const s = avctx->priv_data; AVFrame *frame = data; - AVFrame * const f = (AVFrame*)&s->frame; + AVFrame * const f = &s->frame; uint32_t header; unsigned int version,header_size; unsigned int x, y; diff --git a/libavcodec/gif.c b/libavcodec/gif.c index 6b190f1d0c..d5ceb0d05e 100644 --- a/libavcodec/gif.c +++ b/libavcodec/gif.c @@ -146,7 +146,7 @@ static int gif_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { GIFContext *s = avctx->priv_data; - AVFrame *const p = (AVFrame *)&s->picture; + AVFrame *const p = &s->picture; uint8_t *outbuf_ptr, *end; int ret; diff --git a/libavcodec/indeo2.c b/libavcodec/indeo2.c index ecf89cc817..b114573ff0 100644 --- a/libavcodec/indeo2.c +++ b/libavcodec/indeo2.c @@ -143,7 +143,7 @@ static int ir2_decode_frame(AVCodecContext *avctx, int buf_size = avpkt->size; Ir2Context * const s = avctx->priv_data; AVFrame *picture = data; - AVFrame * const p= (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; int start; if(p->data[0]) diff --git a/libavcodec/jpeglsenc.c b/libavcodec/jpeglsenc.c index f264c79ae7..d3f2e0fe84 100644 --- a/libavcodec/jpeglsenc.c +++ b/libavcodec/jpeglsenc.c @@ -232,7 +232,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { JpeglsContext * const s = avctx->priv_data; - AVFrame * const p= (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; const int near = avctx->prediction_method; PutBitContext pb, pb2; GetBitContext gb; diff --git a/libavcodec/loco.c b/libavcodec/loco.c index 919a06b123..22b165db53 100644 --- a/libavcodec/loco.c +++ b/libavcodec/loco.c @@ -163,7 +163,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; LOCOContext * const l = avctx->priv_data; - AVFrame * const p= (AVFrame*)&l->pic; + AVFrame * const p = &l->pic; int decoded; if(p->data[0]) diff --git a/libavcodec/mdec.c b/libavcodec/mdec.c index 3ce24641d4..391cecfb65 100644 --- a/libavcodec/mdec.c +++ b/libavcodec/mdec.c @@ -242,7 +242,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ static av_cold int decode_init_thread_copy(AVCodecContext *avctx){ MDECContext * const a = avctx->priv_data; - AVFrame *p = (AVFrame*)&a->picture; + AVFrame *p = &a->picture; avctx->coded_frame = p; a->avctx= avctx; diff --git a/libavcodec/pamenc.c b/libavcodec/pamenc.c index 599b7e9a27..4802ca396d 100644 --- a/libavcodec/pamenc.c +++ b/libavcodec/pamenc.c @@ -29,7 +29,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { PNMContext *s = avctx->priv_data; - AVFrame * const p = (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; int i, h, w, n, linesize, depth, maxval, ret; const char *tuple_type; uint8_t *ptr; diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index f6e6d53ec9..6d72f234c1 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -189,8 +189,8 @@ av_cold int ff_pnm_init(AVCodecContext *avctx) { PNMContext *s = avctx->priv_data; - avcodec_get_frame_defaults((AVFrame*)&s->picture); - avctx->coded_frame = (AVFrame*)&s->picture; + avcodec_get_frame_defaults(&s->picture); + avctx->coded_frame = &s->picture; return 0; } diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index c5d236f971..ada0fd8a36 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -32,7 +32,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, int buf_size = avpkt->size; PNMContext * const s = avctx->priv_data; AVFrame *picture = data; - AVFrame * const p = (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; int i, j, n, linesize, h, upgrade = 0; unsigned char *ptr; int components, sample_len; diff --git a/libavcodec/pnmenc.c b/libavcodec/pnmenc.c index 40621c852e..843629e8b9 100644 --- a/libavcodec/pnmenc.c +++ b/libavcodec/pnmenc.c @@ -29,7 +29,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { PNMContext *s = avctx->priv_data; - AVFrame * const p = (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; int i, h, h1, c, n, linesize, ret; uint8_t *ptr, *ptr1, *ptr2; diff --git a/libavcodec/qdrw.c b/libavcodec/qdrw.c index 7410f6e152..baf5de3e95 100644 --- a/libavcodec/qdrw.c +++ b/libavcodec/qdrw.c @@ -40,7 +40,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf_end = avpkt->data + avpkt->size; int buf_size = avpkt->size; QdrawContext * const a = avctx->priv_data; - AVFrame * const p= (AVFrame*)&a->pic; + AVFrame * const p = &a->pic; uint8_t* outdata; int colors; int i; diff --git a/libavcodec/qpeg.c b/libavcodec/qpeg.c index 9513dd0ad3..0f1bcd7ac9 100644 --- a/libavcodec/qpeg.c +++ b/libavcodec/qpeg.c @@ -254,7 +254,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; QpegContext * const a = avctx->priv_data; - AVFrame * const p= (AVFrame*)&a->pic; + AVFrame * const p = &a->pic; uint8_t* outdata; int delta; const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); @@ -297,7 +297,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ static av_cold int decode_end(AVCodecContext *avctx){ QpegContext * const a = avctx->priv_data; - AVFrame * const p= (AVFrame*)&a->pic; + AVFrame * const p = &a->pic; if(p->data[0]) avctx->release_buffer(avctx, p); diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index bb93129027..d3c816580a 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -120,8 +120,8 @@ static int raw_decode(AVCodecContext *avctx, int buf_size = avpkt->size; RawVideoContext *context = avctx->priv_data; - AVFrame * frame = (AVFrame *) data; - AVPicture * picture = (AVPicture *) data; + AVFrame *frame = data; + AVPicture *picture = data; frame->pict_type = avctx->coded_frame->pict_type; frame->interlaced_frame = avctx->coded_frame->interlaced_frame; diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c index 8eb818c618..f435333fef 100644 --- a/libavcodec/rawenc.c +++ b/libavcodec/rawenc.c @@ -32,7 +32,7 @@ static av_cold int raw_init_encoder(AVCodecContext *avctx) { - avctx->coded_frame = (AVFrame *)avctx->priv_data; + avctx->coded_frame = avctx->priv_data; avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I; avctx->coded_frame->key_frame = 1; avctx->bits_per_coded_sample = av_get_bits_per_pixel(&av_pix_fmt_descriptors[avctx->pix_fmt]); diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c index 864c4ac962..c2c927c6c4 100644 --- a/libavcodec/svq1enc.c +++ b/libavcodec/svq1enc.c @@ -473,7 +473,7 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx) SVQ1Context * const s = avctx->priv_data; ff_dsputil_init(&s->dsp, avctx); - avctx->coded_frame= (AVFrame*)&s->picture; + avctx->coded_frame = &s->picture; s->frame_width = avctx->width; s->frame_height = avctx->height; @@ -501,7 +501,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { SVQ1Context * const s = avctx->priv_data; - AVFrame * const p= (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; AVFrame temp; int i, ret; diff --git a/libavcodec/targa.c b/libavcodec/targa.c index 00da7587d0..94a50fbb79 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -106,7 +106,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf_end = avpkt->data + avpkt->size; TargaContext * const s = avctx->priv_data; AVFrame *picture = data; - AVFrame * const p= (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; uint8_t *dst; int stride; int idlen, compr, y, w, h, bpp, flags; @@ -257,8 +257,8 @@ static int decode_frame(AVCodecContext *avctx, static av_cold int targa_init(AVCodecContext *avctx){ TargaContext *s = avctx->priv_data; - avcodec_get_frame_defaults((AVFrame*)&s->picture); - avctx->coded_frame= (AVFrame*)&s->picture; + avcodec_get_frame_defaults(&s->picture); + avctx->coded_frame = &s->picture; return 0; } diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c index d807149922..57720a5018 100644 --- a/libavcodec/tiff.c +++ b/libavcodec/tiff.c @@ -506,7 +506,7 @@ static int decode_frame(AVCodecContext *avctx, int buf_size = avpkt->size; TiffContext * const s = avctx->priv_data; AVFrame *picture = data; - AVFrame * const p= (AVFrame*)&s->picture; + AVFrame * const p = &s->picture; const uint8_t *orig_buf = buf, *end_buf = buf + buf_size; unsigned off; int id, le, ret; @@ -619,8 +619,8 @@ static av_cold int tiff_init(AVCodecContext *avctx){ s->width = 0; s->height = 0; s->avctx = avctx; - avcodec_get_frame_defaults((AVFrame*)&s->picture); - avctx->coded_frame= (AVFrame*)&s->picture; + avcodec_get_frame_defaults(&s->picture); + avctx->coded_frame = &s->picture; ff_lzw_decode_open(&s->lzw); ff_ccitt_unpack_init(); diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index f85b1577ca..50fee906e9 100644 --- a/libavcodec/tiffenc.c +++ b/libavcodec/tiffenc.c @@ -204,7 +204,7 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt, const AVFrame *pict, int *got_packet) { TiffEncoderContext *s = avctx->priv_data; - AVFrame *const p = (AVFrame *) & s->picture; + AVFrame *const p = &s->picture; int i; uint8_t *ptr; uint8_t *offset; diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c index 7be148c602..97feaf1f37 100644 --- a/libavcodec/truemotion2.c +++ b/libavcodec/truemotion2.c @@ -764,7 +764,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; TM2Context * const l = avctx->priv_data; - AVFrame * const p= (AVFrame*)&l->pic; + AVFrame * const p = &l->pic; int i, skip, t; uint8_t *swbuf; diff --git a/libavcodec/ulti.c b/libavcodec/ulti.c index 96f13e430a..b671d91fd3 100644 --- a/libavcodec/ulti.c +++ b/libavcodec/ulti.c @@ -50,7 +50,7 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx) s->height = avctx->height; s->blocks = (s->width / 8) * (s->height / 8); avctx->pix_fmt = PIX_FMT_YUV410P; - avctx->coded_frame = (AVFrame*) &s->frame; + avctx->coded_frame = &s->frame; s->ulti_codebook = ulti_codebook; return 0; diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c index e50e092c7e..bace3a34b8 100644 --- a/libavcodec/vcr1.c +++ b/libavcodec/vcr1.c @@ -49,7 +49,7 @@ static int decode_frame(AVCodecContext *avctx, int buf_size = avpkt->size; VCR1Context * const a = avctx->priv_data; AVFrame *picture = data; - AVFrame * const p= (AVFrame*)&a->picture; + AVFrame * const p = &a->picture; const uint8_t *bytestream= buf; int i, x, y; @@ -121,7 +121,7 @@ static int decode_frame(AVCodecContext *avctx, static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, void *data){ VCR1Context * const a = avctx->priv_data; AVFrame *pict = data; - AVFrame * const p= (AVFrame*)&a->picture; + AVFrame * const p = &a->picture; int size; *p = *pict; @@ -141,7 +141,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size, static av_cold void common_init(AVCodecContext *avctx){ VCR1Context * const a = avctx->priv_data; - avctx->coded_frame= (AVFrame*)&a->picture; + avctx->coded_frame = &a->picture; a->avctx= avctx; } diff --git a/libavcodec/wnv1.c b/libavcodec/wnv1.c index f6e4694df2..e4b222cf87 100644 --- a/libavcodec/wnv1.c +++ b/libavcodec/wnv1.c @@ -64,7 +64,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; WNV1Context * const l = avctx->priv_data; - AVFrame * const p= (AVFrame*)&l->pic; + AVFrame * const p = &l->pic; unsigned char *Y,*U,*V; int i, j; int prev_y = 0, prev_u = 0, prev_v = 0; diff --git a/libavcodec/xl.c b/libavcodec/xl.c index 0ebc9467e0..19cb44fb6b 100644 --- a/libavcodec/xl.c +++ b/libavcodec/xl.c @@ -45,7 +45,7 @@ static int decode_frame(AVCodecContext *avctx, const uint8_t *buf = avpkt->data; int buf_size = avpkt->size; VideoXLContext * const a = avctx->priv_data; - AVFrame * const p= (AVFrame*)&a->pic; + AVFrame * const p = &a->pic; uint8_t *Y, *U, *V; int i, j; int stride; diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c index 1c1e78d912..5d2728e0e7 100644 --- a/libavcodec/zmbvenc.c +++ b/libavcodec/zmbvenc.c @@ -313,7 +313,7 @@ static av_cold int encode_init(AVCodecContext *avctx) return -1; } - avctx->coded_frame = (AVFrame*)&c->pic; + avctx->coded_frame = &c->pic; return 0; } |