public void ShowMacroblock(Macroblock mb) { lock (this) { if ((m_Mb != mb) && mb != null) { m_Mb = mb; Int32[] bits4x4; UInt32 YCount = 0, UCount = 0, VCount = 0; m_DataSourceY.Clear(); m_DataSourceU.Clear(); m_DataSourceV.Clear(); m_TextBlockMacroblockInfo.Text = String.Format("{0} / MB {1}({2}, {3}) / Slice:{4} / Picture:{5} / Layer:{6}", m_Title, mb.Mb.Address, mb.Mb.X << 4, mb.Mb.Y << 4, mb.SliceId, mb.PictureId, mb.LayerId); for (uint y = 0; y < 4; y++) { MbBits4x4Row rowY = new MbBits4x4Row(); MbBits4x4Row rowU = new MbBits4x4Row(); MbBits4x4Row rowV = new MbBits4x4Row(); for (uint x = 0; x < 4; x++) { // Y bits4x4 = m_Mb.Mb.GetMbBits4x4(CommonYuvLine_t.CommonYuvLine_Y, m_DataType, x, y); if (bits4x4 != null) { rowY.Add(new MbBits4x4(YCount++, x, y, bits4x4)); } // U bits4x4 = m_Mb.Mb.GetMbBits4x4(CommonYuvLine_t.CommonYuvLine_U, m_DataType, x, y); if (bits4x4 != null) { rowU.Add(new MbBits4x4(UCount++, x, y, bits4x4)); } // V bits4x4 = m_Mb.Mb.GetMbBits4x4(CommonYuvLine_t.CommonYuvLine_V, m_DataType, x, y); if (bits4x4 != null) { rowV.Add(new MbBits4x4(VCount++, x, y, bits4x4)); } } if (rowY.Row.Count > 0) { m_DataSourceY.Add(rowY); } if (rowU.Row.Count > 0) { m_DataSourceU.Add(rowU); } if (rowV.Row.Count > 0) { m_DataSourceV.Add(rowV); } } } } }