[mythtv] CrystalHD in Trunk
Mark Kendall
mark.kendall at gmail.com
Tue Sep 28 01:50:58 UTC 2010
On 28 September 2010 08:25, Doug Haber <doug at fawnanddoug.com> wrote:
>
> The below log should have two 1080 shows, and one 720.
>
> See log here: http://www.fawnanddoug.com/data/myth/crystalhd2.log
Doug
Can you see if this patch works? If you still get some strange
colours, try swapping the 1 and 2 around in the src[1].. src[2] lines.
I'm also just in the process of uploading a ciip for you to test -
will pm you when it's ready.
thanks again
Mark
Index: /home/mark/trunk2/mythtv/libs/libmythtv/privatedecoder_crystalhd.cpp
===================================================================
--- /home/mark/trunk2/mythtv/libs/libmythtv/privatedecoder_crystalhd.cpp (revision
26558)
+++ /home/mark/trunk2/mythtv/libs/libmythtv/privatedecoder_crystalhd.cpp (working
copy)
@@ -614,7 +614,7 @@
int out_width = (in_width + 15) & (~0xf);
int out_height = in_height;
int size = ((out_width * (out_height + 1)) * 3) / 2;
- uint8_t* src = out->Ybuff;
+ uint8_t* src[3] = { out->Ybuff, NULL, NULL };
if (!m_frame)
{
@@ -640,10 +640,17 @@
PixelFormat out_fmt = PIX_FMT_YUV420P;
PixelFormat in_fmt = bcmpixfmt_to_pixfmt(m_pix_fmt);
+
+ if (in_fmt == PIX_FMT_YUV420P)
+ {
+ src[1] = out->UVbuff;
+ src[2] = out->UVbuff + (out->UVbuffSz >> 1);
+ }
+
AVPicture img_in, img_out;
avpicture_fill(&img_out, (uint8_t *)m_frame->buf, out_fmt,
out_width, out_height);
- avpicture_fill(&img_in, src, in_fmt,
+ avpicture_fill(&img_in, src[0], in_fmt,
in_width, in_height);
if (!(out->PicInfo.flags & VDEC_FLAG_INTERLACED_SRC))
More information about the mythtv-dev
mailing list