-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All RPU frames are altered when RPU is injected into a video with different length #38
Comments
The address is a memory address of the buffer when parsing, it is not data. I just tried your process and I end up with identical RPU files when comparing an edited (duplicate) RPU and the extracted RPU from an injected video with mismatched length. So you're only supposed to look at the checksum of the files to see if they're bit identical. |
Okay, but even if it's not data, it should also be kept intact, right? Or is it correct that the 'addr' data is altered?
Is it completely identical? That is, does the 'addr' data also stay original without being altered? |
No, the addr is runtime dependent when buffers are allocated in memory. It's a pointer, so it will always change. It is fine if |
But I have done a lot of tests, and 'addr' has never changed, everything is always kept completely intact. If I extract an RPU multiple times, all the resulting RPUs are identical. If I inject an RPU into a HEVC file, then I extract the RPU from the injected HEVC and it is completely identical to the original RPU (including 'addr'). If I edit an RPU to add one more frame at the end, all the frames contained in the new edited RPU (except the new last frame, as it does not exist in the original RPU) are completely identical to the original RPU (including 'addr'). And if I inject the edited RPU into a HEVC file, I extract the RPU from the injected HEVC and it still remains completely identical (including 'addr') to the edited RPU (which is also identical to the original RPU, except the new last frame evidently). In short, absolutely always, whatever I do, even if I edit the RPU, inject and extract it again, everything always remains intact (including 'addr'). But if instead of previously manually editing the RPU, I let the new dovi_tool v0.4.0 do it automatically, all the 'addr' of all the RPU frames are altered. Couldn't the automatic process just duplicate the last frame without modifying all the others frames? Thanks again! |
The addr is determined when parsing the RPU, not writing it. There's nothing to be done about it and it has nothing to do with the automatic padding when injecting. The only reasonable way to fix it would be to stop displaying it when using |
So 'addr' is not written inside the RPU? So what changes inside the RPU must be something else, and that causes the Since as I commented previously, the RPUs are altered. That is, the checksum of RPUs does not match, the bin files have different MD5s. Doesn't this happen to you? |
When I tested I made sure to only duplicate the last metadata only, then the RPUs were identical. |
Thanks again! |
I have more information. I have removed the last frame from the "Automatically edited RPU.bin" file. For this I used:
And I have obtained an RPU identical to the original (Original RPU.bin). So whatever changes is located in the new last injected frame. |
Well it appears to just be different metadata.. The only possibility is because the video has a different presentation order, and that the metadata you think is last is attached to a frame that's decoded before the others. For example, frame 157864 could be the last presented frame, and is the metadata source for padding when injecting. |
I tested this again with different videos and it is what I explained previously. |
Forgiveness for slow to respond. Thanks for answering me. If you need me to share the video to debug it as you said, tell me. But I think you were already able to reproduce the same case with other videos, right? So, if I understood you correctly, both RPUs were different because when I do it manually, a frame is duplicated, but when it is done automatically, another different frame is duplicated. Correct? Thanks! |
When I inject an RPU into a HEVC file, if I extract the RPU from the resulting injected HEVC, I get an identical RPU file (same MD5) as the original RPU.
Recently I had to inject an RPU into a HEVC file that was 1 frame longer than the RPU, so I had to use the
editor
to edit the RPU and duplicate the last frame of the RPU to obtain the same length as the video.And, as I mentioned above, if I extract the RPU from this injected video I get the same MD5 as the modified RPU that I edited (with 1 more frame). So everything is perfect.
But the new version 0.4.0 has just been published, which automates this process in these types of situations. That is, different lengths of RPU and video.
So I have decided to test version 0.4.0 with that same video that I mentioned above that I used recently (video with 1 frame more than the RPU), so dovi_tool v0.4.0 is supposed to get the last frame of the RPU and simply copy it again below, that is, duplicate the last frame, in order to obtain the same length of the video.
That is, the dovi_tool v0.4.0 should now automatically do exactly the same process that I did manually days ago. And the RPU of the injected video should be identical to the RPU edited by me with the last duplicated frame.
But it's not like that. The resulting RPU edited automatically by the dovi_tool v0.4.0 is different from the RPU edited manually by me. Shouldn't they both be identical?
I have thought that the RPU would be completely identical and only the new last frame would change... But no.
I have reviewed several random frames with the
info
argument, and all of them have changed compared to their original RPU.Specifically, I have seen that the vast majority of 'addr' data is altered during this process.
Why is all this data from all frames altered instead of all frames remaining completely intact and just duplicating the last frame?
Thanks and regards!
The text was updated successfully, but these errors were encountered: