Friday, November 21, 2014

HDTV. UHD. Eesti.

Tarbija24: Eestlased ostavad aina nutikamaid telereid. Jätsin kommentaari siia ka, et see hiljem ära ei kaoks.

Eestis on võimalik üle kaabli (Starman) või ka IPTV (Elion) vaadata HD kanaleid küll. Esialgu on nö uuematest tehnoloogiatest laiemalt saadaval vaid FullHD.

See-eest UHD on alles verivärske ja seda sai näha näiteks FIFA jalgpalli maailmakarika ülekannet vaadates — nendel, kel vastav aparatuur olemas.

UHD standardeid on kaks: 4K ja 8K. Jaapan läks kohe 8K peale üle, teised maad ja riigid on nagu kahevahel, et kas valida 4K või 8K.

YouTube muuseas toetab 4K-d, kui video on selles resolutsioonis üles võetud. Vaja on vaid, et toru oleks lai.

Eestis on minuteada DVB-T digistandard koos MPEG4 AVC pakkimisega, mis peaks võimaldama HDTV-d, aga ma ei tea täpselt, kas see on Eestis digiantenniga vastuvõetaval HD-kanalil ainult 720p, või pigem 1080i või 1080p.

HDTV on DVB-T standardi ja MPEG-4 AVC kodeeringuga võimalik, kuid DVB-T läbilaskevõime võimaldab korraga vist ainult ühte-kahte HD kanalit. Ühe multipleksi kohta mitme kanali jaoks on tarvis DVB-T2 saatjaid, aga meil on vaid DVB-T, mille läbilaskevõime on väiksem. Tõsi küll, MPEG-4 AVC kodeerimine on tõhusam kui MPEG2, mis võimaldab veidi rohkem.

Sest soomlastel on alumises otsas DVB-T koos MPEG2 kodeeringuga, mis on vanem kui meie variant, aga nad juurutavad juba DVB-T2 saatjaid ja paljudel sealsetel telekatarbijatel on see mure, et tuleb välja vahetada digivastuvõtjad või üldse uus teler osta. Mõlematpidi on kulu.

Eestis oli üleminek digitelevisioonile ses mõttes ratsionaalne, et analoogiga võrreldes muutus ülekandmine kõigile odavamaks ja nii sai ka kulusid kokku hoida. Nii riik kui ka eeldatavasti erakanalid.

Eestis on alles neli aastat möödas digitelevisioonile üleminekust, mille hulka kuulub DVB-T saatjate paigaldamine (infrastruktuur) ning tarbijate poolt digibokside ja/või uute telekate ostmine.

Ma ei kujuta üldse ette, et kas ja kuidas ja millal oleks peale selliseid kulutusi otstarbekas DVB-T2-le ja seeläbi UHD-le üle minna. Et kui, siis loodetavasti toimub see siis juba järk-järgult, nagu kunagi ammu oli näiteks mustvalgelt värvitelekale üleminek.

Friday, November 7, 2014

Brand recognition and advancements in technology

Everyone knows this picture, as it has become a meme of sorts.

Two major points:
* that "The iPhone introduced the smartphone to the world, and the iPad the tablet computer."

Well...

* And the opposite argument claiming that 'the HUD [headgear] technology predates Star Trek: Deeep Space Nine by decades in theory and by many years as science fact.'

So...

Even if Google Glass-like devices might have been in use well before Google came out with its own product, then in all actuality they might have been deployed in only sequestered (military, intelligence) and/or niche environments (specific businesses).

If you go to a library an read a 1980's book or major magazine about future computing devices and gadgets, then the headgear is there already. At least I remember on such book when I was younger.

Very often the point is, that some technologies are not acknowledged as being widely in existence until a reasonably affordable, well-branded, and easy-to-use product is successfully introduced into consumer space and gains major mindshare from the press and then the public at large.

