[x264-devel] Fix incorrect chroma swap for some input pixfmts
Anton Mitrofanov
git at videolan.org
Sat Jul 23 02:38:51 CEST 2011
x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Wed Jul 13 15:55:38 2011 +0400| [4bc22b042f90df62452b3056f8cd6d7066572e4f] | committer: Jason Garrett-Glaser
Fix incorrect chroma swap for some input pixfmts
Problem occurred if pixfmt of lavf/ffms input was PIX_FMT_RGB24 or PIX_FMT_YUV444P.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=4bc22b042f90df62452b3056f8cd6d7066572e4f
---
filters/video/resize.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/filters/video/resize.c b/filters/video/resize.c
index cc51cd8..1917f67 100644
--- a/filters/video/resize.c
+++ b/filters/video/resize.c
@@ -465,8 +465,8 @@ static int init( hnd_t *handle, cli_vid_filter_t *filter, video_info_t *info, x2
h->scale = h->dst;
/* swap chroma planes if YV12/YV24 is involved, as libswscale works with I420/I444 */
- int src_csp = info->csp & X264_CSP_MASK;
- int dst_csp = h->dst_csp & X264_CSP_MASK;
+ int src_csp = info->csp & (X264_CSP_MASK | X264_CSP_OTHER);
+ int dst_csp = h->dst_csp & (X264_CSP_MASK | X264_CSP_OTHER);
h->pre_swap_chroma = src_csp == X264_CSP_YV12 || src_csp == X264_CSP_YV24;
h->post_swap_chroma = dst_csp == X264_CSP_YV12 || dst_csp == X264_CSP_YV24;
More information about the x264-devel
mailing list