[mythtvnz] NZ DVB-T Patch for Mythtv
Greg Brackley
lists-mythtv-nz at lucidsolutions.co.nz
Tue Apr 15 10:46:17 BST 2008
----- Original Message -----
From: "Craig Whitmore" <lennon at orcon.net.nz>
> There are many options in how DVB-T (and S) are broadcast. If freeview
> change what they are using alot of ppl's STB's will stop working so I
> don't think they will change them for a long time
Sure, but I'm not buying one of those. I would prefer to be involved with
something that was robust enough to cope with change. I suspect that there
will be all sorts of interesting 'stuff' in some products.
> What does the RSM specify? the Channel only or the bandwidth 8K and then
> the broadcasters can choose any other options they want?
Yes, the frequency bands, and the channel sizes, and the licenses. I'm not
sure if they specify the allowable modulations (down to the type of QAM).
I'm sure there must be a lurker on this list that knows a whole heap more
than me on this.
> There are no other DVB-T broadcasters in NZ at the moment but if they
> are a new table (in addition to the existing one) can be added.
No, not really. This is one of my points, the tables are for each band in
the regulatory domain. If you look at the existing tables [1], none of them
overlap in frequency.
> If a signal is not good I've seen mythtv pick some quite random and
> wrong values when choosing auto so better to use known good values for
> reliability.
Yes, this could be a problem. I would expect this to be the worst when in
fringe reception areas. In fringe areas there are likely to be lots of other
issues as well.
> If you look at some countries they have more than 1 table .
As above; for the different bands.
While having a look, I noticed the 'name_format' and 'name_offset' fields in
the table aren't populated. These seem to be used in SIScan::ScanTransports.
Would setting the vales to "DVB-T Channel %1" and 21 make the UI look any
better while scanning?
e.g.
// New Zealand
fmap["dvbt_ofdm_nz0"] = new FrequencyTable(
474000000, 858000000, 8000000, "DVB-T Channel %1", 21,
DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth8MHz, DTVCodeRate::kFEC_3_4,
DTVCodeRate::kFEC_3_4, DTVModulation::kModulationQAM64,
DTVTransmitMode::kTransmissionMode8K,
DTVGuardInterval::kGuardInterval_1_16, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAM64, 0 , 0); // UHF 21-69
Greg
--
[1] the tables
static void init_freq_tables(freq_table_map_t &fmap)
{
// United Kingdom
fmap["dvbt_ofdm_uk0"] = new FrequencyTable(
474000000, 850000000, 8000000, "" , 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth8MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAMAuto,
DTVTransmitMode::kTransmissionMode2K,
DTVGuardInterval::kGuardInterval_1_32, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 166670, -166670);
// Finland
fmap["dvbt_ofdm_fi0"] = new FrequencyTable(
474000000, 850000000, 8000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth8MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAM64,
DTVTransmitMode::kTransmissionModeAuto,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 0, 0);
// Sweden
fmap["dvbt_ofdm_se0"] = new FrequencyTable(
474000000, 850000000, 8000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth8MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAM64,
DTVTransmitMode::kTransmissionModeAuto,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 0, 0);
// Australia
fmap["dvbt_ofdm_au0"] = new FrequencyTable(
177500000, 226500000, 7000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth7MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAM64,
DTVTransmitMode::kTransmissionMode8K,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 125000, 0); // VHF 6-12
fmap["dvbt_ofdm_au1"] = new FrequencyTable(
529500000, 816500000, 7000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth7MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAM64,
DTVTransmitMode::kTransmissionMode8K,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 125000, 0); // UHF 28-69
// Germany (Deuschland)
fmap["dvbt_ofdm_de0"] = new FrequencyTable(
177500000, 226500000, 7000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth7MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAMAuto,
DTVTransmitMode::kTransmissionMode8K,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 125000, 0); // VHF 6-12
fmap["dvbt_ofdm_de1"] = new FrequencyTable(
474000000, 826000000, 8000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth8MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAMAuto,
DTVTransmitMode::kTransmissionModeAuto,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 125000, 0); // UHF 21-65
// Spain
fmap["dvbt_ofdm_es0"] = new FrequencyTable(
474000000, 858000000, 8000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth8MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAMAuto,
DTVTransmitMode::kTransmissionModeAuto,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAMAuto, 125000, 0); // UHF 21-69
// New Zealand
fmap["dvbt_ofdm_nz0"] = new FrequencyTable(
474000000, 858000000, 8000000, "", 0, DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth8MHz, DTVCodeRate::kFEC_3_4,
DTVCodeRate::kFEC_3_4, DTVModulation::kModulationQAM64,
DTVTransmitMode::kTransmissionMode8K,
DTVGuardInterval::kGuardInterval_1_16, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulationQAM64, 0 , 0); // UHF 21-69
//#define DEBUG_DVB_OFFSETS
#ifdef DEBUG_DVB_OFFSETS
// UHF 14-69
fmap["atsc_vsb8_us0"] = new FrequencyTable(
533000000, 803000000, 6000000, "xATSC Channel %1", 24,
DTVInversion::kInversionOff,
DTVBandwidth::kBandwidth7MHz, DTVCodeRate::kFECAuto,
DTVCodeRate::kFECAuto, DTVModulation::kModulationQAMAuto,
DTVTransmitMode::kTransmissionMode8K,
DTVGuardInterval::kGuardIntervalAuto, DTVHierarchy::kHierarchyNone,
DTVModulation::kModulation8VSB, -100000, 100000);
#else // if !DEBUG_DVB_OFFSETS
// USA Terrestrial (center frequency, subtract 1.75 MHz for visual
carrier)
// VHF 2-4
fmap["atsc_vsb8_us0"] = new FrequencyTable(
"ATSC Channel %1", 2, 57000000, 69000000, 6000000,
DTVModulation::kModulation8VSB);
// VHF 5-6
fmap["atsc_vsb8_us1"] = new FrequencyTable(
"ATSC Channel %1", 5, 79000000, 85000000, 6000000,
DTVModulation::kModulation8VSB);
// VHF 7-13
fmap["atsc_vsb8_us2"] = new FrequencyTable(
"ATSC Channel %1", 7, 177000000, 213000000, 6000000,
DTVModulation::kModulation8VSB);
// UHF 14-69
fmap["atsc_vsb8_us3"] = new FrequencyTable(
"ATSC Channel %1", 14, 473000000, 803000000, 6000000,
DTVModulation::kModulation8VSB);
// UHF 70-83
fmap["atsc_vsb8_us4"] = new FrequencyTable(
"ATSC Channel %1", 70, 809000000, 887000000, 6000000,
DTVModulation::kModulation8VSB);
#endif // !DEBUG_DVB_OFFSETS
QString modStr[] = { "vsb8", "qam256", "qam128", "qam64", };
uint mod[] = { DTVModulation::kModulation8VSB,
DTVModulation::kModulationQAM256,
DTVModulation::kModulationQAM128,
DTVModulation::kModulationQAM64, };
QString desc[] = { "ATSC ", "QAM-256 ", "QAM-128 ", "QAM-64 ", };
#define FREQ(A,B, C,D, E,F,G, H, I) \
fmap[QString("atsc_%1_us%2").arg(A).arg(B)] = \
new FrequencyTable(C+D, E, F, G, H, I);
// The maximum channel defined in the US frequency tables (standard, HRC,
IRC)
#define US_MAX_CHAN 159
// Equation for computing EIA-542 frequency of channels > 99
// A = bandwidth, B = offset, C = channel designation (number)
#define EIA_542_FREQUENCY(A,B,C) ( ( A * ( 8 + C ) ) + B )
for (uint i = 0; i < 4; i++)
{
// USA Cable, ch 2 to US_MAX_CHAN and T.7 to T.14
FREQ(modStr[i], "cable0", desc[i], "Channel %1",
2, 57000000, 69000000, 6000000, mod[i]); // 2-4
FREQ(modStr[i], "cable1", desc[i], "Channel %1",
5, 79000000, 85000000, 6000000, mod[i]); // 5-6
FREQ(modStr[i], "cable2", desc[i], "Channel %1",
7, 177000000, 213000000, 6000000, mod[i]); // 7-13
FREQ(modStr[i], "cable3", desc[i], "Channel %1",
14, 123000000, 171000000, 6000000, mod[i]); // 14-22
FREQ(modStr[i], "cable4", desc[i], "Channel %1",
23, 219000000, 645000000, 6000000, mod[i]); // 23-94
FREQ(modStr[i], "cable5", desc[i], "Channel %1",
95, 93000000, 117000000, 6000000, mod[i]); // 95-99
// The center frequency of any EIA-542 std cable channel over 99 is
// Frequency_MHz = ( 6 * ( 8 + channel_designation ) ) + 3
FREQ(modStr[i], "cable6", desc[i], "Channel %1",
100, 651000000,
EIA_542_FREQUENCY(6000000, 3000000, US_MAX_CHAN),
6000000, mod[i]); //
100-US_MAX_CHAN
FREQ(modStr[i], "cable7", desc[i], "Channel T-%1",
7, 8750000, 50750000, 6000000, mod[i]); // T7-14
// USA Cable, QAM 256 ch 78 to US_MAX_CHAN
FREQ(modStr[i], "cablehigh0", desc[i], "Channel %1",
78, 549000000, 645000000, 6000000, mod[i]); // 78-94
FREQ(modStr[i], "cablehigh1", desc[i], "Channel %1",
100, 651000000,
EIA_542_FREQUENCY(6000000, 3000000, US_MAX_CHAN),
6000000, mod[i]); //
100-US_MAX_CHAN
// USA Cable HRC, ch 1 to US_MAX_CHAN
FREQ(modStr[i], "hrc0", desc[i], "HRC %1",
1, 73753600, 73753601, 6000300, mod[i]); // 1
FREQ(modStr[i], "hrc1", desc[i], "HRC %1",
2, 55752700, 67753300, 6000300, mod[i]); // 2-4
FREQ(modStr[i], "hrc2", desc[i], "HRC %1",
5, 79753900, 85754200, 6000300, mod[i]); // 5-6
FREQ(modStr[i], "hrc3", desc[i], "HRC %1",
7, 175758700, 211760500, 6000300, mod[i]); // 7-13
FREQ(modStr[i], "hrc4", desc[i], "HRC %1",
14, 121756000, 169758400, 6000300, mod[i]); // 14-22
FREQ(modStr[i], "hrc5", desc[i], "HRC %1",
23, 217760800, 643782100, 6000300, mod[i]); // 23-94
FREQ(modStr[i], "hrc6", desc[i], "HRC %1",
95, 91754500, 115755700, 6000300, mod[i]); // 95-99
// The center frequency of any EIA-542 HRC cable channel over 99 is
// Frequency_MHz = ( 6.0003 * ( 8 + channel_designation ) ) + 1.75
FREQ(modStr[i], "hrc7", desc[i], "HRC %1",
100, 649782400,
EIA_542_FREQUENCY(6000300, 1750000, US_MAX_CHAN),
6000300, mod[i]); // 100-US_MAX_CHAN
// USA Cable HRC, ch 76-94 and 100-US_MAX_CHAN
// Channels 95-99 are low frequency despite high channel numbers
FREQ(modStr[i], "hrchigh0", desc[i], "HRC %1",
76, 535776700, 643782100, 6000300, mod[i]); // 76-94
FREQ(modStr[i], "hrchigh1", desc[i], "HRC %1",
100, 649782400,
EIA_542_FREQUENCY(6000300, 1750000, US_MAX_CHAN),
6000300, mod[i]); // 100-US_MAX_CHAN
// USA Cable IRC, ch 1 to US_MAX_CHAN
FREQ(modStr[i], "irc0", desc[i], "IRC %1",
1, 75012500, 75012501, 6000000, mod[i]); // 1
FREQ(modStr[i], "irc1", desc[i], "IRC %1",
2, 57012500, 69012500, 6000000, mod[i]); // 2-4
FREQ(modStr[i], "irc2", desc[i], "IRC %1",
5, 81012500, 87012500, 6000000, mod[i]); // 5-6
FREQ(modStr[i], "irc3", desc[i], "IRC %1",
7, 177012500, 213012500, 6000000, mod[i]); // 7-13
FREQ(modStr[i], "irc4", desc[i], "IRC %1",
14, 123012500, 171012500, 6000000, mod[i]); // 14-22
FREQ(modStr[i], "irc5", desc[i], "IRC %1",
23, 219012500, 327012500, 6000000, mod[i]); // 23-41
FREQ(modStr[i], "irc6", desc[i], "IRC %1",
42, 333025000, 333025001, 6000000, mod[i]); // 42
FREQ(modStr[i], "irc7", desc[i], "IRC %1",
43, 339012500, 645012500, 6000000, mod[i]); // 43-94
FREQ(modStr[i], "irc8", desc[i], "IRC %1",
95, 93012500, 105012500, 6000000, mod[i]); // 95-97
FREQ(modStr[i], "irc9", desc[i], "IRC %1",
98, 111025000, 117025000, 6000000, mod[i]); // 98-99
// The center frequency of any EIA-542 IRC cable channel over 99 is
// Frequency_MHz = ( 6 * ( 8 + channel_designation ) ) + 3.0125
FREQ(modStr[i], "irc10", desc[i], "IRC %1",
100, 651012500,
EIA_542_FREQUENCY(6000000, 3012500, US_MAX_CHAN),
6000000, mod[i]); // 100-US_MAX_CHAN
// USA Cable IRC, ch 76-94 and 100-125
// Channels 95-99 are low frequency despite high channel numbers
FREQ(modStr[i], "irchigh0", desc[i], "IRC %1",
76, 537012500, 645012500, 6000000, mod[i]); // 76-94
FREQ(modStr[i], "irchigh1", desc[i], "IRC %1",
100, 651012500,
EIA_542_FREQUENCY(6000000, 3012500, US_MAX_CHAN),
6000000, mod[i]); // 100-US_MAX_CHAN
}
// create old school frequency tables...
for (struct CHANLISTS *ptr = chanlists; ptr->name ; ptr++)
{
QString tbl_name = ptr->name;
for (uint i = 0; i < (uint)ptr->count; i++)
{
uint64_t freq = (ptr->list[i].freq * 1000LL) + 1750000;
fmap[QString("analog_analog_%1%2").arg(tbl_name).arg(i)] =
new FrequencyTable(
QString("%1 %2").arg(tbl_name).arg(ptr->list[i].name),
i+2,
freq, freq + 3000000,
6000000, DTVModulation::kModulationAnalog);
}
}
}
More information about the mythtvnz
mailing list