diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 14:52:34 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 14:52:34 +0200 |
commit | f391e405dfde35bfb3fea9ccc09bd67b5cc0a8f2 (patch) | |
tree | 739e823660aa365a392c509acd1ac1686272029f /libavcodec | |
parent | d6135a886d85bdbf271c55a238c3336670adc742 (diff) | |
parent | e002e3291e6dc7953f843abf56fc14f08f238b21 (diff) | |
download | ffmpeg-f391e405dfde35bfb3fea9ccc09bd67b5cc0a8f2.tar.gz |
Merge commit 'e002e3291e6dc7953f843abf56fc14f08f238b21'
* commit 'e002e3291e6dc7953f843abf56fc14f08f238b21':
Use the new aes/md5/sha/tree allocation functions
avutil: Add functions for allocating opaque contexts for algorithms
svq3: fix pointer type warning
svq3: replace unsafe pointer casting with intreadwrite macros
parseutils-test: various cleanups
Conflicts:
doc/APIchanges
libavcodec/svq3.c
libavutil/parseutils.c
libavutil/version.h
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/flacenc.c | 2 | ||||
-rw-r--r-- | libavcodec/svq3.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/flacenc.c b/libavcodec/flacenc.c index 070fb4db5e..ec6f2e075b 100644 --- a/libavcodec/flacenc.c +++ b/libavcodec/flacenc.c @@ -355,7 +355,7 @@ static av_cold int flac_encode_init(AVCodecContext *avctx) s->channels, 16); /* initialize MD5 context */ - s->md5ctx = av_malloc(av_md5_size); + s->md5ctx = av_md5_alloc(); if (!s->md5ctx) return AVERROR(ENOMEM); av_md5_init(s->md5ctx); diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index c1c0102a45..2385eb0715 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -411,17 +411,17 @@ static inline int svq3_mc_dir(H264Context *h, int size, int mode, int dir, int32_t mv = pack16to32(mx,my); if (part_height == 8 && i < 8) { - *(int32_t *) h->mv_cache[dir][scan8[k] + 1*8] = mv; + AV_WN32A(h->mv_cache[dir][scan8[k] + 1*8], mv); if (part_width == 8 && j < 8) { - *(int32_t *) h->mv_cache[dir][scan8[k] + 1 + 1*8] = mv; + AV_WN32A(h->mv_cache[dir][scan8[k] + 1 + 1*8], mv); } } if (part_width == 8 && j < 8) { - *(int32_t *) h->mv_cache[dir][scan8[k] + 1] = mv; + AV_WN32A(h->mv_cache[dir][scan8[k] + 1], mv); } if (part_width == 4 || part_height == 4) { - *(int32_t *) h->mv_cache[dir][scan8[k]] = mv; + AV_WN32A(h->mv_cache[dir][scan8[k]], mv); } } @@ -489,11 +489,11 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type) for (m = 0; m < 2; m++) { if (s->mb_x > 0 && h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - 1]+6] != -1) { for (i = 0; i < 4; i++) { - *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - 1 + i*h->b_stride]; + AV_COPY32(h->mv_cache[m][scan8[0] - 1 + i*8], s->current_picture.f.motion_val[m][b_xy - 1 + i*h->b_stride]); } } else { for (i = 0; i < 4; i++) { - *(uint32_t *) h->mv_cache[m][scan8[0] - 1 + i*8] = 0; + AV_ZERO32(h->mv_cache[m][scan8[0] - 1 + i*8]); } } if (s->mb_y > 0) { @@ -501,14 +501,14 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type) memset(&h->ref_cache[m][scan8[0] - 1*8], (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride]] == -1) ? PART_NOT_AVAILABLE : 1, 4); if (s->mb_x < (s->mb_width - 1)) { - *(uint32_t *) h->mv_cache[m][scan8[0] + 4 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride + 4]; + AV_COPY32(h->mv_cache[m][scan8[0] + 4 - 1*8], s->current_picture.f.motion_val[m][b_xy - h->b_stride + 4]); h->ref_cache[m][scan8[0] + 4 - 1*8] = (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride + 1]+6] == -1 || h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride ] ] == -1) ? PART_NOT_AVAILABLE : 1; }else h->ref_cache[m][scan8[0] + 4 - 1*8] = PART_NOT_AVAILABLE; if (s->mb_x > 0) { - *(uint32_t *) h->mv_cache[m][scan8[0] - 1 - 1*8] = *(uint32_t *) s->current_picture.f.motion_val[m][b_xy - h->b_stride - 1]; + AV_COPY32(h->mv_cache[m][scan8[0] - 1 - 1*8], s->current_picture.f.motion_val[m][b_xy - h->b_stride - 1]); h->ref_cache[m][scan8[0] - 1 - 1*8] = (h->intra4x4_pred_mode[h->mb2br_xy[mb_xy - s->mb_stride - 1]+3] == -1) ? PART_NOT_AVAILABLE : 1; }else h->ref_cache[m][scan8[0] - 1 - 1*8] = PART_NOT_AVAILABLE; @@ -660,7 +660,7 @@ static int svq3_decode_mb(SVQ3Context *svq3, unsigned int mb_type) if (IS_INTRA16x16(mb_type)) { AV_ZERO128(h->mb_luma_dc[0]+0); AV_ZERO128(h->mb_luma_dc[0]+8); - if (svq3_decode_block(&s->gb, *h->mb_luma_dc, 0, 1)){ + if (svq3_decode_block(&s->gb, h->mb_luma_dc[0], 0, 1)){ av_log(h->s.avctx, AV_LOG_ERROR, "error while decoding intra luma dc\n"); return -1; } |