+ : added
October 07, 2011
++ [mickael] WIP: update jp2 dump functions with the new V2 framework
+ [mickael] WIP: update output filename of conformance dump test to be compatible with new baseline
* [mickael] WIP: correct wrong input in dump_codec function and add missing return value
* [mickael] WIP: correct mistake inside set_decoded_area function (credit to Francois De Vieilleville)
struct opj_event_mgr * p_manager
)
{
- // preconditions
+ /* preconditions */
assert(jp2 != 00);
assert(p_stream != 00);
assert(p_manager != 00);
return jp2;
}
+
+void jp2_dump(opj_jp2_v2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream)
+{
+ /* preconditions */
+ assert(p_jp2 != 00);
+
+ j2k_dump(p_jp2->j2k,
+ flag,
+ out_stream);
+}
+
+opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_v2_t* p_jp2)
+{
+ return j2k_get_cstr_index(p_jp2->j2k);
+}
+
+opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_v2_t* p_jp2)
+{
+ return j2k_get_cstr_info(p_jp2->j2k);
+}
+
struct opj_event_mgr * p_manager
);
+
+/**
+ * Dump some elements from the JP2 decompression structure .
+ *
+ *@param p_jp2 the jp2 codec.
+ *@param flag flag to describe what elments are dump.
+ *@param out_stream output stream where dump the elements.
+ *
+*/
+void jp2_dump (opj_jp2_v2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream);
+
+/**
+ * Get the codestream info from a JPEG2000 codec.
+ *
+ *@param p_jp2 jp2 codec.
+ *
+ *@return the codestream information extract from the jpg2000 codec
+ */
+opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_v2_t* p_jp2);
+
+/**
+ * Get the codestream index from a JPEG2000 codec.
+ *
+ *@param p_jp2 jp2 codec.
+ *
+ *@return the codestream index extract from the jpg2000 codec
+ */
+opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_v2_t* p_jp2);
+
/*@}*/
/*@}*/
opj_event_mgr_t* m_event_mgr;
/** Flag to indicate if the codec is used to decode or encode*/
opj_bool is_decompressor;
- opj_bool (*opj_dump_codec) (void * p_codec, OPJ_INT32 info_flag, FILE* output_stream);
+ void (*opj_dump_codec) (void * p_codec, OPJ_INT32 info_flag, FILE* output_stream);
opj_codestream_info_v2_t* (*opj_get_codec_info)(void* p_codec);
opj_codestream_index_t* (*opj_get_codec_index)(void* p_codec);
}
switch (p_format) {
case CODEC_J2K:
- l_info->opj_dump_codec = (opj_bool (*) (void*, OPJ_INT32, FILE*)) j2k_dump;
+ l_info->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) j2k_dump;
l_info->opj_get_codec_info = (opj_codestream_info_v2_t* (*) (void*) ) j2k_get_cstr_info;
case CODEC_JP2:
/* get a JP2 decoder handle */
+ l_info->opj_dump_codec = (void (*) (void*, OPJ_INT32, FILE*)) jp2_dump;
+
+ l_info->opj_get_codec_info = (opj_codestream_info_v2_t* (*) (void*) ) jp2_get_cstr_info;
+
+ l_info->opj_get_codec_index = (opj_codestream_index_t* (*) (void*) ) jp2_get_cstr_index;
+
l_info->m_codec_data.m_decompression.opj_decode =
(opj_bool (*) ( void *,
struct opj_stream_private *,
# Compare the dump output with the baseline
ADD_TEST(NR-DEC-${INPUT_FILENAME_NAME}-${IT_TEST_DEC}-compare_dump2base
${EXECUTABLE_OUTPUT_PATH}/compare_dump_files
- -b ${BASELINE_NR}/opj_${INPUT_FILENAME_NAME_WE}.txt
+ -b ${BASELINE_NR}/opj_v2_${INPUT_FILENAME_NAME_WE}.txt
-t ${TEMP}/${INPUT_FILENAME_NAME}.txt
)