The smartphone was there long before the iPhone (IBM, Nokia), ditto the tablet computer (Microsoft's thingy from 2000 was a rather half-hearted attempt, btw), and videoconferencing. There were video capabilities in instant messaging programs long before Skype.

Only that major brands recognized by most people are major only because of very effective promotion in one otherwise backwards (if you will) or underdeveloped, but rather powerful market compared to the rest of the world. That's iPhone in the U.S.

There are other reasons:
* One is that mainstream technology journalism has been dominated by U.S. outlets;
* The other is that they are usually rather partial to Apple. Almost all of them;
* And that the tech press of the U.S. — and by extension its public — were, IMO, in a very desperate need for a fancy product that was ostensibly innovated in United States, marketed by a major brand native to the U.S., and of which every person would want to have a piece of.
* Never mind that actual product was made in China, where industrialisation and labour conditions are historically comparable to those of 19th century Britain. (Yes, there have been some improvements.)

Tuesday, October 7, 2014

Installing the GIMP FFT plugin (in Windows)

The short of it: to install the Fourier FFT transform plugin into GIMP, download the latest version from here (registry.gimp.org). (I chose the Windows distribution, 32 bits).

From this gimpchat.com forum post I learned that both fourier.exe and libfftw3-3.dll must be placed into the GIMP plugins folder (specifically
C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins).

Unfortunately, when starting GIMP again, I got the error that the file libgcc_s_sjlj-1.dll was not found, so this meant that the filter wouldn't work.

To get the libgcc_s_sjlj-1.dll file, this instruction on another GIMP plugin suggested how to get that file: download the x32-4.8.0-release-win32-sjlj-rev2.7z package from Sourceforge (36.1 Mb); then you need to open the compressed file with 7-Zip (if you don't have it, download and install it separately beforehand), move to directory x32-4.8.0-release-win32-sjlj-rev2.7z\mingw32\bin\, and there's the file.

Extract only libgcc_s_sjlj-1.dll to C:\Program Files\GIMP-2.0\lib\gimp\2.0\plug-ins .

I became interested in the FFT plugin from a Wikimedia Commons Help section offering instructions about image manipulation, introducing the plugin here and in the next section.

Tuesday, August 12, 2014

Android telefoniga mobiil-Interneti jagamine läbi Wi-Fi

Seadmete opsüsteemid:
• Samsungi telefonis Android 2.3.6 (eestikeelse kasutajaliidesega);
• arvutil Windows XP SP3, mis on ingliskeelse kasutajaliidese ja Windowsi enda Wi-Fi tööriistadega ühendumiseks.
Mida teha, kui arvutil on ThinkVantage Access Connections

Artikkel eeldab juba nii Androidi-nutitelefoni kui ka Windowsi kasutamise oskust teataval tasemel.

Niisiis selgus kõige alguses, et nutitelefonis peab Wi-Fi ise samal ajal välja lülitatud olema.

Kõigepealt tuleb kindlaks teha, et mobiil-Interneti võrguseaded on enam-vähem korras:
    Seaded  
  • Juhtmevaba võrk ja võrk >
    • Mobiilsidevõrgud >
        Pääsupunktide nimed >
      • Elisa:
        (•) internet.elisa.ee
        wap.elisa.ee või mms.elisa.ee vms asemel.
         
      • EMT:
        (•) internet.emt.ee
        wap.emt.ee või wap2.emt.ee või mms.emt.ee asemel.

        Android nutitelefon võimaldab kasutada nii tavalisi Interneti-lehekülgi kui ka lehitseda wap-lehtedel. Nendel juhtudel, kus mobiiliteenuse paketis on mobiil-Internetile mahupiirangud, mille ületamisel tuleb oluliselt rohkem maksta, on wap-lehtedel lehitsemine odavam. Soodsa paketita kõnekaardi omanikele Android-nutitelefonis mobiil-andmeside ei soovita, kuna paljud teenused ja programmid soovivad automaatselt ühenduda ja kohe andmeid vahetada. Niisugused kõnekaardid sobivad rohkem WAP-lehitsejatega funktsioonitelefonidesse (sh Nokia mitte-Windows nutitelefonid), millega on oluliselt kergem oma Internetiliiklust reguleerida.

Edasi tuleb seadistada Wi-Fi hotspoti (Android 2.3.6-s värdsõna "kuumkoht") juurdepääsupunkt (AP ehk access point) —
    Seaded  
  • Juhtmevaba võrk ja võrk >
    • Modem ja kaasaskantav kuumkoht >
      • Konfig. kaasask. Wifi kuumkohta >

        Võrgu SSID (nimi, mille järgi leiad võrgu üles)
        [Kirjuta oma võrgu nimi. Lubatud on numbrid 0-9 ja tähed A-Z, a-z, sidekriips - ja allkriips _]

        Turvalisus
        Vali [WPA2-PSK]

        Parool
        [Kirjuta tühikuteta vähemalt 8 tähemärki, lubatud on numbrid 0-9 ja tähed a-z (küll mitte suurtähed)]

        [\/] Näita parooli
        — on valik näidata võrguparooli, mille võib Windowsi Notepadis üles kirjutada ja kohe mällu kopeerida (Ctrl+C).

        Vajuta [Salv.] nupule
         

Siiski otsustasin, et enne hotspoti aktiveerimist oleks kasulik mobiilivõrk (pakettandmeside) enne sisse lülitada (võib ka tagurpidi) —

    Seaded  
  • Juhtmevaba võrk ja võrk >
    • Mobiilsidevõrgud >
      • Kasuta pakettandmeside [\/]
        — Kui seda parasjagu vaja pole, ei pea see sees olema.
Nüüd aktiveeri hotspot:
    Seaded  
  • Juhtmevaba võrk ja võrk >
    • Modem ja kaasaskantav kuumkoht >
      • Kaasaskantav Wi-Fi kuumkoht [\/]

        Windowsis otsi Wi-fi võrk ja leia oma võrgu SSID. Vali see ja ühendu.

        Võrguga Ühendumiseks küsib Windows võrguparooli, tihtipeale kahe sisestusväljaga samas dialoogiaknas.
        Sisesta seesama võrguparool, mille oma Wi-Fi võrgu tarvis. Kui tuleb teine väli, siis sinna sama parool uuesti.
        Üleskirjutatud parooli saab kopeerida ja asetada (kleepida) võrguparooli väljale (Ctrl+V).

Ühendumine siis, kui Wi-Fi tööriistaks on ThinkVantage Access Connections

Tingimusteks Windows XP SP3 ja ThinkVantage Access Connections 6.01 (2013, ingliskeelne).

ThinkVantage Access Connections on suurepärane võrguühenduste haldamise programm, mille algselt arendas välja IBM, ning mille arendamist jätkab Lenovo. Access Connectionsi eelis on põhjalik seadistatavus, võimalus luua ja hallata asukohaprofiile ning neid eksportida ja importida ühest arvutist teise. Lisaks kergendab see võrguühenduste haldamist, eriti kui kasutusel on erinevad Windowsi opsüsteemid (XP, Vista, 7, 8, 8.1).

Niisiis järgnev eeldab, et arvuti peamiseks võrguühenduste haldajaks on Windowsi enda asemel ThinkVantage Access Connections (tavaliselt ingliskeelne), mis tuleb kaasa peamiselt ThinkPad sülearvutitega, aga võib-olla ka teiste Lenovo sülearvutitega. Teine eeldus on see, et näiteks kui on Inteli Wi-Fi adapter, siis Inteli Wi-Fi tarkvara ei ole aktiivne ja on maha installitud, kuid adapteri draiverid alles.

Kui hotspotiga nutitelefonil on kõik muud tingimused edukalt täidetud, siis üldine probleem on see, et ThinkVantage Access Connections programmiga ei ole võimalik peale võrguparooli sisestamist Interneti-ühendust saada.

Access Connections on küll palju funktsionaalsem, kuid teatud olukordades mitte nii paindlik kui Windowsi enda võrguhaldustööriistad.

Et kui juba läbi Access Connectionsi oli alguses püütud ühendust võtta, siis Access Connections on juba salvestanud asukohaprofiili, mis kannab mobiiltelefoni AP (access point-i) nimetust. Antud Access Connectionsi versiooniga (6.01) miskipärast ei õnnestunud toimetada äsjaloodud asukohaprofiili, millega ei saanud ühendust (selle ühenduse valiku puhul oli Edit-nupp tuhm). Seega äsjaloodud edutu asukohaprofiil tuli kustutada; Access Connectionsis on sellisel juhul efektiivsem käsitsi uue asukohaprofiili tegemine.

Lahendus seisneb selles, et Wi-Fi seadetes peab konkreetse ühenduse krüpteerimine olema AES ja mitte TKIP.

Kui avada Access Connections põhiaken (tegumiriba märkuste alal must arvuti, mille all juhtmed), siis minna Location Profiles (asukohaprofiilid) vahekaardile, millel ilmub asukohaprofiilide nimekiri.

Eeldusel, et vana ja mittetoimetatav asukohaprofiil on juba kustutatud ning käsitsi uuesti loodud, tuleb seadetes suhteliselt hoolikalt näpuga järge ajada.

Kui Location Profiles vahekaardi nimistus on leitud telefoni AP, valida asukohaprofiil ja klikkida Edit nupule. See kehtib siis asukohaprofiili kohta, mis on saanud eduka ühenduse ja mida saab toimetada.

Aknas Edit Profile: (asukohaprofiili nimi) valida "Wireless Settings" vahekaart.

Et kõik oleks kindel, siis ühenduse tüüp (Connection type) peab olema infrastruktuur (Infrastructure), "Wireless mode" on tavaliselt "Auto". Teisi seadeid (v.a. allolevad) tavaliselt muuta pole vaja.

Kui AP juhtmevabaks turvastandardiks on telefonis valitud WPA2-PSK (Android 2.3.6-s ainuke turvaline valik), siis Access Connections telefoni-wifi asukohaprofiili Wireless Settings vahekaardil on allatulev menüü "Wireless Security Type", kus valida
"Use Wi-Fi Protected Access - Pre Shared Key (WPA-PSK)". Lisaks klikkida Properties nupule, mille järel tuleb ette "Wi-Fi Settings" aken. Seal on järgmised võimalused:
Access point authentication, kus valitud peab olema WPA2-PSK
Data encryption: — Valitud peab saama AES ja mitte TKIP.
Pre-shared key on "Use 8-63 alphanumeric characters (0-9, a-z)"
• Edasi vajadusel sisestada uuesti võrguparool ja vajutada OK.

"Edit Profile" akna "Additional Settings" (täiendavad seaded) vahekaardil on tavaliselt linnuke
\/ Network security juures. Kui vajutada [Settings...] nupule, siis vastutustundlikul kasutajal on tavaliselt välja lülitatud failide ja printerite jagamine, Interneti-ühenduse jagamine, ning sisse on lülitatud Windowsi tulemüür.

Monday, July 28, 2014

Performance optimization of mobile sites

This is in reaction to a post on Google Plus complaining about why the BBC mobile site wouldn't serve large images to a phone that is capable of downloading and displaying them. (This is current practice on many mobile sites, as it were.)

So, the BBC website is also serving developing countries, where the best mobile infrastructure consists of what in advanced economies is essentially legacy technology. For example, only this year did Pakistan begin adopting 3G.

Many sites are not necessarily willing to incur additional bandwidth costs, unless they were ready, willing, and capable of serving very large amounts of content (such as YouTube).

Another typical issue is with designers of lesser websites, who fail to optimize their content.

Mobile data connections incur charges for data, which can be substantial for people with limited budgets. Thus a major factor to consider when designing a mobile site with worldwide viewership is responsible data usage, which then requires designs that are made for the lowest common denominator.

Because when people must pay money to read a website, they will avoid those that are expensive to visit.

AFAIK, there seems to be no easy way for a site to automatically detect if a user is visiting through 2.75G (GRPS/EDGE), 3G or 4G. The best indicator is the user agent string, but that doesn't always tell if the phone is actually on the net via 3G/4G; only that the device is capable of such.

If phones were able to report through the user agent string that they're browsing via 3G/4G, or even better — if a device were able to report its download speed on a certain network/infrastructure, websites would be able to fine-tune the content served to their various visitors. Unfortunately, this would be ripe for abuse, if content providers began actively excluding devices with speeds and connections under a certain threshold.

Another point to consider is that when mobile phone users are tied to a limited data plan, they are not willing to download more than absolutely necessary. This being text, and more would be large images.

A solution could be for mobile users to select which connections they would want which version of site. If people have a limited plan, they'd want small content; if using a dedicated connection over Wi-Fi, they'd be content with bigger images.

There are some solutions (or workarounds), such as one based on cooperation between site and user by implementing cookies to select the lite or heavy site, if such functionality is offered. There are also apps for mobile devices.

Another possibility is for users themselves to specify which version of a site they want to visit at a time, especially if a mobile version is on offer.

Wednesday, July 16, 2014

Simple maths on image height

It has taken me a while to post new stuff, but since I finally got around to it, I'll post it anyway.

This time, the description of the problem is not in the lede, but hidden somewhere in this post.
I know there may be a much simpler way and I might have even thought about it after creating this post, but the following is just a way to express how I got to it. My best excuse is that I wanted quite a lot of precision and I found the following to be the best way.


Recently I got my hands on a very simple GPRS feature with only a WAP browser as its most advanced feature. It has 600 kilobytes of storage for small sounds and images, and I'd learned to use the WAP browser to download previously down-scaled photos as background pictures to customize the phone.

One problem that I ran into, is that the phone's default main screen UI text showing operator, date and time is in white colour, and this interferes with images that have white elements of it.
At that time I hadn't found out yet that I could customize UI text colour as well as add text shadows. The limited selection of colours, and text shadows made things legible, but not nice-looking, so I decided on keeping the white text.
Usually, this means that I'd only have to choose pictures with coloration that avoid the white colour. But recently I photographed a very beautiful event, and I wanted the phone to contain a picture of it, but in a way that much of the event would stay under UI text, with the sky above the event serving the function of a beautiful background to white text.

The final photo had to have the dimensions of 128x97 pixels (width x height) without the loss of aspect ratio.

I had previously created myself an XCF template image of that size in GIMP to be able to test the background image against the precise UI simulation before using mobile data charges to download the final and best version.

The precision was based on a "screen measure" image I'd saved in the phone to measure how many pixels the main screen text used up height-wise and how much of the background was free.

Out of a height of 97 pixels I measured 46 pixels that are used up by main screen UI text.

This is what I did in GIMP:
  • In the original large photo, I chose a baseline from the bottom of the selection from which I wanted to expand the selection upwards. The baseline was the lowest point from which I wanted to include information in the selection that would make it to the final image, small as it would be;
  • Then I cropped away the parts below the baseline and kept the rest of the photo. That way it was easier to select from the bottom.
  • After that, I raised the selection, but discovered a roadblock, because I didn't know how high I should raise it: I wanted the event to stay more or less just below main screen text, but in such a way that the text and the top of the stage wouldn't touch.

    The trouble, of course, was getting the height right. I kinda knew that trying to get it right 'by hand' just by making a selection and then testing to see how it looks would take too much time.
I knew I had the base information: 97 pixels height, 46 pixels reserved height at the top which I couldn't use, and 51 pixels that I had free.
Yes, I could have just downsized the big image with Shift+T and a 128x97-pixel layer above it to try and get the approximate right size, but that's not enough for a small image that has to be pixel-perfect.
I realized that it should be possible to get to the right height from the selection that encompassed the area that I wanted to stay below main screen text. This became the essential question.

(I didn't really need the width, because I'd use the template image to calculate the width of the selection using the Scale image widget by just inputting the desired height, given that 128x97 were already set as base dimensions.)

I do admit not being very proficient in mathematics. So I found a simple-to-understand online percent calculator and the default operating system calculator. After much trial and error (but hey :-) I got the right calculations and put them in the right order. Then to automate the whole thing so as to spend less time in the future, I proceeded to put these calculations into LibreOffice (I had to separately find out how to do percent calculations there), and eventually got to connect individual calculations into several formulae.

Yes, I am sure there are probably much simpler math formulae for these calculations, but the main one along with adjacent ones works as expected.

Then I turned to Google Docs, which is this awesome thing if you want to share interesting documents with the world,* and made the spreadsheet look nicer for embedding in a blog.

* Note that information that people want to keep private, secure, and in a cloud, should be kept with the companies that meet three criteria: that said companies are headquartered in countries that have strong respect for people's privacy, that the clouds they use are also located in those countries, and that said companies do not have operations in countries that do not respect people's privacy.

So here's the embedded document, and a link to it:
Calculating reserved image height from a selection

So, in the blue column 47 pixels from top of the image is reserved height; if I change it to 46, the other figures will change accordingly. The 'Input free height' cell is where I set the height of the selection that must include everything I want below main screen text; 'Total' is the total height of the selection.

After I get the total height, I use the 128x97-px template image in another window and the Scale image tool where I replace 97 px with the total height, move input focus with the tab button, and the Scale image tool will calculate the right width for me (if height and width values are connected, as in keeping the aspect ratio).

Then I changed the selection in the big image to that size, moved the selection around a bit, copied it, pasted as a new image, and then scaled the image down to 128x97 px. In the scale image tool, I only needed to change the height from 698 pixels to 97 pixels; the width — as the aspect ratio was correct — was then calculated to 128 pixels.

All in all, I had only four tries and not more. That last two consisted of moving the selection around in the big image to more or less center the stage that I had photographed. The right image turned out to be the one at the third try, when I compared the third and fourth tests.

Maybe in the future I'll provide example images to make a visual point of what I wanted to achieve.

Thursday, March 13, 2014

Designing content for mobile phones

This one is a short one.

Now, every once in a while a developer has to test their content with a device that is not very widespread, but which form factor is. These are typically mobile phones that are older or just basic. No, not everyone has a smartphone; This may be because of circumstance, or necessity, or for just being a holdover who wants to avoid planned obsolescence on their device. There are millions of these devices in use and there's always a chance someone uses them.

Content in this case is not just a web page or a wap page, but also a background image, which has to fit the screen; or an image in a mobile web page which shouldn't be too large for a screen. So, a background image, which I'd want to fit right across the screen of a phone.

Yes, there are many web pages listing resolutions for numerous device models, and I've even seen several sites that attempt real-life representations of how a mobile phone would appear and look like without necessarily having to buy it, but that's not quite it, because the data is represented in the most convoluted manner, no matter how basic or fancy.

So the solution is this very nice collection of screen resolutions at
http://lab.artlung.com/screen-resolutions
— with corresponding phone models writ inside. These start progressively from the smallest ones at the top to the biggest near the bottom. Each screen resolution is formatted in its own block to the pixel size of what a corresponding device would have, and colour coded progressively from gray to red to indicate how many models each resolution is represented by. Most of all, its very, very simple and intuitive.

This is what I or a developer/content creator really would like to know, because this helps to determine either exact or, as required, the most approximate size of generated content. Often-times browser/user agent statistics don't always reflect the size of a customer's screen, so it's important to know what they are using and how they are seeing the resource that the customers are visiting.