1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

Set default values for the scale context in sws_alloc_context().

Originally committed as revision 32415 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
Stefano Sabatini 2010-09-29 22:06:44 +00:00
parent e60c906a82
commit f34fcdc8b6

View File

@ -43,6 +43,7 @@
#include "libavutil/x86_cpu.h"
#include "libavutil/avutil.h"
#include "libavutil/bswap.h"
#include "libavutil/opt.h"
#include "libavutil/pixdesc.h"
unsigned swscale_version(void)
@ -746,6 +747,7 @@ SwsContext *sws_alloc_context(void)
SwsContext *c= av_mallocz(sizeof(SwsContext));
c->av_class = &sws_context_class;
av_opt_set_defaults(c);
return c;
}
@ -1154,9 +1156,6 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat,
if (param) {
c->param[0] = param[0];
c->param[1] = param[1];
} else {
c->param[0] =
c->param[1] = SWS_PARAM_DEFAULT;
}
sws_setColorspaceDetails(c, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], c->srcRange, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT] /* FIXME*/, c->dstRange, 0, 1<<16, 1<<16);