Author Topic: FF7 PSX videos  (Read 52237 times)

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: FF7 PSX videos
« Reply #75 on: 2010-09-12 01:19:41 »
That is actually a fairly impressive redo of the video. I would imagine that is most likely the best we will get out of the source material.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FF7 PSX videos
« Reply #76 on: 2010-09-17 01:46:19 »
That is actually a fairly impressive redo of the video. I would imagine that is most likely the best we will get out of the source material.
A bit late on that, but that's not a redo it's a refilter and re encode. Redoing it would be what the people in Team Avalanch are doing.  I can't look at it in vdub at the moment but just looking at the video in MPC it is rather interesting to see how well it did on sharp lines such as the hair jaw and eye lashes of Areth. You can see though some of the DCT noise from the lossy compression of the motion JPEG codec. Makes for an interesting subject matter.

In any case I could go on and on about various 'stuff'.  Interesting what the filters managed to do I suppose deblocking and decoding the original data and adding the correct DCT noise/data one could 'add' more detail that was thrown out in the original. I'll have to look at the filters and see what they are up too.

By the way AVISYNTH is AWESOME for this kind of stuff. It has to be run in a batch mode but who cares. Does great stuff (especially if your video editor doesn't like the video format of a file it can act as a YUV/RGB video source for it and decode the video without even batting an eyelash).

Cyb

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: FF7 PSX videos
« Reply #77 on: 2010-09-17 02:23:13 »
That is actually a fairly impressive redo of the video. I would imagine that is most likely the best we will get out of the source material.
A bit late on that, but that's not a redo it's a refilter and re encode. Redoing it would be what the people in Team Avalanch are doing.  I can't look at it in vdub at the moment but just looking at the video in MPC it is rather interesting to see how well it did on sharp lines such as the hair jaw and eye lashes of Areth. You can see though some of the DCT noise from the lossy compression of the motion JPEG codec. Makes for an interesting subject matter.

In any case I could go on and on about various 'stuff'.  Interesting what the filters managed to do I suppose deblocking and decoding the original data and adding the correct DCT noise/data one could 'add' more detail that was thrown out in the original. I'll have to look at the filters and see what they are up too.

By the way AVISYNTH is AWESOME for this kind of stuff. It has to be run in a batch mode but who cares. Does great stuff (especially if your video editor doesn't like the video format of a file it can act as a YUV/RGB video source for it and decode the video without even batting an eyelash).

Cyb

Sorry, poor choice of words. And yes i know what Team Avalanche is doing. I did kind of start it after all.

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: FF7 PSX videos
« Reply #78 on: 2010-09-17 02:27:09 »
M35

Whilst that does look smoother, it has lost a lot of its detail.  You can get the same result with any number of filters, even inside sony vegas.  The best method seems to be to use your video converter, then place uncompressed result inside vegas and add a few simple filters then export to h.264.

There is always going to be a loss here.  The smoother you go the less detailed but less pixelated.  As it is, the fact is we are working with 320X224 videos and you can't polish a turd :P

Covarr

  • Covarr-Let
  • Administrator
  • *
  • Posts: 3940
  • Just Covarr. No "n".
    • View Profile
Re: FF7 PSX videos
« Reply #79 on: 2010-09-17 02:49:00 »
And yes i know what Team Avalanche is doing. I did kind of start it after all.
Really?


sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: FF7 PSX videos
« Reply #80 on: 2010-09-17 10:58:43 »
M35

Whilst that does look smoother, it has lost a lot of its detail.  You can get the same result with any number of filters, even inside sony vegas.  The best method seems to be to use your video converter, then place uncompressed result inside vegas and add a few simple filters then export to h.264.

There is always going to be a loss here.  The smoother you go the less detailed but less pixelated.  As it is, the fact is we are working with 320X224 videos and you can't polish a turd :P

http://www.howtocleanstuff.net/strategies/how-to-polish-a-turd/

Bad analogy.

m35

  • *
  • Posts: 52
    • View Profile
    • jPSXdec
Re: FF7 PSX videos
« Reply #81 on: 2010-09-17 11:37:31 »
M35

Whilst that does look smoother, it has lost a lot of its detail.  You can get the same result with any number of filters, even inside sony vegas.  The best method seems to be to use your video converter, then place uncompressed result inside vegas and add a few simple filters then export to h.264.

There is always going to be a loss here.  The smoother you go the less detailed but less pixelated.  As it is, the fact is we are working with 320X224 videos and you can't polish a turd :P

I was looking through this thread to see if any Sony Vegas videos were posted, but couldn't find any. I'd be interested to see what it can do in comparison.

Conceptually, what I posted is about the best I will ever achieve (these points are also addressed in this post):
* PSX outputs YCbCr components with the full JPEG/JFIF/PC.601 [0-255] color range. This should be utilized as much as possible before reducing to the standard Rec.601 [16-235/240] color range, or RGB.
* PSX videos suffer most noticeably from blockiness and ringing artifacts. For best results, these artifacts should be filtered from the original YCbCr image data prior to any other transformation.
* Finally, I wanted to ensure there was no chroma shift because exact chroma positioning can vary.

I want to emphasize that conceptually I think this is the best. This would need careful subjective observation and objective signal analysis to determine if it really is the best. And while I'm no stranger to video technologies, I still know very little about fundamental signal processing theory (e.g. low-pass filters, FFT, etc). Someone with that kind of knowledge might know of even better filtering techniques for this data.
« Last Edit: 2010-09-17 15:34:21 by m35 »

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: FF7 PSX videos
« Reply #82 on: 2010-09-17 18:57:27 »

Quote
http://www.howtocleanstuff.net/strategies/how-to-polish-a-turd/

Bad analogy.

 ;D  Someone showed me that before, but that shouldn't be allowed.  :-P

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FF7 PSX videos
« Reply #83 on: 2010-09-18 17:29:50 »
Sorry, poor choice of words. And yes i know what Team Avalanche is doing. I did kind of start it after all.
I know, I just thought it was kind of an odd 'huh moment too me.  Don't worry we aren't out to get you ... yet.

That 'polishing coprolites' article was interesting (they did misspell it however).  I didn't know people were obsessed about such strange things. Very useful however in archaeology to see what people were eating and how healthy they were (I bet you are not surprised). I just had a Conkers Bad Fur day vision (hehehe).

Erstwhile, for TA it would be interesting to render the same sequence using POV for it.  They finally made it SMPS functional etc so it can get beyond the 1000pps on some of the more intense scenes.  Compression of the data might prove to be interesting. However enough of this about that I guess.

As I said earlier AVISynth is an excellent video tool. It surpasses many commercial packages, it's most interesting ability is to be able to read almost ANY type of video. The Motion JPEGs on the PS1 are particularly nasty bits because of how the data is stored (and windows doesn't read ALL the data because it doesn't support Mode 2 type 1 data in the ISO it just supports CD audio <mode 0> data as it is).

That's the big problem with getting the video data out of the PlayStation files.  The audio (ADPCM) uses the full sector (2304  bytes) and the video uses the 2048 first bytes. So it is possible to get the video.

The thing about decoding and improving that video data is as I said earlier it's DCT data. Now DCT data is dimensionless (IE it's not constrained to pixel size per sea), increasing the resolution however is not a subject I understand well however. I know how it works etc. but adding data (think of an 8x8 block of pixels that had the DCT performed on them. the DCT is dimensionless data so the block size must be ASSUMED to be or have information that it 8x8), I suppose this is where quarter and sub pixel compression becomes handy for anti-aliasing purposes.  Another thing is simply moving from using integer DCT to a floating point based one can significantly improve the results. I believe the IDCT is a bit loss-y and has enough truncation error it creates other issues with the image data (namely it doesn't compress as well because of the noise it introduces).  To see what I am talking about just load an image in GIMP (just do a SHIFT-print screen then press SHIFT CTRL V) then go to save it as a JPEG. Select show preview in window and then look at the compressed size, then go to the advanced options and go to DCT methods select floating point and see what the new size is. It will be slightly smaller. On a less manufactured image (IE say a person) the difference is larger.

Anyhow I think it might be a better idea to use the TA video data when available (even if you just want enhanced movies and nothing else). The amount of work necessary to improve the original data will become close to the same as making all new data (as you people are doing). Geesh the number of things that go through ones mind.

Cyb

m35

  • *
  • Posts: 52
    • View Profile
    • jPSXdec
Re: FF7 PSX videos
« Reply #84 on: 2010-09-18 19:59:47 »
Thanks for your ramblings Cyberman!

Now DCT data is dimensionless (IE it's not constrained to pixel size per sea)

I know how it works etc. but adding data (think of an 8x8 block of pixels that had the DCT performed on them. the DCT is dimensionless data so the block size must be ASSUMED to be or have information that it 8x8), I suppose this is where quarter and sub pixel compression becomes handy for anti-aliasing purposes. 
I was actually pondering this very thing the other day: is there any value trying to scale at the DCT coefficient level? I wasn't sure how it would be possible, but now I see that the DCT equation is indeed dimensionless, so it could use 8x8 for the input matrix, and ANYxANY for the output matrix. I'm really curious what the results will look like. You have given me a lot to explore...

Another thing is simply moving from using integer DCT to a floating point based one can significantly improve the results. I believe the IDCT is a bit loss-y and has enough truncation error it creates other issues with the image data
My thoughts exactly, which is why jPSXdec uses floating-point math for all its operations (quantization, IDCT, etc) in the 'high' quality setting. ;) Now if only it was possible to keep that floating-point fidelity in AviSynth and its filters, then my quality cravings could finally be satisfied.

Cyberman

  • *
  • Posts: 1572
    • View Profile
Re: FF7 PSX videos
« Reply #85 on: 2010-09-18 23:53:41 »
Thanks for your ramblings Cyberman!
Now that's a first LOL
I was actually pondering this very thing the other day: is there any value trying to scale at the DCT coefficient level? I wasn't sure how it would be possible, but now I see that the DCT equation is indeed dimensionless, so it could use 8x8 for the input matrix, and ANYxANY for the output matrix. I'm really curious what the results will look like. You have given me a lot to explore...
I don't believe playing with the coefficients will gain you that much. I believe the adding data (IE a second pass with sub pixel resolution) might be useful. What data to add is the problem (or issue). To give you more information the wikipedia article on JPEG is quite good.  SONY used MJPEG to perform is compression. JPEG compression is considered LOSSY because they throw out information that has low 'signal' in the stream of data.  Reintroducing this data by some method may be a way to enhance the sub pixel resolution.
My thoughts exactly, which is why jPSXdec uses floating-point math for all its operations (quantization, IDCT, etc) in the 'high' quality setting. ;) Now if only it was possible to keep that floating-point fidelity in AviSynth and its filters, then my quality cravings could finally be satisfied.
Well aviSynth would have to use SSE3 or SSE2 instructions and I believe it only uses MMX level. This is how it achieves it's performance. I began using MMX code when I was making a software plugin for playstation emulators.  Moving to SSE2 instructions would resolve some of the performance issues you have when using floating point instructions for the DCT (basically you can perform 4 single precision instructions simultaneously instead of 1 at a time).  This would be a big performance hit using AVI synth but I've never seen people use it in real time anyways (shrug).