History

lavfi/drawutils: set subsampling for rgb too

Otherwise it is incorrectly set to 1.

Paul B Mahol committed 13 years ago

Commit d5598c01 parent ed448ef1 file · +2 −4Browse files

Showing the changes to libavfilter/drawutils.c (1 of 1 file). Show all

Unified · Split

libavfilter/drawutils.c+2−4
@@ -180,10 +180,8 @@ int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) · 179 unmodified lines
180 draw->format = format;180 draw->format = format;
181 draw->nb_planes = nb_planes;181 draw->nb_planes = nb_planes;
182 memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep));182 memcpy(draw->pixelstep, pixelstep, sizeof(draw->pixelstep));
183 if (nb_planes >= 3 && !(desc->flags & AV_PIX_FMT_FLAG_RGB)) {183 draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w;
184 draw->hsub[1] = draw->hsub[2] = draw->hsub_max = desc->log2_chroma_w;184 draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
185 draw->vsub[1] = draw->vsub[2] = draw->vsub_max = desc->log2_chroma_h;
186 }
187 for (i = 0; i < ((desc->nb_components - 1) | 1); i++)185 for (i = 0; i < ((desc->nb_components - 1) | 1); i++)
188 draw->comp_mask[desc->comp[i].plane] |=186 draw->comp_mask[desc->comp[i].plane] |=
189 1 << (desc->comp[i].offset_plus1 - 1);187 1 << (desc->comp[i].offset_plus1 - 1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t