mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-24 15:49:26 +08:00
Merge declaration and assignment.
Originally committed as revision 15494 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
@ -98,18 +98,14 @@ static av_cold int build_modpred(Indeo3DecodeContext *s)
|
|||||||
|
|
||||||
static av_cold int iv_alloc_frames(Indeo3DecodeContext *s)
|
static av_cold int iv_alloc_frames(Indeo3DecodeContext *s)
|
||||||
{
|
{
|
||||||
int luma_width, luma_height, luma_pixels, chroma_width, chroma_height,
|
int luma_width = (s->width + 3) & ~3,
|
||||||
chroma_pixels, i;
|
luma_height = (s->height + 3) & ~3,
|
||||||
unsigned int bufsize;
|
chroma_width = ((luma_width >> 2) + 3) & ~3,
|
||||||
|
chroma_height = ((luma_height >> 2) + 3) & ~3,
|
||||||
luma_width = (s->width + 3) & (~3);
|
luma_pixels = luma_width * luma_height,
|
||||||
luma_height = (s->height + 3) & (~3);
|
chroma_pixels = chroma_width * chroma_height,
|
||||||
chroma_width = ((luma_width >> 2) + 3) & (~3);
|
i;
|
||||||
chroma_height = ((luma_height>> 2) + 3) & (~3);
|
unsigned int bufsize = luma_pixels * 2 + luma_width * 3 +
|
||||||
luma_pixels = luma_width * luma_height;
|
|
||||||
chroma_pixels = chroma_width * chroma_height;
|
|
||||||
|
|
||||||
bufsize = luma_pixels * 2 + luma_width * 3 +
|
|
||||||
(chroma_pixels + chroma_width) * 4;
|
(chroma_pixels + chroma_width) * 4;
|
||||||
|
|
||||||
if(!(s->buf = av_malloc(bufsize)))
|
if(!(s->buf = av_malloc(bufsize)))
|
||||||
|
Reference in New Issue
Block a user