跳过导航
In my Atari ST video codec, the decoder maintains a codebook of small tiles out of which the video…
0:00 / 0:27

In my Atari ST video codec, the decoder maintains a codebook of small tiles out of which the video…

Jonas Eschenburg

@indyjonas1294 位关注者

在 X 上查看
470 个赞下载原帖

27,771 次观看

In my Atari ST video codec, the decoder maintains a codebook of small tiles out of which the video frames are composed. A certain number of tiles, here 32, are updated every frame, replacing less useful ones. This approach allows for high performance and decent compression.

34 条评论

评论来自 X (Twitter) 上的原帖

  • Dbug 的头像

    @DefenceForceOrg

    Not sure if that can give you ideas: One of the things that really helped when we did video encoding was to reuse the content of the previous frame which often moves only by a few pixels or have only a couple pixels changing colors.

    10 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    That’s a DOS-era codec, right? It’s way more advanced than mine.

    4 个赞

  • Dbug 的头像

    @DefenceForceOrg

    Yes it is, but some of the concepts are probably possible to implement on a 8mhz 68000

    2 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    With a full frame update there is no cycle budget left, but if whatever technique helps avoid full frame updates it becomes a tradeoff. Motion compensation for example might be interesting.

    2 个赞

  • Shaaii 的头像

    @OfficialShaaii

    Hey, have you considered using whatever the blitter is doing to fold up a couple luts? You'd end up with floyd-steinberg style dithering which would look make the macroblocking otherwise invisible

    3 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    @0xF33DF00D I’m doing dithering when converting the 256 color source image to 16 colors. I use 2x2 Bayer dithering for that. Bayer has the advantage that it looks the same for every block so there won’t be any artists from repeating at 2, 4 or 8 pixel intervals.

    3 个赞

  • Shaaii 的头像

    @OfficialShaaii

    Ah, thats what I figured, probably would need a coprocessor to flip the pallet per frame (the Amiga did this?)

    1 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    @0xF33DF00D Ah, I see what you mean – flip the palette per frame to get better color fidelity. That would work better if the framerate were 60Hz, but it is 15Hz.

  • Shaaii 的头像

    @OfficialShaaii

    I see, godspeed on your venture. 15 frames isnt a lot to play with even with old atari beam racing tricks.

    1 个赞

  • Virtually Fun 的头像

    @virtuallyfun

    Guess the tiles would work well with the Sega CD/megadrive...? Pity nowhere near enough RAM

    2 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    Not sure about that. What you’re seeing here is about 56kB of codebook memory. Too much?

    2 个赞

  • Virtually Fun 的头像

    @virtuallyfun

    The Sega CD adds 255kb? And the main unit has 64, I think the VDP can map into either... Although I've not done anything serious on the Sega...

    2 个赞

  • NOTimothyLottes 的头像

    @NOTimothyLottes

    Could be interesting for the non new tiles to feed some amount of error of the prior frame forward so block choice tries for more energy preservation across time. But now sure how that works out without optical flow for the error.

    2 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    That would probably create temporal flickering for blocks. What I’m doing is randomly updating 8 of the 32 tiles per frame. So with a certain probability, every block in the image reaches optimal representation at some time.

    1 个赞

  • NOTimothyLottes 的头像

    @NOTimothyLottes

    It might depend on how the error feedback falls off.

    2 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    Definitely worth a try! I’ll report back.

    1 个赞

  • Brian Jordan 的头像

    @bcjordan

    @richgel999

    2 个赞

  • Chrono 的头像

    @chrono_000

    how small is the file size? i presume the point is it will be super tiny and thus fast and tiny hardware can play it?

    2 个赞

  • Jonas Eschenburg 的头像

    @indyjonas

    I usually get around 36kB/s, roughly a fourth of the original bitrate (which was probably optimized for 150kB/s singlespeed CD-ROM playback). Actually, I believe the ST(e) could just stream uncompressed video from disk. The key is to have compression without maxing out the CPU.

    3 个赞

  • Dominic Szablewski 的头像

    @phoboslab

    @chrono_000 Really cool! With 32 8x8 tiles with 4 bit colors + a 6bit tile index and a 40x20(?) tile map - again with 6 bit tile indices - that works out to 1648 byte per frame or ~40 kbyte/s at 24 fps. So on some frames you're updating less than 32 tiles? Or tile updates w. delta encoding?

    2 个赞