]> git.sesse.net Git - ffmpeg/blobdiff - libavdevice/opengl_enc.c
Merge commit 'd555bd69e792e42d94bd909b30d9bfef01db4e25'
[ffmpeg] / libavdevice / opengl_enc.c
index 434ae97a42b25d0c22892b56525400c780a8f1b6..851b94735d25930547d4da1296bd3c0e71b32262 100644 (file)
@@ -733,8 +733,8 @@ static av_cold void opengl_fill_color_map(OpenGLContext *opengl)
         return;
 
 #define FILL_COMPONENT(i) { \
-        shift = desc->comp[i].depth_minus1 >> 3; \
-        opengl->color_map[(i << 2) + ((desc->comp[i].offset_plus1 - 1) >> shift)] = 1.0; \
+        shift = (desc->comp[i].depth - 1) >> 3; \
+        opengl->color_map[(i << 2) + (desc->comp[i].offset >> shift)] = 1.0; \
     }
 
     memset(opengl->color_map, 0, sizeof(opengl->color_map));