summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-28 21:28:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-28 21:28:09 +0200
commit9b736f74fc247f438a0aabe046bef6022b569343 (patch)
treeea56e7a4f463f52e8c3603b52081ccd94d598eed
parentf0b99112e3570e10409cdc35e86dd431fad1546b (diff)
parent419e3404d07acaac019e8f363c281e17c3a3d622 (diff)
Merge commit '419e3404d07acaac019e8f363c281e17c3a3d622'
* commit '419e3404d07acaac019e8f363c281e17c3a3d622': mpegvideo: Drop exchange_uv() function and use its code directly Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mpegvideo.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 6fbf500b5f..b8201d1f40 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -811,15 +811,6 @@ fail:
return ret;
}
-static void exchange_uv(MpegEncContext *s)
-{
- int16_t (*tmp)[64];
-
- tmp = s->pblocks[4];
- s->pblocks[4] = s->pblocks[5];
- s->pblocks[5] = tmp;
-}
-
static int init_duplicate_context(MpegEncContext *s)
{
int y_size = s->b8_stride * (2 * s->mb_height + 1);
@@ -853,8 +844,13 @@ static int init_duplicate_context(MpegEncContext *s)
for (i = 0; i < 12; i++) {
s->pblocks[i] = &s->block[i];
}
- if (s->avctx->codec_tag == AV_RL32("VCR2"))
- exchange_uv(s);
+ if (s->avctx->codec_tag == AV_RL32("VCR2")) {
+ // exchange uv
+ int16_t (*tmp)[64];
+ tmp = s->pblocks[4];
+ s->pblocks[4] = s->pblocks[5];
+ s->pblocks[5] = tmp;
+ }
if (s->out_format == FMT_H263) {
/* ac values */
@@ -929,8 +925,13 @@ int ff_update_duplicate_context(MpegEncContext *dst, MpegEncContext *src)
for (i = 0; i < 12; i++) {
dst->pblocks[i] = &dst->block[i];
}
- if (dst->avctx->codec_tag == AV_RL32("VCR2"))
- exchange_uv(dst);
+ if (dst->avctx->codec_tag == AV_RL32("VCR2")) {
+ // exchange uv
+ int16_t (*tmp)[64];
+ tmp = dst->pblocks[4];
+ dst->pblocks[4] = dst->pblocks[5];
+ dst->pblocks[5] = tmp;
+ }
if (!dst->edge_emu_buffer &&
(ret = frame_size_alloc(dst, dst->linesize)) < 0) {
av_log(dst->avctx, AV_LOG_ERROR, "failed to allocate context "