diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-07-14 20:44:58 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-07-14 20:44:58 +0200 |
commit | 5dc6bd86f0f5cfffb44b47e6e916119f26b12091 (patch) | |
tree | 968252b8209375cdca411921e37bd6c9db66b487 /libswscale | |
parent | 1885824b20a493d25db4b8e5397666e3a68f45f2 (diff) | |
parent | 6cb11979295ae5d3b9bad0965cbd6a06d9c9783b (diff) | |
download | ffmpeg-5dc6bd86f0f5cfffb44b47e6e916119f26b12091.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
APIchanges: fill in missing hashes and dates.
Add an APIChanges entry and bump minor versions for recent changes.
ffmpeg: print the low bitrate warning after the codec is openend.
doxygen: Move function documentation into the macro generating the function.
doxygen: Make sure parameter names match between .c and .h files.
h264: move fill_decode_neighbors()/fill_decode_caches() to h264_mvpred.h
H.264: Add more x86 assembly for 10-bit H.264 predict functions
lavf: fix invalid reads in avformat_find_stream_info()
cmdutils: replace opt_default with opt_default2() and remove set_context_opts
ffmpeg: use new avcodec_open2 and avformat_find_stream_info API.
ffplay: use new avcodec_open2 and avformat_find_stream_info API.
cmdutils: store all codec options in one dict instead of video/audio/sub
ffmpeg: check experimental flag after codec is opened.
ffmpeg: do not set GLOBAL_HEADER flag in the options context
Conflicts:
cmdutils.c
doc/APIchanges
ffmpeg.c
ffplay.c
libavcodec/version.h
libavformat/version.h
libswscale/swscale_unscaled.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/swscale.h | 7 | ||||
-rw-r--r-- | libswscale/swscale_unscaled.c | 11 | ||||
-rw-r--r-- | libswscale/utils.c | 8 |
3 files changed, 16 insertions, 10 deletions
diff --git a/libswscale/swscale.h b/libswscale/swscale.h index b54bba3374..a4b3a4807f 100644 --- a/libswscale/swscale.h +++ b/libswscale/swscale.h @@ -218,7 +218,7 @@ struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat * top-bottom or bottom-top order. If slices are provided in * non-sequential order the behavior of the function is undefined. * - * @param context the scaling context previously created with + * @param c the scaling context previously created with * sws_getContext() * @param srcSlice the array containing the pointers to the planes of * the source slice @@ -235,8 +235,9 @@ struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat * the destination image * @return the height of the output slice */ -int sws_scale(struct SwsContext *context, const uint8_t* const srcSlice[], const int srcStride[], - int srcSliceY, int srcSliceH, uint8_t* const dst[], const int dstStride[]); +int sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[], + const int srcStride[], int srcSliceY, int srcSliceH, + uint8_t* const dst[], const int dstStride[]); #if LIBSWSCALE_VERSION_MAJOR < 1 /** diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index e0c4b25846..ea5d34290c 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -686,18 +686,19 @@ static int check_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, * swscale wrapper, so we don't need to export the SwsContext. * Assumes planar YUV to be in YUV order instead of YVU. */ -int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[], int srcSliceY, - int srcSliceH, uint8_t* const dst[], const int dstStride[]) +int sws_scale(struct SwsContext *c, const uint8_t* const srcSlice[], + const int srcStride[], int srcSliceY, int srcSliceH, + uint8_t* const dst[], const int dstStride[]) { int i; - const uint8_t* src2[4]= {src[0], src[1], src[2], src[3]}; + const uint8_t* src2[4]= {srcSlice[0], srcSlice[1], srcSlice[2], srcSlice[3]}; uint8_t* dst2[4]= {dst[0], dst[1], dst[2], dst[3]}; // do not mess up sliceDir if we have a "trailing" 0-size slice if (srcSliceH == 0) return 0; - if (!check_image_pointers(src, c->srcFormat, srcStride)) { + if (!check_image_pointers(srcSlice, c->srcFormat, srcStride)) { av_log(c, AV_LOG_ERROR, "bad src image pointers\n"); return 0; } @@ -718,7 +719,7 @@ int sws_scale(SwsContext *c, const uint8_t* const src[], const int srcStride[], for (i=0; i<256; i++) { int p, r, g, b, y, u, v, a = 0xff; if(c->srcFormat == PIX_FMT_PAL8) { - p=((const uint32_t*)(src[1]))[i]; + p=((const uint32_t*)(srcSlice[1]))[i]; a= (p>>24)&0xFF; r= (p>>16)&0xFF; g= (p>> 8)&0xFF; diff --git a/libswscale/utils.c b/libswscale/utils.c index 62839ee8e5..ec246e22c5 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -717,7 +717,9 @@ static void getSubSampleFactors(int *h, int *v, enum PixelFormat format) *v = av_pix_fmt_descriptors[format].log2_chroma_h; } -int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange, const int table[4], int dstRange, int brightness, int contrast, int saturation) +int sws_setColorspaceDetails(struct SwsContext *c, const int inv_table[4], + int srcRange, const int table[4], int dstRange, + int brightness, int contrast, int saturation) { memcpy(c->srcColorspaceTable, inv_table, sizeof(int)*4); memcpy(c->dstColorspaceTable, table, sizeof(int)*4); @@ -740,7 +742,9 @@ int sws_setColorspaceDetails(SwsContext *c, const int inv_table[4], int srcRange return 0; } -int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int **table, int *dstRange, int *brightness, int *contrast, int *saturation) +int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, + int *srcRange, int **table, int *dstRange, + int *brightness, int *contrast, int *saturation) { if (!c || isYUV(c->dstFormat) || isGray(c->dstFormat)) return -1; |