protopete's comments

protopete | 11 years ago | on: Extracting audio from visual information

I think it unlikely that pre-existing footage can be used, because HD video is almost always compressed, thus masking the minute vibrations in the pixels. The algorithm described in the article work best for uncompressed video directly from the image sensor, and they can run it in real-time without needing to store the video.

protopete | 11 years ago | on: Twitter's GIF hack

Unfortunately the MP4 looks worse than the GIF, due to chroma compression in the YUV 420 colorspace. While each pixels luminance value is kept, the color information for a 4-pixel square is stored as a single CrCb pair, which is really obvious when you look at how the orange hat has artifacts against the blue background. Increasing the bitrate won't solve this either, since it's a limitation of the colorspace.

protopete | 12 years ago | on: Three Optimization Tips for C++

Pointers don't have to be the exception. I'm working on a programming language runtime where objects are stored as a 32-bit value, with 3/4 of the range representing an integer, and 1/4 of the range (30 bits) representing a pointer. Given the constraint that pointer objects are aligned to 8 bytes, the 30-bits multiplied by 8 results in an 8GB addressable memory space. Pages within that space can be allocated using mmap with MAP_FIXED flag. Smaller memory usage results in more things in cache, resulting in higher performance.

protopete | 12 years ago | on: The cost of Linux's page fault handling

To count the number of page faults during execution, use:

  perf stat <executable>
Page faults occur after anonymous pages are mmap'ed for the heap, either mapping a common zero page, then faulted again for a memory write. Prefaulting the page with MAP_POPULATE flag to mmap can help reduce the number of page faults.

Shared libraries are also mmap'ed and faulted in, and doing it this way saves memory for things that aren't used. But if paying the penalty for faulting the pages when used outweighs the memory savings, it might be better to use MAP_POPULATE here too. It might worth trying to add an LD_LIBRARY_XXX option to tell the loader to use MAP_POPULATE. Statically linking the executable will also reduce the number of faults (sections are combined, etc.)

protopete | 12 years ago | on: Chromecast now open to developers with the Google Cast SDK

The Chromecast supports HDMI CEC in order to turn on the TV and switch inputs, so I don't understand why it doesn't support allowing the TV remote to control the Chromecast. Most TVs support CEC, and HDMI sources can request to be sent the TV remote button press events.

protopete | 12 years ago | on: You can no longer just leave Syracuse airport [video]

I once encountered a big self-revolving door exiting the secure area at an airport, and I wondered what would happen if I kept going around it in a circle. Let me tell you what happens: it alarms loudly, and the TSA employee was not amused.

protopete | 12 years ago | on: Future instruction set: AVX-512

Which phone can do realtime 4k encoding? Can you tell me which SoC it uses?

Edit: It's the Acer Liquid S2, with Qualcomm Snapdragon 800 SoC

protopete | 12 years ago | on: Man who hacked Zuckerberg's Facebook account gets cash reward

Another thing that's misleading, Facebook isn't the one paying out:

> Now, Marc Maiffret, chief technology officer of cybersecurity firm BeyondTrust, is trying to mobilize fellow hackers to raise a $10,000 reward for Shreateh after Facebook refused to compensate him.

protopete | 13 years ago | on: My first program was binary search

He was in the 3rd grade in 1955. He wrote his first computer program sometime after 1970, on a 360. Therefore he did not write his first computer program in 3rd grade.

protopete | 13 years ago | on: Skype 4.0 for Linux

Non-authorative suggestion: 1995 movie "Four rooms" and the phrase "room for improvement"

protopete | 13 years ago | on: Verizon Wireless Intros Share Everything Plans

ting.com, a Sprint MVNO

$6 per device per mo, plus automatically adjusted tiered payment for voice, text, and data, shared between devices.

Devices are not subsidized, and must be purchased up front, but it ends up saving money in the long run.

protopete | 14 years ago | on: Pipe Viewer

About the pv overhead, I sent a note to the pv author saying that on Linux at least the transfer function could take advantage of the splice system call. Splice "copies" data from one file descriptor to another file descriptor, avoiding having to copy the data from the kernel to userspace and back.
page 2