summaryrefslogtreecommitdiff
path: root/libavfilter/vf_drawtext.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-08 01:05:28 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-08 01:05:28 +0200
commit5d1b39f7e7381a2e837b9b6d43dede7de528da3c (patch)
tree5d0f96c4324c637d436e1aaf2f45aee1eb9f99b6 /libavfilter/vf_drawtext.c
parentebd1edf36c81155e2817edaa056b0bc9eb21e8f5 (diff)
parent2f138f0b7c36fe50b51e0d74bc913d14aea00c5e (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: build: clean up library installation rules vf_drawtext: Remove some write-only variables. libgsm: Drop const qualifier to silence compiler warning. docs: Remove needless configure options docs: Don't recommend adding --enable-memalign-hack libvo-amrwbenc: Add braces to shut up gcc warning. adts: Fix PCE copying. Conflicts: configure doc/general.texi subdir.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/vf_drawtext.c')
-rw-r--r--libavfilter/vf_drawtext.c17
1 files changed, 2 insertions, 15 deletions
diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c
index f495f68424..7d8372b886 100644
--- a/libavfilter/vf_drawtext.c
+++ b/libavfilter/vf_drawtext.c
@@ -424,15 +424,10 @@ static inline int draw_glyph_yuv(AVFilterBufferRef *picref, FT_Bitmap *bitmap, u
{
int r, c, alpha;
unsigned int luma_pos, chroma_pos1, chroma_pos2;
- uint8_t src_val, dst_pixel[4];
+ uint8_t src_val;
for (r = 0; r < bitmap->rows && r+y < height; r++) {
for (c = 0; c < bitmap->width && c+x < width; c++) {
- /* get pixel in the picref (destination) */
- dst_pixel[0] = picref->data[0][ c+x + (y+r) * picref->linesize[0]];
- dst_pixel[1] = picref->data[1][((c+x) >> hsub) + ((y+r) >> vsub) * picref->linesize[1]];
- dst_pixel[2] = picref->data[2][((c+x) >> hsub) + ((y+r) >> vsub) * picref->linesize[2]];
-
/* get intensity value in the glyph bitmap (source) */
src_val = GET_BITMAP_VAL(r, c);
if (!src_val)
@@ -460,18 +455,10 @@ static inline int draw_glyph_rgb(AVFilterBufferRef *picref, FT_Bitmap *bitmap,
{
int r, c, alpha;
uint8_t *p;
- uint8_t src_val, dst_pixel[4];
+ uint8_t src_val;
for (r = 0; r < bitmap->rows && r+y < height; r++) {
for (c = 0; c < bitmap->width && c+x < width; c++) {
- /* get pixel in the picref (destination) */
- dst_pixel[0] = picref->data[0][(c+x + rgba_map[0]) * pixel_step +
- (y+r) * picref->linesize[0]];
- dst_pixel[1] = picref->data[0][(c+x + rgba_map[1]) * pixel_step +
- (y+r) * picref->linesize[0]];
- dst_pixel[2] = picref->data[0][(c+x + rgba_map[2]) * pixel_step +
- (y+r) * picref->linesize[0]];
-
/* get intensity value in the glyph bitmap (source) */
src_val = GET_BITMAP_VAL(r, c);
if (!src_val)