[x264-devel] Fix RGB colorspace input

Anton Mitrofanov git at videolan.org
Wed Mar 7 03:20:12 CET 2012


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Tue Mar  6 17:34:02 2012 +0400| [ec41b19edc67ee4eca09c0e3b37e6290844c5e1f] | committer: Jason Garrett-Glaser

Fix RGB colorspace input
BGR/BGRA input was correct.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=ec41b19edc67ee4eca09c0e3b37e6290844c5e1f
---

 common/frame.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/frame.c b/common/frame.c
index 46f5514..3e7cca1 100644
--- a/common/frame.c
+++ b/common/frame.c
@@ -366,9 +366,9 @@ int x264_frame_copy_picture( x264_t *h, x264_frame_t *dst, x264_picture_t *src )
              pix[0] += (h->param.i_height-1) * stride[0];
              stride[0] = -stride[0];
          }
-         int b = i_csp==X264_CSP_RGB ? 2 : 0;
-         h->mc.plane_copy_deinterleave_rgb( dst->plane[1], dst->i_stride[1],
-                                            dst->plane[b], dst->i_stride[b],
+         int b = i_csp==X264_CSP_RGB;
+         h->mc.plane_copy_deinterleave_rgb( dst->plane[1+b], dst->i_stride[1+b],
+                                            dst->plane[0], dst->i_stride[0],
                                             dst->plane[2-b], dst->i_stride[2-b],
                                             (pixel*)pix[0], stride[0]/sizeof(pixel), i_csp==X264_CSP_BGRA ? 4 : 3, h->param.i_width, h->param.i_height );
     }



More information about the x264-devel mailing list