Slashdot Mirror


Reverse Engineering an MPEG Driver

An anonymous reader writes "Following on from the recent spate of reverse engineering articles, there is an interesting summary of the reverse engineering of a binary only Linux driver. The driver is for the integrated MPEG decoder on VIA's popular EPIA-M boards. At the moment VIA has not publicly released the source code for the MPEG chipset on these boards and will only make the code available under NDA saying that "Typically, only requests from companies developing product for sale will be approved." As a result this is holding back development of open source tools (e.g. xine, mplayer, vdr) that would be able to make use of the interesting hardware on these boards."

16 of 275 comments (clear)

  1. Re:Is this reverse engineering? by diamondc · · Score: 3, Informative

    This guy lives in Italy, safe from terrible US IP laws.

    --
    "I keep looking in the want-ads under 'revolutionary' but there don't seem to be any listings.. "
  2. What about DMCA? by U-Boot_96 · · Score: 2, Informative

    Should developers/users be afraid of the iron fist of moronic law in this case?
    Or is it perfectly legal and VIA can not do anything about it? They seem to have an interest in suppresing such efforts though, since they've stated they are interested in revealing the code only to entities that want to make a buck off of it.
    So, even if DMCA dosn't apply here, are there any chances they could be nasty about it? U-Boot

  3. CLE266.tgz mirror (original slashdotted) by ultrapenguin · · Score: 4, Informative

    I've setup a mirror for the source at http://43.244.87.231/cle266.tgz

    Be nice to it, and check the original site after slashdot effect goes away.

  4. Re:Software decoding works fine by MikeFM · · Score: 5, Informative

    My lil epia box does better than my parents faster Wintel box at playing dvd's and vob's. Sure a lot of that is because MPlayer and Linux are so much better but you're mistaken if you think the epia systems don't have the muscle for the job. If they could enable the hardware decoding it might even make the playback better. They also run much cooler, more energy effecient, and quieter.. something that IMO is a mark of quality.. not of being 'cheap'. Besides, price compare the CPU's.. you'll find they aren't that cheap. :)

    --
    At what price learning? At what cost wisdom? The price is a man's peace of mind, and the cost is his life.
  5. Re:Free, but not Free by Svartalf · · Score: 5, Informative

    In actuality, they released everything BUT the driver info for the MPEG stuff. They handed the 2D and 3D over to the DRI and XFree86 people- Alan Cox was working on making the drivers all nice and clean up until recently.

    From what I got from my contacts at SiS and VIA when I was working on set-top box designs using their chipsets was that the stuff was being held to an NDA because of contractual reasons. My ignorant guess would be that there's something with regards to the MPEG patent licensing that prevents the details being released for piracy prevention reasons because the use of these accelerators would enable real-time/near real-time transcoding of DVDs, etc.

    This is not to say that I'm right, or if I am, that it's a good reason.

    --
    I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  6. A link to just that: Reverse Engineering Compiler by myst564 · · Score: 4, Informative

    Just to prove it exists:

    Reverse Engineering Compiler

  7. Re:Why do you need source code to develop for it? by Dr.+Zowie · · Score: 2, Informative

    They're not reverse-engineering the hardware, they're reverse-engineering the driver software that is used to talk to the hardware. In the absence of an authoritative interface document, the driver can serve as one. In the absence of source code for the driver, the reverse-engineered driver code can serve as one.

  8. maybe, but not for that reason by sydlexic · · Score: 2, Informative

    the decoded mpeg2 cannot be captured, it's decoded directly to the video memory.

  9. NOT reverse engineering by Performer+Guy · · Score: 4, Informative

    This is not reverse engineering, he dissassembled the code and pretty much copied/ported the result to C. I don't think this meets any cleanroom standards and the code is dangerously contaminated. To use this work you would have to get someone else to reimplement the driver without looking at this contaminated code base. That means they need to be passed a description of the hardware interface inferred from observations of how this driver works, and the code produced by dissassebling the driver needs to be tossed in the garbage can.

    Who taught anyone that dissassembling someone's proprietary code and doing a line for line port then publishing the result was in any way legitimate?

    1. Re: NOT reverse engineering by Adam+J.+Richter · · Score: 3, Informative
      Who taught anyone that dissassembling someone's proprietary code and doing a line for line port then publishing the result was in any way legitimate?

      "In no case does copyright protection for an original work of authorship extend to any idea, procedure, process, system, method of operation, concept, principle, or discovery, regardless of the form in which it is described, explained, illustrated, or embodied in such work". United States Code, Title 17, section 102(b).

    2. Re:NOT reverse engineering by orv · · Score: 5, Informative

      The copyright statement in the driver from via states:-

      * Permission is hereby granted, free of charge, to any person obtaining a
      * copy of this software and associated documentation files (the "Software"),
      * to deal in the Software without restriction, including without limitation
      * the rights to use, copy, modify, merge, publish, distribute, sub license,
      * and/or sell copies of the Software, and to permit persons to whom the
      * Software is furnished to do so, subject to the following conditions:
      *
      * The above copyright notice and this permission notice (including the
      * next paragraph) shall be included in all copies or substantial portions
      * of the Software.


      It's just that they didn't actually release the code for the driver. So the port doesn't need to be a proper clean room reverse engineer.

  10. Re:well yes, what else do you want? by AvitarX · · Score: 2, Informative

    I believe that if you used dumpster dived code to make a diagram, and then used that to make the code you are open for abuse. Because you could have accidentaly infringed.

    The coder and the diagramer should be different people for clean reverse engineering.

    --
    Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
  11. Re:Is this reverse engineering? by yellowstone · · Score: 5, Informative
    He took the binary code and inferred a C language program that would produce the same code. Very clever, but I thought reverse engineering worked on a functional level.
    Well, this is definitely not a 'clean room' reverse engineering.

    To do a clean room implementation, you need to have two teams:

    1. The first team digs into the implementation, and produces a document specifying the interface.
    2. The second team uses the specification produced by the first team to create an implementation.
    This is a clean-room implementation when the only communication between the two teams is via the specification: A) No one who sees the original implementation works on the new implementation and B) No one who works on the new implementation looks at the original implementation
    --
    150 Opening BINARY mode data connection for slashdot.sig (129323052 bytes).
  12. Re:why hardware decoder? by DeadScreenSky · · Score: 2, Informative

    Maybe it doesn't work in Linux or on your specific setup, but my 'suffiently accelerated ATI card' has a hardware MPEG decoder. All of them have had it for years, AFAIK - the original Radeon did, and I am pretty sure later Rage Pros also did. So maybe you actually are using a hardware decoder without realizing it?

    --
    There is no excellent beauty that hath not some strangeness in the proportion. -- Francis Bacon
  13. Re:-1, Wrong by Anonymous Coward · · Score: 1, Informative

    I sold and serviced desktop video editing systems from '89 until '02 and things have gotten a lot faster since then.

    > Hardware decoding allows for much higher resolution video.

    I'm not sure what you mean by higher resolution--I've sold P4's that do real-time, full screen, uncompressed, CCIR-601 with software RAID 0 on SCSI and Nvidia graphics chips. Throw some more hard drives in the mix and another processor and you can buy software that will deal with two of those streams in real-time along with 2D effects A/B-roll, video processing(filter, keying, color, etc), and an alpha channel/CG.

    > fractalize regions that have semi-random "noise" distribution

    I'm not sure what you mean by that, either. Video noise that exists before encoding cannot be eliminated during decoding--filters can be used to lessen it but processors that would have difficulty doing that in software, in real-time while decoding a 5MB/s stream, were put out to pasture long ago. Noise that is introduced during the compression phase cannot be satisfactorily eliminated in software or hardware--what is lost is lost.

    We have *long* surpassed the point where processing MPEG requires anywhere near 100% CPU utilization. I may be mistaken but I believe even Premiere 6 could do dual channel MPEG2(much more intensive than MPEG) 3DE with an alpha channel in real-time.

  14. Theres also VIAEXP... by excessive · · Score: 2, Informative
    The VIA enhanced Xine Player now which does have the details of the MPEG2 stuff for the CLE266... (...and it is connected with VIA, which is where I found the link...)

    Although it did only start about a fortnight ago.