Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th March 2019, 04:35   #1  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
MPEG compression question

Do MPEG-based codecs compare two consecutive un-encoded frames during encoding, record the changes, and try to apply them to the last encoded frame during decoding? Or do they look at the differences between the previous encoded frame and the current un-encoded frame, and record those? The latter solution is the smart one, but I've seen artifacts that can only be explained if the former was true.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Old 20th March 2019, 10:20   #2  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,565
It's not specified how an encoder must create the bitstream, only that the bitstream must be spec compliant. Since the decoder can only access the encoded frames the encoder can only really store the differences between them. Of course not necessarily only from the predecessor of the current frame, codecs are more complicated nowadays (e.g. b frames).
sneaker_ger is offline   Reply With Quote
Old 20th March 2019, 17:55   #3  |  Link
filler56789
SuperVirus
 
filler56789's Avatar
 
Join Date: Jun 2012
Location: Antarctic Japan
Posts: 1,351
FWIW, P-frames and B-frames may get *worse* quality (I mean, higher quantization) than the I-frames. Depending on the scene complexity && the bitrate constraints, then, some artifacts will be inevitable, regardless of how "smart" the encoder was designed to be.

Last edited by filler56789; 20th March 2019 at 18:10.
filler56789 is offline   Reply With Quote
Old 20th March 2019, 23:19   #4  |  Link
Katie Boundary
Registered User
 
Katie Boundary's Avatar
 
Join Date: Jan 2015
Posts: 1,048
Quote:
Originally Posted by sneaker_ger View Post
It's not specified how an encoder must create the bitstream, only that the bitstream must be spec compliant. Since the decoder can only access the encoded frames the encoder can only really store the differences between them.
Let me rephrase. Will the codec try to take the differences between two uncompressed frames, and apply those differences to a compressed frame to get the next compressed frame? And is this why certain spatial artifacts will persist in still parts of an image instead of being detected as movement and cleaned up?
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers.
Katie Boundary is offline   Reply With Quote
Old 21st March 2019, 00:04   #5  |  Link
wonkey_monkey
Formerly davidh*****
 
wonkey_monkey's Avatar
 
Join Date: Jan 2004
Posts: 2,493
The encoder should take into account the fact that the decoder will only be working with compressed frames. If it fails to do this, then yes, it may cause artefacts to remain because, as far as it is concerned, no change has taken place or needs to be encoded.

sneaker_ger's point is that the MPEG standards don't define how an encoder encodes, they only specify what kind of input the decoder expects to receive, so we can't say what any particular, or all, MPEG encoder(s) may or may not do.

There could be other reasons for whatever you're seeing, of course, but since you probably won't provide a sample we may never find out.
__________________
My AviSynth filters / I'm the Doctor
wonkey_monkey is offline   Reply With Quote
Old 21st March 2019, 01:03   #6  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
Where whatever frames may have been encoded so far, (before or following), then the encoder has to still target the un-encoded frame, relative to the 'so-far-encoded' frames, otherwise,
what's to point of life, the universe or anything.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 23:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.