aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2016-06-21 21:55:20 +0200
committerClément Bœsch <u@pkh.me>2016-06-21 21:55:34 +0200
commit8ef57a0d6154119e1a616dd8c29e8c32e35808a0 (patch)
tree26c51bc5d99260b44ba3a2585091ca764559f939 /libswscale
parent373b82066cd4d0c7f42af9b03e8cdc1085e1a6e5 (diff)
parent41ed7ab45fc693f7d7fc35664c0233f4c32d69bb (diff)
downloadffmpeg-8ef57a0d6154119e1a616dd8c29e8c32e35808a0.tar.gz
Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'
* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/output.c10
-rw-r--r--libswscale/swscale.h2
-rw-r--r--libswscale/swscale_internal.h116
-rw-r--r--libswscale/x86/output.asm8
-rw-r--r--libswscale/x86/scale.asm6
5 files changed, 71 insertions, 71 deletions
diff --git a/libswscale/output.c b/libswscale/output.c
index e9bbb3d03c..de40e4b33e 100644
--- a/libswscale/output.c
+++ b/libswscale/output.c
@@ -722,7 +722,7 @@ yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter,
A2 += 0x20002000;
}
- // 8bit: 12+15=27; 16-bit: 12+19=31
+ // 8 bits: 12+15=27; 16 bits: 12+19=31
Y1 >>= 14; // 10
Y1 += 0x10000;
Y2 >>= 14;
@@ -730,20 +730,20 @@ yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter,
U >>= 14;
V >>= 14;
- // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit
+ // 8 bits: 27 -> 17 bits, 16 bits: 31 - 14 = 17 bits
Y1 -= c->yuv2rgb_y_offset;
Y2 -= c->yuv2rgb_y_offset;
Y1 *= c->yuv2rgb_y_coeff;
Y2 *= c->yuv2rgb_y_coeff;
Y1 += 1 << 13; // 21
Y2 += 1 << 13;
- // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit
+ // 8 bits: 17 + 13 bits = 30 bits, 16 bits: 17 + 13 bits = 30 bits
R = V * c->yuv2rgb_v2r_coeff;
G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
B = U * c->yuv2rgb_u2b_coeff;
- // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit
+ // 8 bits: 30 - 22 = 8 bits, 16 bits: 30 bits - 14 = 16 bits
output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
output_pixel(&dest[1], av_clip_uintp2( G + Y1, 30) >> 14);
output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
@@ -1294,7 +1294,7 @@ yuv2rgb_write(uint8_t *_dest, int i, int Y1, int Y2,
dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1];
dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2];
- } else /* 8/4-bit */ {
+ } else /* 8/4 bits */ {
uint8_t *dest = (uint8_t *) _dest;
const uint8_t *r = (const uint8_t *) _r;
const uint8_t *g = (const uint8_t *) _g;
diff --git a/libswscale/swscale.h b/libswscale/swscale.h
index 87511a8752..efcbef35b2 100644
--- a/libswscale/swscale.h
+++ b/libswscale/swscale.h
@@ -73,7 +73,7 @@ const char *swscale_license(void);
#define SWS_PRINT_INFO 0x1000
//the following 3 flags are not completely implemented
-//internal chrominace subsampling info
+//internal chrominance subsampling info
#define SWS_FULL_CHR_H_INT 0x2000
//input subsampling info
#define SWS_FULL_CHR_H_INP 0x4000
diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h
index 3f72f9873a..54cd85cce3 100644
--- a/libswscale/swscale_internal.h
+++ b/libswscale/swscale_internal.h
@@ -91,9 +91,9 @@ typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t *src[],
* Write one line of horizontally scaled data to planar output
* without any additional vertical scaling (or point-scaling).
*
- * @param src scaled source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param dest pointer to the output plane. For >8bit
+ * @param src scaled source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param dest pointer to the output plane. For >8-bit
* output, this is in uint16_t
* @param dstW width of destination in pixels
* @param dither ordered dither array of type int16_t and size 8
@@ -106,11 +106,11 @@ typedef void (*yuv2planar1_fn)(const int16_t *src, uint8_t *dest, int dstW,
* Write one line of horizontally scaled data to planar output
* with multi-point vertical scaling between input pixels.
*
- * @param filter vertical luma/alpha scaling coefficients, 12bit [0,4096]
- * @param src scaled luma (Y) or alpha (A) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
+ * @param filter vertical luma/alpha scaling coefficients, 12 bits [0,4096]
+ * @param src scaled luma (Y) or alpha (A) source data, 15 bits for
+ * 8-10-bit output, 19 bits for 16-bit output (in int32_t)
* @param filterSize number of vertical input lines to scale
- * @param dest pointer to output plane. For >8bit
+ * @param dest pointer to output plane. For >8-bit
* output, this is in uint16_t
* @param dstW width of destination pixels
* @param offset Dither offset
@@ -124,13 +124,13 @@ typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize,
* with multi-point vertical scaling between input pixels.
*
* @param c SWS scaling context
- * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096]
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
+ * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096]
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit
+ * output, 19 bits for 16-bit output (in int32_t)
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit
+ * output, 19 bits for 16-bit output (in int32_t)
* @param chrFilterSize number of vertical chroma input lines to scale
- * @param dest pointer to the output plane. For >8bit
+ * @param dest pointer to the output plane. For >8-bit
* output, this is in uint16_t
* @param dstW width of chroma planes
*/
@@ -147,15 +147,15 @@ typedef void (*yuv2interleavedX_fn)(struct SwsContext *c,
* that this function may do chroma scaling, see the "uvalpha" argument.
*
* @param c SWS scaling context
- * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param dest pointer to the output plane. For 16bit output, this is
+ * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param dest pointer to the output plane. For 16-bit output, this is
* uint16_t
* @param dstW width of lumSrc and alpSrc in pixels, number of pixels
* to write into dest[]
@@ -180,15 +180,15 @@ typedef void (*yuv2packed1_fn)(struct SwsContext *c, const int16_t *lumSrc,
* output by doing bilinear scaling between two input lines.
*
* @param c SWS scaling context
- * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param dest pointer to the output plane. For 16bit output, this is
+ * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param dest pointer to the output plane. For 16-bit output, this is
* uint16_t
* @param dstW width of lumSrc and alpSrc in pixels, number of pixels
* to write into dest[]
@@ -214,19 +214,19 @@ typedef void (*yuv2packed2_fn)(struct SwsContext *c, const int16_t *lumSrc[2],
* output by doing multi-point vertical scaling between input pixels.
*
* @param c SWS scaling context
- * @param lumFilter vertical luma/alpha scaling coefficients, 12bit [0,4096]
- * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
+ * @param lumFilter vertical luma/alpha scaling coefficients, 12 bits [0,4096]
+ * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
* @param lumFilterSize number of vertical luma/alpha input lines to scale
- * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096]
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
+ * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096]
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
* @param chrFilterSize number of vertical chroma input lines to scale
- * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param dest pointer to the output plane. For 16bit output, this is
+ * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param dest pointer to the output plane. For 16-bit output, this is
* uint16_t
* @param dstW width of lumSrc and alpSrc in pixels, number of pixels
* to write into dest[]
@@ -248,19 +248,19 @@ typedef void (*yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter,
* output by doing multi-point vertical scaling between input pixels.
*
* @param c SWS scaling context
- * @param lumFilter vertical luma/alpha scaling coefficients, 12bit [0,4096]
- * @param lumSrc scaled luma (Y) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
+ * @param lumFilter vertical luma/alpha scaling coefficients, 12 bits [0,4096]
+ * @param lumSrc scaled luma (Y) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
* @param lumFilterSize number of vertical luma/alpha input lines to scale
- * @param chrFilter vertical chroma scaling coefficients, 12bit [0,4096]
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
+ * @param chrFilter vertical chroma scaling coefficients, 12 bits [0,4096]
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
* @param chrFilterSize number of vertical chroma input lines to scale
- * @param alpSrc scaled alpha (A) source data, 15bit for 8-10bit output,
- * 19-bit for 16bit output (in int32_t)
- * @param dest pointer to the output planes. For 16bit output, this is
+ * @param alpSrc scaled alpha (A) source data, 15 bits for 8-10-bit output,
+ * 19 bits for 16-bit output (in int32_t)
+ * @param dest pointer to the output planes. For 16-bit output, this is
* uint16_t
* @param dstW width of lumSrc and alpSrc in pixels, number of pixels
* to write into dest[]
@@ -554,7 +554,7 @@ typedef struct SwsContext {
* Scale one horizontal line of input data using a bilinear filter
* to produce one line of output data. Compared to SwsContext->hScale(),
* please take note of the following caveats when using these:
- * - Scaling is done using only 7bit instead of 14bit coefficients.
+ * - Scaling is done using only 7 bits instead of 14-bit coefficients.
* - You can use no more than 5 input pixels to produce 4 output
* pixels. Therefore, this filter should not be used for downscaling
* by more than ~20% in width (because that equals more than 5/4th
@@ -585,15 +585,15 @@ typedef struct SwsContext {
* @param dst pointer to destination buffer for horizontally scaled
* data. If the number of bits per component of one
* destination pixel (SwsContext->dstBpc) is <= 10, data
- * will be 15bpc in 16bits (int16_t) width. Else (i.e.
+ * will be 15 bpc in 16 bits (int16_t) width. Else (i.e.
* SwsContext->dstBpc == 16), data will be 19bpc in
- * 32bits (int32_t) width.
+ * 32 bits (int32_t) width.
* @param dstW width of destination image
* @param src pointer to source data to be scaled. If the number of
* bits per component of a source pixel (SwsContext->srcBpc)
- * is 8, this is 8bpc in 8bits (uint8_t) width. Else
+ * is 8, this is 8bpc in 8 bits (uint8_t) width. Else
* (i.e. SwsContext->dstBpc > 8), this is native depth
- * in 16bits (uint16_t) width. In other words, for 9-bit
+ * in 16 bits (uint16_t) width. In other words, for 9-bit
* YUV input, this is 9bpc, for 10-bit YUV input, this is
* 10bpc, and for 16-bit RGB or YUV, this is 16bpc.
* @param filter filter coefficients to be used per output pixel for
diff --git a/libswscale/x86/output.asm b/libswscale/x86/output.asm
index 133817cb71..db3e9934f8 100644
--- a/libswscale/x86/output.asm
+++ b/libswscale/x86/output.asm
@@ -50,17 +50,17 @@ SECTION .text
; const uint8_t *dither, int offset)
;
; Scale one or $filterSize lines of source data to generate one line of output
-; data. The input is 15-bit in int16_t if $output_size is [8,10] and 19-bit in
-; int32_t if $output_size is 16. $filter is 12-bits. $filterSize is a multiple
+; data. The input is 15 bits in int16_t if $output_size is [8,10] and 19 bits in
+; int32_t if $output_size is 16. $filter is 12 bits. $filterSize is a multiple
; of 2. $offset is either 0 or 3. $dither holds 8 values.
;-----------------------------------------------------------------------------
%macro yuv2planeX_mainloop 2
.pixelloop_%2:
%assign %%i 0
- ; the rep here is for the 8bit output mmx case, where dither covers
+ ; the rep here is for the 8-bit output MMX case, where dither covers
; 8 pixels but we can only handle 2 pixels per register, and thus 4
; pixels per iteration. In order to not have to keep track of where
- ; we are w.r.t. dithering, we unroll the mmx/8bit loop x2.
+ ; we are w.r.t. dithering, we unroll the MMX/8-bit loop x2.
%if %1 == 8
%assign %%repcnt 16/mmsize
%else
diff --git a/libswscale/x86/scale.asm b/libswscale/x86/scale.asm
index 7af92f7f52..f9781703a9 100644
--- a/libswscale/x86/scale.asm
+++ b/libswscale/x86/scale.asm
@@ -39,10 +39,10 @@ SECTION .text
; const int16_t *filter,
; const int32_t *filterPos, int filterSize);
;
-; Scale one horizontal line. Input is either 8-bits width or 16-bits width
+; Scale one horizontal line. Input is either 8-bit width or 16-bit width
; ($source_width can be either 8, 9, 10 or 16, difference is whether we have to
-; downscale before multiplying). Filter is 14-bits. Output is either 15bits
-; (in int16_t) or 19bits (in int32_t), as given in $intermediate_nbits. Each
+; downscale before multiplying). Filter is 14 bits. Output is either 15 bits
+; (in int16_t) or 19 bits (in int32_t), as given in $intermediate_nbits. Each
; output pixel is generated from $filterSize input pixels, the position of
; the first pixel is given in filterPos[nOutputPixel].
;-----------------------------------------------------------------------------