[x265] [PATCH] recon : reconstructed image write frame position calculation logic modified

Gopu Govindaswamy gopu at multicorewareinc.com
Wed Oct 23 13:26:44 CEST 2013


# HG changeset patch
# User Gopu Govindaswamy <gopu at multicorewareinc.com>
# Date 1382527593 -19800
# Node ID 8fa037e69d88666093a3b8b0aeec7361a17ee131
# Parent  6d96d64c4e9a2c526b57274760a7147241328cb3
recon : reconstructed image write frame position calculation logic modified

diff -r 6d96d64c4e9a -r 8fa037e69d88 source/output/yuv.cpp
--- a/source/output/yuv.cpp	Tue Oct 22 23:36:36 2013 +0530
+++ b/source/output/yuv.cpp	Wed Oct 23 16:56:33 2013 +0530
@@ -47,8 +47,10 @@
 {
     PPAStartCpuEventFunc(write_yuv);
     int pixelbytes = (depth > 8) ? 2 : 1;
-    ofs.seekp(pic.poc * 3 * (width * height * pixelbytes) / 2);
-
+    uint64_t size = (pic.poc * 3);
+    size *= (width * height * pixelbytes);
+    size /= 2;
+    ofs.seekp(size);
     if (pic.bitDepth > 8 && depth == 8)
     {
         // encoder gave us short pixels, downscale, then write


More information about the x265-devel mailing list