Merge commit '1ab4578c88dc3e1407da15471bd323ba40c3ebbb' into release/1.1

* commit '1ab4578c88dc3e1407da15471bd323ba40c3ebbb':
  lavc: Fix assignments in if() when calling ff_af_queue_add
  wav: Always seek to an even offset
  swscale: Use alpha from the right row in yuva2rgba_c
  Prepare for 9.6 Release

Conflicts:
	RELEASE

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer
2013-05-12 14:31:59 +02:00
2 changed files with 14 additions and 8 deletions

View File

@@ -62,6 +62,12 @@ static int64_t next_tag(AVIOContext *pb, uint32_t *tag)
return avio_rl32(pb); return avio_rl32(pb);
} }
/* RIFF chunks are always on a even offset. */
static int64_t wav_seek_tag(AVIOContext *s, int64_t offset, int whence)
{
return avio_seek(s, offset + (offset & 1), whence);
}
/* return the size of the found tag */ /* return the size of the found tag */
static int64_t find_tag(AVIOContext *pb, uint32_t tag1) static int64_t find_tag(AVIOContext *pb, uint32_t tag1)
{ {
@@ -74,7 +80,7 @@ static int64_t find_tag(AVIOContext *pb, uint32_t tag1)
size = next_tag(pb, &tag); size = next_tag(pb, &tag);
if (tag == tag1) if (tag == tag1)
break; break;
avio_skip(pb, size); wav_seek_tag(pb, size, SEEK_CUR);
} }
return size; return size;
} }
@@ -356,7 +362,7 @@ static int wav_read_header(AVFormatContext *s)
/* seek to next tag unless we know that we'll run into EOF */ /* seek to next tag unless we know that we'll run into EOF */
if ((avio_size(pb) > 0 && next_tag_ofs >= avio_size(pb)) || if ((avio_size(pb) > 0 && next_tag_ofs >= avio_size(pb)) ||
avio_seek(pb, next_tag_ofs, SEEK_SET) < 0) { wav_seek_tag(pb, next_tag_ofs, SEEK_SET) < 0) {
break; break;
} }
} }

View File

@@ -266,16 +266,16 @@ YUV2RGBFUNC(yuva2rgba_c, uint32_t, 1)
PUTRGBA(dst_2, py_2, pa_2, 0, 24); PUTRGBA(dst_2, py_2, pa_2, 0, 24);
LOADCHROMA(1); LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_1, 1, 24); PUTRGBA(dst_2, py_2, pa_2, 1, 24);
PUTRGBA(dst_1, py_1, pa_2, 1, 24); PUTRGBA(dst_1, py_1, pa_1, 1, 24);
LOADCHROMA(2); LOADCHROMA(2);
PUTRGBA(dst_1, py_1, pa_1, 2, 24); PUTRGBA(dst_1, py_1, pa_1, 2, 24);
PUTRGBA(dst_2, py_2, pa_2, 2, 24); PUTRGBA(dst_2, py_2, pa_2, 2, 24);
LOADCHROMA(3); LOADCHROMA(3);
PUTRGBA(dst_2, py_2, pa_1, 3, 24); PUTRGBA(dst_2, py_2, pa_2, 3, 24);
PUTRGBA(dst_1, py_1, pa_2, 3, 24); PUTRGBA(dst_1, py_1, pa_1, 3, 24);
pa_1 += 8; \ pa_1 += 8; \
pa_2 += 8; \ pa_2 += 8; \
ENDYUV2RGBLINE(8, 0) ENDYUV2RGBLINE(8, 0)
@@ -284,8 +284,8 @@ ENDYUV2RGBLINE(8, 0)
PUTRGBA(dst_2, py_2, pa_2, 0, 24); PUTRGBA(dst_2, py_2, pa_2, 0, 24);
LOADCHROMA(1); LOADCHROMA(1);
PUTRGBA(dst_2, py_2, pa_1, 1, 24); PUTRGBA(dst_2, py_2, pa_2, 1, 24);
PUTRGBA(dst_1, py_1, pa_2, 1, 24); PUTRGBA(dst_1, py_1, pa_1, 1, 24);
pa_1 += 4; \ pa_1 += 4; \
pa_2 += 4; \ pa_2 += 4; \
ENDYUV2RGBLINE(8, 1) ENDYUV2RGBLINE(8, 1)