@@ -150,7 +150,14 @@ internal_exr_apply_ht (exr_encode_pipeline_t* encode)
150150 int width = encode->chunk .width ;
151151
152152 std::vector<int > heights (encode->channel_count );
153+ std::fill (heights.begin (), heights.end (), height);
154+
153155 std::vector<int > sample_offsets (encode->channel_count );
156+ for (int i = 0 ; i < sample_offsets.size (); i++)
157+ {
158+ sample_offsets[i] = cs_to_file_ch[i].file_index * width;
159+ }
160+
154161 std::vector<int > row_gaps (encode->channel_count );
155162 std::fill (
156163 row_gaps.begin (), row_gaps.end (), width * encode->channel_count );
@@ -164,9 +171,6 @@ internal_exr_apply_ht (exr_encode_pipeline_t* encode)
164171 static_cast <kdu_params&> (siz).finalize ();
165172
166173 kdu_codestream codestream;
167- // kdu_simple_file_target output("/tmp/out.j2c");
168- // codestream.create (&siz, &output);
169-
170174 mem_compressed_target output;
171175 codestream.create (&siz, &output);
172176
@@ -191,7 +195,6 @@ internal_exr_apply_ht (exr_encode_pipeline_t* encode)
191195 kdu_stripe_compressor compressor;
192196 compressor.start (codestream);
193197
194- std::fill (heights.begin (), heights.end (), height);
195198 compressor.push_stripe (
196199 (kdu_int16*) encode->packed_buffer ,
197200 heights.data (),
0 commit comments