Fix p-frame translation issue

This commit is contained in:
Peder Bergebakken Sundt committed 2018-10-29 11:54:27 +01:00
1 parent e7180554ff
commit 9d362571d5
2 files changed
+8 -8

No files matched your search

+5 -6
View File
@@ -319,13 +319,12 @@ class PPM:
#WIP - framemove:
FrameMove = [0,0]
if Unknown & 0x2:#doesn't work 100%...
print "Unknown tags:", Unknown, "(FrameMove) at offset ",offset-1
print "FrameMove at offset ",offset-1
move = AscDec(data[offset:offset+2], True)
if move > 128:
FrameMove[0] = move - 256
else:
FrameMove[1] = 0-move
move_x = AscDec(data[offset+0:offset+1], True)
move_y = AscDec(data[offset+1:offset+2], True)
FrameMove[0] = move_x if move_x <= 127 else move_x-256
FrameMove[1] = move_y if move_y <= 127 else move_y-256
offset += 2
elif Unknown:
print "Unknown tags:",Unknown,"at offset ",offset-1
+3 -2
View File
@@ -2,10 +2,10 @@
== By pbsds ==
== aka Peder Bergebakken Sundt ==
(with some additions from WORD559)
with video-encode additions by WORD559
--VERSIONS--
PPM.py: v1.4
PPM.py: v1.5
UGO.py: v0.93
NTFT.py: v0.95
@@ -35,3 +35,4 @@ See License.txt or http://www.gnu.org/licenses/agpl-3.0.html for more informatio
-Remark for helping me understanding the 8x8 tiling on the preview images.
-JSAfive for supplying .tmb and .ugo files
-Austin Burk, Midmad on hatena haiku and WDLmaster on hcs64.com for determining the sound codec
-jaames, for proper p-frame translation