[vlc-commits] opengl: remove useless pixel_pitch argument
Thomas Guillem
git at videolan.org
Wed Apr 18 16:17:38 CEST 2018
vlc/vlc-3.0 | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Apr 18 15:03:10 2018 +0200| [9d405d350853405593c9d1dfceb9fd1729423539] | committer: Thomas Guillem
opengl: remove useless pixel_pitch argument
And fix buf_size calculation.
(cherry picked from commit 50fd109b1072ced708b141c98e01ea6ba974a22c)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=9d405d350853405593c9d1dfceb9fd1729423539
---
modules/video_output/opengl/converter_sw.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/modules/video_output/opengl/converter_sw.c b/modules/video_output/opengl/converter_sw.c
index 49b41f4826..977fe8a48f 100644
--- a/modules/video_output/opengl/converter_sw.c
+++ b/modules/video_output/opengl/converter_sw.c
@@ -441,8 +441,7 @@ tc_common_allocate_textures(const opengl_tex_converter_t *tc, GLuint *textures,
static int
upload_plane(const opengl_tex_converter_t *tc, unsigned tex_idx,
GLsizei width, GLsizei height,
- unsigned pitch, unsigned visible_pitch, unsigned pixel_pitch,
- const void *pixels)
+ unsigned pitch, unsigned visible_pitch, const void *pixels)
{
struct priv *priv = tc->priv;
GLenum tex_format = tc->texs[tex_idx].format;
@@ -455,7 +454,7 @@ upload_plane(const opengl_tex_converter_t *tc, unsigned tex_idx,
{
if (pitch != visible_pitch)
{
- size_t buf_size = visible_pitch * pixel_pitch * height;
+ size_t buf_size = visible_pitch * height;
const uint8_t *source = pixels;
uint8_t *destination;
if (priv->texture_temp_buf_size < buf_size)
@@ -512,8 +511,7 @@ tc_common_update(const opengl_tex_converter_t *tc, GLuint *textures,
pic->p[i].p_pixels;
ret = upload_plane(tc, i, tex_width[i], tex_height[i],
- pic->p[i].i_pitch, pic->p[i].i_visible_pitch,
- pic->p[i].i_pixel_pitch, pixels);
+ pic->p[i].i_pitch, pic->p[i].i_visible_pitch, pixels);
}
return ret;
}
More information about the vlc-commits
mailing list