<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Hi <span><span>Carl</span>,</span></span></div><div><span><span></span></span> </div><div><span><span>Thanks for your help, and now I fixed my issue!</span></span></div><div><span><span></span></span> </div><div><span><span>You are right, my issue is with upsampling the 4:2:0 mpeg video to 4:2:2 feeding the decklink card. I read the article and found an upsampling filter to convert  chroma format from 4:2:0 to 4:2:2. The upsampling filter can handle two types of frame, it is progressive and interlaced. Previous I used a ffmpeg function sws_scale to convert the chroma format, it has this issue, and it is the same issue when I convert the chroma format using this upsampling filter by assuming the frame is progressive. But things changed when I assume the frame is interlaced, it is difficult to see
 horizontal lines on the red color. I think ffmpeg treated a frame as a progressive frame when doing the chroma upsampling using sws_scale in my video player.<br></span></div></span><div>Thanks,</div><div>Nuo</div>  <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> </div><div dir="ltr"><div style="margin: 5px 0px; padding: 0px; border: 1px solid rgb(204, 204, 204); height: 0px; line-height: 0; font-size: 0px;" class="hr" contentEditable="false" readonly="true"></div></div><div dir="ltr"><font size="2" face="Arial"><span style="font-weight: bold;"><span><font size="3" face="Times New Roman"></font>From:</span></span> nuo yang <yangnuo0408@yahoo.com.cn><br><b><span style="font-weight: bold;">To:</span></b> "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter."
 <libav-user@ffmpeg.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> 2013-5-7</font></div><div dir="ltr"><font size="2" face="Arial"><b><span style="font-weight: bold;">Subject:</span></b>  Re: [Libav-user] <span id="yiv1325262946misspell-7" class="yiv1325262946mark">MPEG</span>-2 <span id="yiv1325262946misspell-8" class="yiv1325262946mark">NTSC</span> video shows horizontal lines on the red <span id="yiv1325262946misspell-9" class="yiv1325262946mark">color</span><br> </font> </div> <div class="y_msg_container"><br><div id="yiv1325262946"><div><div style="color: rgb(0, 0, 0); font-family: times new roman, new york, times, serif; font-size: 12pt; background-color: rgb(255, 255, 255);"><div><span style='font-family: "times new roman", "new york", times, serif;'>Thank you, <span>Carl </span>!</span></div><div style="background-color: transparent;"><span style='font-family: "times new roman", "new york", times,
 serif;'><br></span></div><div style="background-color: transparent;"><span style='font-family: "times new roman", "new york", times, serif;'>I will read the <span id="yiv1325262946misspell-0" class="yiv1325262946">article </span><span>and have a try, will update you later.</span></span></div><div style='font-family: "times new roman", "new york", times, serif; font-size: 12pt;'><br></div><div style='font-family: "times new roman", "new york", times, serif; font-size: 12pt;' class="yiv1325262946yui_3_7_2_4_1367921404409_52"><div style="font-size: 12pt;" class="yiv1325262946yui_3_7_2_4_1367921404409_56"><div dir="ltr"><div style="margin: 5px 0px; padding: 0px; border: 1px solid rgb(204, 204, 204); height: 0px; line-height: 0; font-size: 0px;" class="hr" contentEditable="false" readonly="true"></div><font size="2" face="Arial"><b><span>From:</span></b> Carl <span id="yiv1325262946misspell-0" class="yiv1325262946mark">Lindqvist</span>
 <lulebo@gmail.com><br><b>To:</b> "This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter." <libav-user@ffmpeg.org> <br><b>Sent: </b>2013-5-6</font></div><div dir="ltr"><font size="2" face="Arial"><b>Subject: </b>Re: [Libav-user] <span id="yiv1325262946misspell-7" class="yiv1325262946mark">MPEG</span>-2 <span id="yiv1325262946misspell-8" class="yiv1325262946mark">NTSC</span> video shows horizontal lines on the red <span id="yiv1325262946misspell-9" class="yiv1325262946mark">color</span></font></div></div></div><div style='font-family: "times new roman", "new york", times, serif; font-size: 12pt;'><div style='font-family: "times new roman", "new york", times, serif; font-size: 12pt;'><div dir="ltr"> </div> <div class="yiv1325262946y_msg_container"><br>Here is an article describing what is probably happening in your app,<br>and will hopefully give you some idea what you
 need to correct:<br><a href="http://web.archive.org/web/20060719025947/http://www.hometheaterhifi.com/volume_8_2/dvd-benchmark-special-report-chroma-bug-4-2001.html" rel="nofollow" target="_blank">http://web.archive.org/web/20060719025947/http://www.hometheaterhifi.com/volume_8_2/dvd-benchmark-special-report-chroma-bug-4-2001.html</a><br><br>2013/5/6 Carl <span id="yiv1325262946misspell-10" class="yiv1325262946mark">Lindqvist</span> <<a href="mailto:lulebo@gmail.com" rel="nofollow" target="_blank" ymailto="mailto:lulebo@gmail.com">lulebo@gmail.com</a>>:<br>> I suspect your issue is with <span id="yiv1325262946misspell-11" class="yiv1325262946mark">resampling</span> the 4:2:0 <span id="yiv1325262946misspell-12" class="yiv1325262946mark">mpeg</span> video to 4:2:2<br>> feeding the <span id="yiv1325262946misspell-13" class="yiv1325262946mark">decklink</span> card.<br>><br>> As 4:2:0 in interlaced is often poorly done or misunderstood,
 this is<br>> often an issue. And since we are pretty bad at noticing errors in<br>> <span id="yiv1325262946misspell-14" class="yiv1325262946mark">color</span>, it will only
 be obvious in very saturated <span id="yiv1325262946misspell-15" class="yiv1325262946mark">colors</span>.<br>><br>> How do you handle the conversion now? Make sure you really specify<br>> that you are handling an interlaced source, since 4:2:0 is very<br>> different in interlaced vs progressive.<br>><br>> 2013/4/28 nuo yang <<a href="mailto:yangnuo0408@yahoo.com.cn" rel="nofollow" target="_blank" ymailto="mailto:yangnuo0408@yahoo.com.cn">yangnuo0408@yahoo.com.cn</a>>:<br>>> Hi everyone,<br>>><br>>> Recently I use ffmpeg <span id="yiv1325262946misspell-18" class="yiv1325262946mark">sdk</span> to develop my own player, my video source is<br>>> <span id="yiv1325262946misspell-19" class="yiv1325262946mark">MPEG</span>-2 <span id="yiv1325262946misspell-20" class="yiv1325262946mark">NTSC</span> video, and I use ffmpeg <span id="yiv1325262946misspell-22" class="yiv1325262946mark">sdk</span> to decode the video,
 then use<br>>> <span id="yiv1325262946misspell-23" class="yiv1325262946mark">BlackMagic</span> <span id="yiv1325262946misspell-24" class="yiv1325262946mark">DeckLink</span> <span id="yiv1325262946misspell-25" class="yiv1325262946mark">sdk</span> to receive the video frame and display the video to<br>>> my CRT monitor through a <span id="yiv1325262946misspell-26" class="yiv1325262946mark">DeckLink</span> <span id="yiv1325262946misspell-27" class="yiv1325262946mark">PCI</span> card. Everything is okay but a little<br>>> defect, when the video contains some red <span id="yiv1325262946misspell-28" class="yiv1325262946mark">color</span> objects (like red clothes),<br>>> and if the red <span id="yiv1325262946misspell-29" class="yiv1325262946mark">color</span> objects moving fast, there are some horizontal lines on<br>>> red <span id="yiv1325262946misspell-30" class="yiv1325262946mark">color</span>. My video is interlaced, and I
 tried some methods, including<br>>> change the video field order, but I didn't make it. BTW, if I use <span id="yiv1325262946misspell-31" class="yiv1325262946mark">ffdshow</span> to<br>>> decode the video, it does not have the issue.<br>>><br>>> Is there someone has the same issue like me, or can someone give me some<br>>> advice? Many thanks in
 advance!<br>>><br>>><br>>> - Nuo<br>>><br>>> _______________________________________________<br>>> Libav-user mailing list<br>>> <a href="mailto:Libav-user@ffmpeg.org" rel="nofollow" target="_blank" ymailto="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>>> <a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="nofollow" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>>><br>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org" rel="nofollow" target="_blank" ymailto="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br><a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="nofollow" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br><br><br></div> </div> </div>  </div></div></div><br>_______________________________________________<br>Libav-user mailing list<br><a
 href="mailto:Libav-user@ffmpeg.org" ymailto="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br><a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br><br><br></div> </div> </div>  </div></body></html>