openjpegenc: store stripe offset when encoding image
authorAaron Boxer <aaron.boxer@collabora.com>
Thu, 16 Apr 2020 14:06:29 +0000 (10:06 -0400)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 12 Nov 2020 13:53:47 +0000 (13:53 +0000)
The decoder can simply read this offset after decoding
to know where to blit the stripe to the full frame

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1800>

ext/openjpeg/gstopenjpegenc.c

index 40c6ce3..250129b 100644 (file)
@@ -415,8 +415,6 @@ fill_image_packed16_4 (opj_image_t * image, GstVideoFrame * frame)
     }
     data_in += sstride;
   }
-  image->y1 -= image->y0;
-  image->y0 = 0;
 }
 
 static void
@@ -455,8 +453,6 @@ fill_image_packed8_4 (opj_image_t * image, GstVideoFrame * frame)
     }
     data_in += sstride;
   }
-  image->y1 -= image->y0;
-  image->y0 = 0;
 }
 
 static void
@@ -492,8 +488,6 @@ fill_image_packed8_3 (opj_image_t * image, GstVideoFrame * frame)
     }
     data_in += sstride;
   }
-  image->y1 -= image->y0;
-  image->y0 = 0;
 }
 
 static void
@@ -525,8 +519,6 @@ fill_image_planar16_3 (opj_image_t * image, GstVideoFrame * frame)
       data_in += sstride;
     }
   }
-  image->y1 -= image->y0;
-  image->y0 = 0;
 }
 
 static void
@@ -558,8 +550,6 @@ fill_image_planar8_3 (opj_image_t * image, GstVideoFrame * frame)
       data_in += sstride;
     }
   }
-  image->y1 -= image->y0;
-  image->y0 = 0;
 }
 
 static void
@@ -588,8 +578,6 @@ fill_image_planar8_1 (opj_image_t * image, GstVideoFrame * frame)
     }
     data_in += sstride;
   }
-  image->y1 -= image->y0;
-  image->y0 = 0;
 }
 
 static void
@@ -618,8 +606,6 @@ fill_image_planar16_1 (opj_image_t * image, GstVideoFrame * frame)
     }
     data_in += sstride;
   }
-  image->y1 -= image->y0;
-  image->y0 = 0;
 }
 
 static gboolean