Merge pull request #1390 from stweil/typos
Fix some typos (found by codespell)
This commit is contained in:
commit
22eb737d5d
|
@ -305,7 +305,7 @@ if(BUILD_DOC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Buld Testing
|
# Build Testing
|
||||||
option(BUILD_TESTING "Build the tests." OFF)
|
option(BUILD_TESTING "Build the tests." OFF)
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
if(BUILD_CODEC)
|
if(BUILD_CODEC)
|
||||||
|
|
|
@ -120,7 +120,7 @@ static opj_image_t * pngtoimage_internal(opj_cparameters_t * params,
|
||||||
if (png_get_valid(png, info, PNG_INFO_tRNS)) {
|
if (png_get_valid(png, info, PNG_INFO_tRNS)) {
|
||||||
png_set_expand(png);
|
png_set_expand(png);
|
||||||
}
|
}
|
||||||
/* We might wan't to expand background */
|
/* We might want to expand background */
|
||||||
/*
|
/*
|
||||||
if(png_get_valid(png, info, PNG_INFO_bKGD)) {
|
if(png_get_valid(png, info, PNG_INFO_bKGD)) {
|
||||||
png_color_16p bgnd;
|
png_color_16p bgnd;
|
||||||
|
|
|
@ -226,7 +226,7 @@ static void decode_help_display(void)
|
||||||
" OPTIONAL\n"
|
" OPTIONAL\n"
|
||||||
" Force the precision (bit depth) of components.\n");
|
" Force the precision (bit depth) of components.\n");
|
||||||
fprintf(stdout,
|
fprintf(stdout,
|
||||||
" There shall be at least 1 value. Theres no limit on the number of values (comma separated, last values ignored if too much values).\n"
|
" There shall be at least 1 value. There is no limit on the number of values (comma separated, last values ignored if too much values).\n"
|
||||||
" If there are less values than components, the last value is used for remaining components.\n"
|
" If there are less values than components, the last value is used for remaining components.\n"
|
||||||
" If 'C' is specified (default), values are clipped.\n"
|
" If 'C' is specified (default), values are clipped.\n"
|
||||||
" If 'S' is specified, values are scaled.\n"
|
" If 'S' is specified, values are scaled.\n"
|
||||||
|
@ -802,7 +802,7 @@ int parse_cmdline_decoder(int argc, char **argv,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
/* ----------------------------------------------------- */
|
/* ----------------------------------------------------- */
|
||||||
case 'c': { /* Componenets */
|
case 'c': { /* Components */
|
||||||
const char* iter = opj_optarg;
|
const char* iter = opj_optarg;
|
||||||
while (1) {
|
while (1) {
|
||||||
parameters->numcomps ++;
|
parameters->numcomps ++;
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
* handle inclusion of sys/dir.h in a part that is compiled only in Apollo
|
* handle inclusion of sys/dir.h in a part that is compiled only in Apollo
|
||||||
* operating system. To fix the problem you need to insert DIR.H into
|
* operating system. To fix the problem you need to insert DIR.H into
|
||||||
* SYSINCL.DAT located in MSVC\BIN directory and restart visual C++.
|
* SYSINCL.DAT located in MSVC\BIN directory and restart visual C++.
|
||||||
* Consult manuals for more informaton about the problem.
|
* Consult manuals for more information about the problem.
|
||||||
*
|
*
|
||||||
* Since many UNIX systems have dirent.h we assume to have one also.
|
* Since many UNIX systems have dirent.h we assume to have one also.
|
||||||
* However, if your UNIX system does not have dirent.h you can download one
|
* However, if your UNIX system does not have dirent.h you can download one
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* See what kind of dirent interface we have unless autoconf has already
|
* See what kind of dirent interface we have unless autoconf has already
|
||||||
* determinated that.
|
* determined that.
|
||||||
*/
|
*/
|
||||||
#if !defined(HAVE_DIRENT_H) && !defined(HAVE_DIRECT_H) && !defined(HAVE_SYS_DIR_H) && !defined(HAVE_NDIR_H) && !defined(HAVE_SYS_NDIR_H) && !defined(HAVE_DIR_H)
|
#if !defined(HAVE_DIRENT_H) && !defined(HAVE_DIRECT_H) && !defined(HAVE_SYS_DIR_H) && !defined(HAVE_NDIR_H) && !defined(HAVE_SYS_NDIR_H) && !defined(HAVE_DIR_H)
|
||||||
# if defined(_MSC_VER) /* Microsoft C/C++ */
|
# if defined(_MSC_VER) /* Microsoft C/C++ */
|
||||||
|
@ -172,7 +172,7 @@
|
||||||
|
|
||||||
#elif defined(MSDOS) || defined(WIN32)
|
#elif defined(MSDOS) || defined(WIN32)
|
||||||
|
|
||||||
/* figure out type of underlaying directory interface to be used */
|
/* figure out type of underlying directory interface to be used */
|
||||||
# if defined(WIN32)
|
# if defined(WIN32)
|
||||||
# define DIRENT_WIN32_INTERFACE
|
# define DIRENT_WIN32_INTERFACE
|
||||||
# elif defined(MSDOS)
|
# elif defined(MSDOS)
|
||||||
|
@ -254,7 +254,7 @@ typedef struct dirent {
|
||||||
/*** Operating system specific part ***/
|
/*** Operating system specific part ***/
|
||||||
# if defined(DIRENT_WIN32_INTERFACE) /*WIN32*/
|
# if defined(DIRENT_WIN32_INTERFACE) /*WIN32*/
|
||||||
WIN32_FIND_DATA data;
|
WIN32_FIND_DATA data;
|
||||||
# elif defined(DIRENT_MSDOS_INTERFACE) /*MSDOS*/
|
# elif defined(DIRENT_MSDOS_INTERFACE) /*MS-DOS*/
|
||||||
# if defined(DIRENT_USE_FFBLK)
|
# if defined(DIRENT_USE_FFBLK)
|
||||||
struct ffblk data;
|
struct ffblk data;
|
||||||
# else
|
# else
|
||||||
|
@ -592,7 +592,7 @@ rewinddir(DIR *dirp)
|
||||||
/* re-open previous stream */
|
/* re-open previous stream */
|
||||||
if (_initdir(dirp) == 0) {
|
if (_initdir(dirp) == 0) {
|
||||||
/* initialization failed but we cannot deal with error. User will notice
|
/* initialization failed but we cannot deal with error. User will notice
|
||||||
* error later when she tries to retrieve first directory enty. */
|
* error later when she tries to retrieve first directory entry. */
|
||||||
/*EMPTY*/;
|
/*EMPTY*/;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ Server:
|
||||||
For shutting down JPIP server:
|
For shutting down JPIP server:
|
||||||
%GET http://hostname/myFCGI?quitJPIP
|
%GET http://hostname/myFCGI?quitJPIP
|
||||||
Notice, http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting)
|
Notice, http://hostname/myFCGI is the HTTP server URI (myFCGI refers to opj_server by the server setting)
|
||||||
Requst message "quitJPIP" can be changed in Makfile, modify -DQUIT_SIGNAL=\"quitJPIP\"
|
Request message "quitJPIP" can be changed in Makefile, modify -DQUIT_SIGNAL=\"quitJPIP\"
|
||||||
|
|
||||||
Client:
|
Client:
|
||||||
1. Launch image decoding server, and keep it alive as long as image viewers are open
|
1. Launch image decoding server, and keep it alive as long as image viewers are open
|
||||||
|
|
|
@ -79,7 +79,7 @@ int main(int argc, char *argv[])
|
||||||
long fsize, boxsize;
|
long fsize, boxsize;
|
||||||
|
|
||||||
if (argc < 3) {
|
if (argc < 3) {
|
||||||
fprintf(stderr, "USAGE: %s modifing.jp2 adding.xml\n", argv[0]);
|
fprintf(stderr, "USAGE: %s modifying.jp2 adding.xml\n", argv[0]);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
// Name: dialogs.cpp
|
// Name: dialogs.cpp
|
||||||
// Purpose: Common dialogs demo
|
// Purpose: Common dialogs demo
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by: ABX (2004) - adjustements for conditional building + new menu
|
// Modified by: ABX (2004) - adjustments for conditional building + new menu
|
||||||
// Created: 04/01/98
|
// Created: 04/01/98
|
||||||
// RCS-ID: $Id: dialogs.cpp,v 1.163 2006/11/04 10:57:24 VZ Exp $
|
// RCS-ID: $Id: dialogs.cpp,v 1.163 2006/11/04 10:57:24 VZ Exp $
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
|
@ -102,7 +102,7 @@
|
||||||
// Name: dialogs.cpp
|
// Name: dialogs.cpp
|
||||||
// Purpose: Common dialogs demo
|
// Purpose: Common dialogs demo
|
||||||
// Author: Julian Smart
|
// Author: Julian Smart
|
||||||
// Modified by: ABX (2004) - adjustements for conditional building + new menu
|
// Modified by: ABX (2004) - adjustments for conditional building + new menu
|
||||||
// Created: 04/01/98
|
// Created: 04/01/98
|
||||||
// RCS-ID: $Id: dialogs.cpp,v 1.163 2006/11/04 10:57:24 VZ Exp $
|
// RCS-ID: $Id: dialogs.cpp,v 1.163 2006/11/04 10:57:24 VZ Exp $
|
||||||
// Copyright: (c) Julian Smart
|
// Copyright: (c) Julian Smart
|
||||||
|
@ -157,13 +157,16 @@ bool OPJViewerApp::OnInit(void)
|
||||||
|
|
||||||
#if wxUSE_CMDLINE_PARSER
|
#if wxUSE_CMDLINE_PARSER
|
||||||
|
|
||||||
static const wxCmdLineEntryDesc cmdLineDesc[] =
|
static const wxCmdLineEntryDesc cmdLineDesc[] = {
|
||||||
{
|
{
|
||||||
{ wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("show this help message"),
|
wxCMD_LINE_SWITCH, _T("h"), _T("help"), _T("show this help message"),
|
||||||
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
|
wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP
|
||||||
|
},
|
||||||
|
|
||||||
{ wxCMD_LINE_PARAM, NULL, NULL, _T("input file"),
|
{
|
||||||
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE },
|
wxCMD_LINE_PARAM, NULL, NULL, _T("input file"),
|
||||||
|
wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_OPTIONAL | wxCMD_LINE_PARAM_MULTIPLE
|
||||||
|
},
|
||||||
|
|
||||||
{ wxCMD_LINE_NONE }
|
{ wxCMD_LINE_NONE }
|
||||||
};
|
};
|
||||||
|
@ -222,7 +225,8 @@ bool OPJViewerApp::OnInit(void)
|
||||||
OPJconfig->Read(wxT("decode/xxxframenum"), &m_framenum, (long) 0);
|
OPJconfig->Read(wxT("decode/xxxframenum"), &m_framenum, (long) 0);
|
||||||
#ifdef USE_JPWL
|
#ifdef USE_JPWL
|
||||||
OPJconfig->Read(wxT("decode/enablejpwl"), &m_enablejpwl, (bool) true);
|
OPJconfig->Read(wxT("decode/enablejpwl"), &m_enablejpwl, (bool) true);
|
||||||
OPJconfig->Read(wxT("decode/expcomps"), &m_expcomps, (long) JPWL_EXPECTED_COMPONENTS);
|
OPJconfig->Read(wxT("decode/expcomps"), &m_expcomps,
|
||||||
|
(long) JPWL_EXPECTED_COMPONENTS);
|
||||||
OPJconfig->Read(wxT("decode/maxtiles"), &m_maxtiles, (long) JPWL_MAXIMUM_TILES);
|
OPJconfig->Read(wxT("decode/maxtiles"), &m_maxtiles, (long) JPWL_MAXIMUM_TILES);
|
||||||
#endif // USE_JPWL
|
#endif // USE_JPWL
|
||||||
|
|
||||||
|
@ -239,7 +243,8 @@ bool OPJViewerApp::OnInit(void)
|
||||||
OPJconfig->Read(wxT("frameheight"), &m_frameheight, (long) OPJ_FRAME_HEIGHT);
|
OPJconfig->Read(wxT("frameheight"), &m_frameheight, (long) OPJ_FRAME_HEIGHT);
|
||||||
|
|
||||||
// load encoding engine parameters
|
// load encoding engine parameters
|
||||||
OPJconfig->Read(wxT("encode/subsampling"), &m_subsampling, (wxString) wxT("1,1"));
|
OPJconfig->Read(wxT("encode/subsampling"), &m_subsampling,
|
||||||
|
(wxString) wxT("1,1"));
|
||||||
OPJconfig->Read(wxT("encode/origin"), &m_origin, (wxString) wxT("0,0"));
|
OPJconfig->Read(wxT("encode/origin"), &m_origin, (wxString) wxT("0,0"));
|
||||||
OPJconfig->Read(wxT("encode/rates"), &m_rates, (wxString) wxT("20,10,5"));
|
OPJconfig->Read(wxT("encode/rates"), &m_rates, (wxString) wxT("20,10,5"));
|
||||||
OPJconfig->Read(wxT("encode/quality"), &m_quality, (wxString) wxT("30,35,40"));
|
OPJconfig->Read(wxT("encode/quality"), &m_quality, (wxString) wxT("30,35,40"));
|
||||||
|
@ -249,7 +254,8 @@ bool OPJViewerApp::OnInit(void)
|
||||||
OPJconfig->Read(wxT("encode/resolutions"), &m_resolutions, (int) 6);
|
OPJconfig->Read(wxT("encode/resolutions"), &m_resolutions, (int) 6);
|
||||||
OPJconfig->Read(wxT("encode/progression"), &m_progression, (int) 0);
|
OPJconfig->Read(wxT("encode/progression"), &m_progression, (int) 0);
|
||||||
OPJconfig->Read(wxT("encode/cbsize"), &m_cbsize, (wxString) wxT("32,32"));
|
OPJconfig->Read(wxT("encode/cbsize"), &m_cbsize, (wxString) wxT("32,32"));
|
||||||
OPJconfig->Read(wxT("encode/prsize"), &m_prsize, (wxString) wxT("[128,128],[128,128]"));
|
OPJconfig->Read(wxT("encode/prsize"), &m_prsize,
|
||||||
|
(wxString) wxT("[128,128],[128,128]"));
|
||||||
OPJconfig->Read(wxT("encode/tsize"), &m_tsize, (wxString) wxT(""));
|
OPJconfig->Read(wxT("encode/tsize"), &m_tsize, (wxString) wxT(""));
|
||||||
OPJconfig->Read(wxT("encode/torigin"), &m_torigin, (wxString) wxT("0,0"));
|
OPJconfig->Read(wxT("encode/torigin"), &m_torigin, (wxString) wxT("0,0"));
|
||||||
OPJconfig->Read(wxT("encode/enablesop"), &m_enablesop, (bool) false);
|
OPJconfig->Read(wxT("encode/enablesop"), &m_enablesop, (bool) false);
|
||||||
|
@ -263,19 +269,27 @@ bool OPJViewerApp::OnInit(void)
|
||||||
OPJconfig->Read(wxT("encode/enablecomm"), &m_enablecomm, (bool) true);
|
OPJconfig->Read(wxT("encode/enablecomm"), &m_enablecomm, (bool) true);
|
||||||
OPJconfig->Read(wxT("encode/enablepoc"), &m_enablepoc, (bool) false);
|
OPJconfig->Read(wxT("encode/enablepoc"), &m_enablepoc, (bool) false);
|
||||||
OPJconfig->Read(wxT("encode/comment"), &m_comment, (wxString) wxT(""));
|
OPJconfig->Read(wxT("encode/comment"), &m_comment, (wxString) wxT(""));
|
||||||
OPJconfig->Read(wxT("encode/poc"), &m_poc, (wxString) wxT("T1=0,0,1,5,3,CPRL/T1=5,0,1,6,3,CPRL"));
|
OPJconfig->Read(wxT("encode/poc"), &m_poc,
|
||||||
|
(wxString) wxT("T1=0,0,1,5,3,CPRL/T1=5,0,1,6,3,CPRL"));
|
||||||
OPJconfig->Read(wxT("encode/enableidx"), &m_enableidx, (bool) false);
|
OPJconfig->Read(wxT("encode/enableidx"), &m_enableidx, (bool) false);
|
||||||
OPJconfig->Read(wxT("encode/index"), &m_index, (wxString) wxT("index.txt"));
|
OPJconfig->Read(wxT("encode/index"), &m_index, (wxString) wxT("index.txt"));
|
||||||
#ifdef USE_JPWL
|
#ifdef USE_JPWL
|
||||||
OPJconfig->Read(wxT("encode/enablejpwl"), &m_enablejpwle, (bool) true);
|
OPJconfig->Read(wxT("encode/enablejpwl"), &m_enablejpwle, (bool) true);
|
||||||
for (n = 0; n < MYJPWL_MAX_NO_TILESPECS; n++) {
|
for (n = 0; n < MYJPWL_MAX_NO_TILESPECS; n++) {
|
||||||
OPJconfig->Read(wxT("encode/jpwl/hprotsel") + wxString::Format(wxT("%02d"), n), &m_hprotsel[n], 0);
|
OPJconfig->Read(wxT("encode/jpwl/hprotsel") + wxString::Format(wxT("%02d"), n),
|
||||||
OPJconfig->Read(wxT("encode/jpwl/htileval") + wxString::Format(wxT("%02d"), n), &m_htileval[n], 0);
|
&m_hprotsel[n], 0);
|
||||||
OPJconfig->Read(wxT("encode/jpwl/pprotsel") + wxString::Format(wxT("%02d"), n), &m_pprotsel[n], 0);
|
OPJconfig->Read(wxT("encode/jpwl/htileval") + wxString::Format(wxT("%02d"), n),
|
||||||
OPJconfig->Read(wxT("encode/jpwl/ptileval") + wxString::Format(wxT("%02d"), n), &m_ptileval[n], 0);
|
&m_htileval[n], 0);
|
||||||
OPJconfig->Read(wxT("encode/jpwl/ppackval") + wxString::Format(wxT("%02d"), n), &m_ppackval[n], 0);
|
OPJconfig->Read(wxT("encode/jpwl/pprotsel") + wxString::Format(wxT("%02d"), n),
|
||||||
OPJconfig->Read(wxT("encode/jpwl/sensisel") + wxString::Format(wxT("%02d"), n), &m_sensisel[n], 0);
|
&m_pprotsel[n], 0);
|
||||||
OPJconfig->Read(wxT("encode/jpwl/stileval") + wxString::Format(wxT("%02d"), n), &m_stileval[n], 0);
|
OPJconfig->Read(wxT("encode/jpwl/ptileval") + wxString::Format(wxT("%02d"), n),
|
||||||
|
&m_ptileval[n], 0);
|
||||||
|
OPJconfig->Read(wxT("encode/jpwl/ppackval") + wxString::Format(wxT("%02d"), n),
|
||||||
|
&m_ppackval[n], 0);
|
||||||
|
OPJconfig->Read(wxT("encode/jpwl/sensisel") + wxString::Format(wxT("%02d"), n),
|
||||||
|
&m_sensisel[n], 0);
|
||||||
|
OPJconfig->Read(wxT("encode/jpwl/stileval") + wxString::Format(wxT("%02d"), n),
|
||||||
|
&m_stileval[n], 0);
|
||||||
}
|
}
|
||||||
#endif // USE_JPWL
|
#endif // USE_JPWL
|
||||||
|
|
||||||
|
@ -444,13 +458,20 @@ int OPJViewerApp::OnExit()
|
||||||
#ifdef USE_JPWL
|
#ifdef USE_JPWL
|
||||||
OPJconfig->Write(wxT("encode/enablejpwl"), m_enablejpwle);
|
OPJconfig->Write(wxT("encode/enablejpwl"), m_enablejpwle);
|
||||||
for (n = 0; n < MYJPWL_MAX_NO_TILESPECS; n++) {
|
for (n = 0; n < MYJPWL_MAX_NO_TILESPECS; n++) {
|
||||||
OPJconfig->Write(wxT("encode/jpwl/hprotsel") + wxString::Format(wxT("%02d"), n), m_hprotsel[n]);
|
OPJconfig->Write(wxT("encode/jpwl/hprotsel") + wxString::Format(wxT("%02d"), n),
|
||||||
OPJconfig->Write(wxT("encode/jpwl/htileval") + wxString::Format(wxT("%02d"), n), m_htileval[n]);
|
m_hprotsel[n]);
|
||||||
OPJconfig->Write(wxT("encode/jpwl/pprotsel") + wxString::Format(wxT("%02d"), n), m_pprotsel[n]);
|
OPJconfig->Write(wxT("encode/jpwl/htileval") + wxString::Format(wxT("%02d"), n),
|
||||||
OPJconfig->Write(wxT("encode/jpwl/ptileval") + wxString::Format(wxT("%02d"), n), m_ptileval[n]);
|
m_htileval[n]);
|
||||||
OPJconfig->Write(wxT("encode/jpwl/ppackval") + wxString::Format(wxT("%02d"), n), m_ppackval[n]);
|
OPJconfig->Write(wxT("encode/jpwl/pprotsel") + wxString::Format(wxT("%02d"), n),
|
||||||
OPJconfig->Write(wxT("encode/jpwl/sensisel") + wxString::Format(wxT("%02d"), n), m_sensisel[n]);
|
m_pprotsel[n]);
|
||||||
OPJconfig->Write(wxT("encode/jpwl/stileval") + wxString::Format(wxT("%02d"), n), m_stileval[n]);
|
OPJconfig->Write(wxT("encode/jpwl/ptileval") + wxString::Format(wxT("%02d"), n),
|
||||||
|
m_ptileval[n]);
|
||||||
|
OPJconfig->Write(wxT("encode/jpwl/ppackval") + wxString::Format(wxT("%02d"), n),
|
||||||
|
m_ppackval[n]);
|
||||||
|
OPJconfig->Write(wxT("encode/jpwl/sensisel") + wxString::Format(wxT("%02d"), n),
|
||||||
|
m_sensisel[n]);
|
||||||
|
OPJconfig->Write(wxT("encode/jpwl/stileval") + wxString::Format(wxT("%02d"), n),
|
||||||
|
m_stileval[n]);
|
||||||
}
|
}
|
||||||
#endif // USE_JPWL
|
#endif // USE_JPWL
|
||||||
|
|
||||||
|
@ -503,7 +524,8 @@ BEGIN_EVENT_TABLE(OPJFrame, wxMDIParentFrame)
|
||||||
EVT_MENU(OPJFRAME_FILETOGGLET, OPJFrame::OnToggleToolbar)
|
EVT_MENU(OPJFRAME_FILETOGGLET, OPJFrame::OnToggleToolbar)
|
||||||
EVT_MENU(OPJFRAME_SETSENCO, OPJFrame::OnSetsEnco)
|
EVT_MENU(OPJFRAME_SETSENCO, OPJFrame::OnSetsEnco)
|
||||||
EVT_MENU(OPJFRAME_SETSDECO, OPJFrame::OnSetsDeco)
|
EVT_MENU(OPJFRAME_SETSDECO, OPJFrame::OnSetsDeco)
|
||||||
EVT_SASH_DRAGGED_RANGE(OPJFRAME_BROWSEWIN, OPJFRAME_LOGWIN, OPJFrame::OnSashDrag)
|
EVT_SASH_DRAGGED_RANGE(OPJFRAME_BROWSEWIN, OPJFRAME_LOGWIN,
|
||||||
|
OPJFrame::OnSashDrag)
|
||||||
EVT_NOTEBOOK_PAGE_CHANGED(LEFT_NOTEBOOK_ID, OPJFrame::OnNotebook)
|
EVT_NOTEBOOK_PAGE_CHANGED(LEFT_NOTEBOOK_ID, OPJFrame::OnNotebook)
|
||||||
EVT_MENU(OPJFRAME_THREADLOGMSG, OPJFrame::OnThreadLogmsg)
|
EVT_MENU(OPJFRAME_THREADLOGMSG, OPJFrame::OnThreadLogmsg)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
@ -534,10 +556,12 @@ OPJFrame::OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
file_menu->AppendSeparator();
|
file_menu->AppendSeparator();
|
||||||
|
|
||||||
file_menu->Append(OPJFRAME_FILETOGGLEB, wxT("Toggle &browser\tCtrl+B"));
|
file_menu->Append(OPJFRAME_FILETOGGLEB, wxT("Toggle &browser\tCtrl+B"));
|
||||||
file_menu->SetHelpString(OPJFRAME_FILETOGGLEB, wxT("Toggle the left browsing pane"));
|
file_menu->SetHelpString(OPJFRAME_FILETOGGLEB,
|
||||||
|
wxT("Toggle the left browsing pane"));
|
||||||
|
|
||||||
file_menu->Append(OPJFRAME_FILETOGGLEP, wxT("Toggle &peeker\tCtrl+P"));
|
file_menu->Append(OPJFRAME_FILETOGGLEP, wxT("Toggle &peeker\tCtrl+P"));
|
||||||
file_menu->SetHelpString(OPJFRAME_FILETOGGLEP, wxT("Toggle the bottom peeking pane"));
|
file_menu->SetHelpString(OPJFRAME_FILETOGGLEP,
|
||||||
|
wxT("Toggle the bottom peeking pane"));
|
||||||
|
|
||||||
file_menu->Append(OPJFRAME_FILETOGGLET, wxT("Toggle &toolbar\tCtrl+T"));
|
file_menu->Append(OPJFRAME_FILETOGGLET, wxT("Toggle &toolbar\tCtrl+T"));
|
||||||
file_menu->SetHelpString(OPJFRAME_FILETOGGLET, wxT("Toggle the toolbar"));
|
file_menu->SetHelpString(OPJFRAME_FILETOGGLET, wxT("Toggle the toolbar"));
|
||||||
|
@ -642,30 +666,38 @@ OPJFrame::OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpZoom = wxArtProvider::GetBitmap(wxART_FIND, wxART_TOOLBAR,
|
wxBitmap bmpZoom = wxArtProvider::GetBitmap(wxART_FIND, wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpFit = wxArtProvider::GetBitmap(wxART_FIND_AND_REPLACE, wxART_TOOLBAR,
|
wxBitmap bmpFit = wxArtProvider::GetBitmap(wxART_FIND_AND_REPLACE,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpReload = wxArtProvider::GetBitmap(wxART_EXECUTABLE_FILE, wxART_TOOLBAR,
|
wxBitmap bmpReload = wxArtProvider::GetBitmap(wxART_EXECUTABLE_FILE,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpDecosettings = wxArtProvider::GetBitmap(wxART_REPORT_VIEW, wxART_TOOLBAR,
|
wxBitmap bmpDecosettings = wxArtProvider::GetBitmap(wxART_REPORT_VIEW,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpEncosettings = wxArtProvider::GetBitmap(wxART_LIST_VIEW, wxART_TOOLBAR,
|
wxBitmap bmpEncosettings = wxArtProvider::GetBitmap(wxART_LIST_VIEW,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpPrevframe = wxArtProvider::GetBitmap(wxART_GO_BACK, wxART_TOOLBAR,
|
wxBitmap bmpPrevframe = wxArtProvider::GetBitmap(wxART_GO_BACK, wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpHomeframe = wxArtProvider::GetBitmap(wxART_GO_HOME, wxART_TOOLBAR,
|
wxBitmap bmpHomeframe = wxArtProvider::GetBitmap(wxART_GO_HOME, wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpNextframe = wxArtProvider::GetBitmap(wxART_GO_FORWARD, wxART_TOOLBAR,
|
wxBitmap bmpNextframe = wxArtProvider::GetBitmap(wxART_GO_FORWARD,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpLesslayers = bmpPrevframe;
|
wxBitmap bmpLesslayers = bmpPrevframe;
|
||||||
wxBitmap bmpAlllayers = wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_TOOLBAR,
|
wxBitmap bmpAlllayers = wxArtProvider::GetBitmap(wxART_GO_TO_PARENT,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpMorelayers = bmpNextframe;
|
wxBitmap bmpMorelayers = bmpNextframe;
|
||||||
wxBitmap bmpLessres = bmpPrevframe;
|
wxBitmap bmpLessres = bmpPrevframe;
|
||||||
wxBitmap bmpFullres = wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_TOOLBAR,
|
wxBitmap bmpFullres = wxArtProvider::GetBitmap(wxART_GO_TO_PARENT,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpMoreres = bmpNextframe;
|
wxBitmap bmpMoreres = bmpNextframe;
|
||||||
wxBitmap bmpPrevcomp = bmpPrevframe;
|
wxBitmap bmpPrevcomp = bmpPrevframe;
|
||||||
wxBitmap bmpAllcomps = wxArtProvider::GetBitmap(wxART_GO_TO_PARENT, wxART_TOOLBAR,
|
wxBitmap bmpAllcomps = wxArtProvider::GetBitmap(wxART_GO_TO_PARENT,
|
||||||
|
wxART_TOOLBAR,
|
||||||
wxDefaultSize);
|
wxDefaultSize);
|
||||||
wxBitmap bmpNextcomp = bmpNextframe;
|
wxBitmap bmpNextcomp = bmpNextframe;
|
||||||
|
|
||||||
|
@ -684,15 +716,19 @@ OPJFrame::OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWHOMEFRAME, bmpHomeframe, wxT("Starting frame"));
|
tool_bar->AddTool(OPJFRAME_VIEWHOMEFRAME, bmpHomeframe, wxT("Starting frame"));
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWNEXTFRAME, bmpNextframe, wxT("Next frame"));
|
tool_bar->AddTool(OPJFRAME_VIEWNEXTFRAME, bmpNextframe, wxT("Next frame"));
|
||||||
tool_bar->AddSeparator();
|
tool_bar->AddSeparator();
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWLESSLAYERS, bmpLesslayers, wxT("Remove a layer"));
|
tool_bar->AddTool(OPJFRAME_VIEWLESSLAYERS, bmpLesslayers,
|
||||||
|
wxT("Remove a layer"));
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWALLLAYERS, bmpAlllayers, wxT("Show all layers"));
|
tool_bar->AddTool(OPJFRAME_VIEWALLLAYERS, bmpAlllayers, wxT("Show all layers"));
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWMORELAYERS, bmpMorelayers, wxT("Add a layer"));
|
tool_bar->AddTool(OPJFRAME_VIEWMORELAYERS, bmpMorelayers, wxT("Add a layer"));
|
||||||
tool_bar->AddSeparator();
|
tool_bar->AddSeparator();
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWLESSRES, bmpLessres, wxT("Reduce the resolution"));
|
tool_bar->AddTool(OPJFRAME_VIEWLESSRES, bmpLessres,
|
||||||
|
wxT("Reduce the resolution"));
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWFULLRES, bmpFullres, wxT("Full resolution"));
|
tool_bar->AddTool(OPJFRAME_VIEWFULLRES, bmpFullres, wxT("Full resolution"));
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWMORERES, bmpMoreres, wxT("Increase the resolution"));
|
tool_bar->AddTool(OPJFRAME_VIEWMORERES, bmpMoreres,
|
||||||
|
wxT("Increase the resolution"));
|
||||||
tool_bar->AddSeparator();
|
tool_bar->AddSeparator();
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWPREVCOMP, bmpPrevcomp, wxT("Previous component"));
|
tool_bar->AddTool(OPJFRAME_VIEWPREVCOMP, bmpPrevcomp,
|
||||||
|
wxT("Previous component"));
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWALLCOMPS, bmpAllcomps, wxT("All components"));
|
tool_bar->AddTool(OPJFRAME_VIEWALLCOMPS, bmpAllcomps, wxT("All components"));
|
||||||
tool_bar->AddTool(OPJFRAME_VIEWNEXTCOMP, bmpNextcomp, wxT("Next component"));
|
tool_bar->AddTool(OPJFRAME_VIEWNEXTCOMP, bmpNextcomp, wxT("Next component"));
|
||||||
tool_bar->Realize();
|
tool_bar->Realize();
|
||||||
|
@ -701,10 +737,11 @@ OPJFrame::OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
SetToolBar(tool_bar);
|
SetToolBar(tool_bar);
|
||||||
|
|
||||||
// show the toolbar?
|
// show the toolbar?
|
||||||
if (!wxGetApp().m_showtoolbar)
|
if (!wxGetApp().m_showtoolbar) {
|
||||||
tool_bar->Show(false);
|
tool_bar->Show(false);
|
||||||
else
|
} else {
|
||||||
tool_bar->Show(true);
|
tool_bar->Show(true);
|
||||||
|
}
|
||||||
|
|
||||||
// the logging window
|
// the logging window
|
||||||
loggingWindow = new wxSashLayoutWindow(this, OPJFRAME_LOGWIN,
|
loggingWindow = new wxSashLayoutWindow(this, OPJFRAME_LOGWIN,
|
||||||
|
@ -718,10 +755,11 @@ OPJFrame::OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
loggingWindow->SetSashVisible(wxSASH_TOP, true);
|
loggingWindow->SetSashVisible(wxSASH_TOP, true);
|
||||||
|
|
||||||
// show the logging?
|
// show the logging?
|
||||||
if (!wxGetApp().m_showpeeker)
|
if (!wxGetApp().m_showpeeker) {
|
||||||
loggingWindow->Show(false);
|
loggingWindow->Show(false);
|
||||||
else
|
} else {
|
||||||
loggingWindow->Show(true);
|
loggingWindow->Show(true);
|
||||||
|
}
|
||||||
|
|
||||||
// create the bottom notebook
|
// create the bottom notebook
|
||||||
m_bookCtrlbottom = new wxNotebook(loggingWindow, BOTTOM_NOTEBOOK_ID,
|
m_bookCtrlbottom = new wxNotebook(loggingWindow, BOTTOM_NOTEBOOK_ID,
|
||||||
|
@ -745,7 +783,8 @@ OPJFrame::OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
);
|
);
|
||||||
wxFont *browsefont = new wxFont(wxNORMAL_FONT->GetPointSize(),
|
wxFont *browsefont = new wxFont(wxNORMAL_FONT->GetPointSize(),
|
||||||
wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
wxFONTFAMILY_TELETYPE, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
|
||||||
m_textCtrlbrowse->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour, *browsefont));
|
m_textCtrlbrowse->SetDefaultStyle(wxTextAttr(wxNullColour, wxNullColour,
|
||||||
|
*browsefont));
|
||||||
m_textCtrlbrowse->AppendText(wxT("Browsing window\n"));
|
m_textCtrlbrowse->AppendText(wxT("Browsing window\n"));
|
||||||
|
|
||||||
// add it the notebook
|
// add it the notebook
|
||||||
|
@ -769,10 +808,11 @@ OPJFrame::OPJFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
||||||
wxBK_TOP);
|
wxBK_TOP);
|
||||||
|
|
||||||
// show the browser?
|
// show the browser?
|
||||||
if (!wxGetApp().m_showbrowser)
|
if (!wxGetApp().m_showbrowser) {
|
||||||
markerTreeWindow->Show(false);
|
markerTreeWindow->Show(false);
|
||||||
else
|
} else {
|
||||||
markerTreeWindow->Show(true);
|
markerTreeWindow->Show(true);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __WXMOTIF__
|
#ifdef __WXMOTIF__
|
||||||
// For some reason, we get a memcpy crash in wxLogStream::DoLogStream
|
// For some reason, we get a memcpy crash in wxLogStream::DoLogStream
|
||||||
|
@ -819,8 +859,9 @@ void OPJFrame::OnNotebook(wxNotebookEvent& event)
|
||||||
|
|
||||||
m_bookCtrl->GetPageText(sel).ToLong(&childnum);
|
m_bookCtrl->GetPageText(sel).ToLong(&childnum);
|
||||||
|
|
||||||
if (m_childhash[childnum])
|
if (m_childhash[childnum]) {
|
||||||
m_childhash[childnum]->Activate();
|
m_childhash[childnum]->Activate();
|
||||||
|
}
|
||||||
|
|
||||||
//wxLogMessage(wxT("Selection changed (now %d --> %d)"), childnum, m_childhash[childnum]->m_winnumber);
|
//wxLogMessage(wxT("Selection changed (now %d --> %d)"), childnum, m_childhash[childnum]->m_winnumber);
|
||||||
|
|
||||||
|
@ -916,8 +957,9 @@ void OPJFrame::OnClose(wxCommandEvent& WXUNUSED(event))
|
||||||
// current frame
|
// current frame
|
||||||
OPJChildFrame *currframe = (OPJChildFrame *) GetActiveChild();
|
OPJChildFrame *currframe = (OPJChildFrame *) GetActiveChild();
|
||||||
|
|
||||||
if (!currframe)
|
if (!currframe) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
wxCloseEvent e;
|
wxCloseEvent e;
|
||||||
currframe->OnClose(e);
|
currframe->OnClose(e);
|
||||||
|
@ -938,8 +980,9 @@ void OPJFrame::OnFit(wxCommandEvent& event)
|
||||||
}
|
}
|
||||||
|
|
||||||
// problems
|
// problems
|
||||||
if (!currchild)
|
if (!currchild) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// current canvas
|
// current canvas
|
||||||
OPJCanvas *currcanvas = currchild->m_canvas;
|
OPJCanvas *currcanvas = currchild->m_canvas;
|
||||||
|
@ -960,8 +1003,9 @@ void OPJFrame::OnZoom(wxCommandEvent& WXUNUSED(event))
|
||||||
// current frame
|
// current frame
|
||||||
OPJChildFrame *currframe = (OPJChildFrame *) GetActiveChild();
|
OPJChildFrame *currframe = (OPJChildFrame *) GetActiveChild();
|
||||||
|
|
||||||
if (!currframe)
|
if (!currframe) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// get the preferred zoom
|
// get the preferred zoom
|
||||||
long zooml = wxGetNumberFromUser(wxT("Choose a scale between 5% and 300%"),
|
long zooml = wxGetNumberFromUser(wxT("Choose a scale between 5% and 300%"),
|
||||||
|
@ -992,8 +1036,10 @@ void OPJFrame::Rescale(int zooml, OPJChildFrame *currframe)
|
||||||
int wzooml, hzooml;
|
int wzooml, hzooml;
|
||||||
//wxSize clientsize = currframe->m_canvas->GetClientSize();
|
//wxSize clientsize = currframe->m_canvas->GetClientSize();
|
||||||
wxSize clientsize = currframe->m_frame->GetActiveChild()->GetClientSize();
|
wxSize clientsize = currframe->m_frame->GetActiveChild()->GetClientSize();
|
||||||
wzooml = (int) floor(100.0 * (double) clientsize.GetWidth() / (double) (2 * OPJ_CANVAS_BORDER + currframe->m_canvas->m_image100.GetWidth()));
|
wzooml = (int) floor(100.0 * (double) clientsize.GetWidth() / (double)(
|
||||||
hzooml = (int) floor(100.0 * (double) clientsize.GetHeight() / (double) (2 * OPJ_CANVAS_BORDER + currframe->m_canvas->m_image100.GetHeight()));
|
2 * OPJ_CANVAS_BORDER + currframe->m_canvas->m_image100.GetWidth()));
|
||||||
|
hzooml = (int) floor(100.0 * (double) clientsize.GetHeight() / (double)(
|
||||||
|
2 * OPJ_CANVAS_BORDER + currframe->m_canvas->m_image100.GetHeight()));
|
||||||
zooml = wxMin(100, wxMin(wzooml, hzooml));
|
zooml = wxMin(100, wxMin(wzooml, hzooml));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1025,10 +1071,11 @@ void OPJFrame::OnReload(wxCommandEvent& event)
|
||||||
if (currframe) {
|
if (currframe) {
|
||||||
OPJDecoThread *dthread = currframe->m_canvas->CreateDecoThread();
|
OPJDecoThread *dthread = currframe->m_canvas->CreateDecoThread();
|
||||||
|
|
||||||
if (dthread->Run() != wxTHREAD_NO_ERROR)
|
if (dthread->Run() != wxTHREAD_NO_ERROR) {
|
||||||
wxLogMessage(wxT("Can't start deco thread!"));
|
wxLogMessage(wxT("Can't start deco thread!"));
|
||||||
else
|
} else {
|
||||||
wxLogMessage(wxT("New deco thread started."));
|
wxLogMessage(wxT("New deco thread started."));
|
||||||
|
}
|
||||||
|
|
||||||
currframe->m_canvas->Refresh();
|
currframe->m_canvas->Refresh();
|
||||||
|
|
||||||
|
@ -1039,8 +1086,9 @@ void OPJFrame::OnReload(wxCommandEvent& event)
|
||||||
|
|
||||||
void OPJFrame::OnPrevFrame(wxCommandEvent& event)
|
void OPJFrame::OnPrevFrame(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if (--wxGetApp().m_framenum < 0)
|
if (--wxGetApp().m_framenum < 0) {
|
||||||
wxGetApp().m_framenum = 0;
|
wxGetApp().m_framenum = 0;
|
||||||
|
}
|
||||||
|
|
||||||
wxCommandEvent e;
|
wxCommandEvent e;
|
||||||
OnReload(e);
|
OnReload(e);
|
||||||
|
@ -1064,8 +1112,9 @@ void OPJFrame::OnNextFrame(wxCommandEvent& event)
|
||||||
|
|
||||||
void OPJFrame::OnLessLayers(wxCommandEvent& event)
|
void OPJFrame::OnLessLayers(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if (--wxGetApp().m_qualitylayers < 1)
|
if (--wxGetApp().m_qualitylayers < 1) {
|
||||||
wxGetApp().m_qualitylayers = 1;
|
wxGetApp().m_qualitylayers = 1;
|
||||||
|
}
|
||||||
|
|
||||||
wxCommandEvent e;
|
wxCommandEvent e;
|
||||||
OnReload(e);
|
OnReload(e);
|
||||||
|
@ -1105,8 +1154,9 @@ void OPJFrame::OnFullRes(wxCommandEvent& event)
|
||||||
|
|
||||||
void OPJFrame::OnMoreRes(wxCommandEvent& event)
|
void OPJFrame::OnMoreRes(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if (--wxGetApp().m_reducefactor < 0)
|
if (--wxGetApp().m_reducefactor < 0) {
|
||||||
wxGetApp().m_reducefactor = 0;
|
wxGetApp().m_reducefactor = 0;
|
||||||
|
}
|
||||||
|
|
||||||
wxCommandEvent e;
|
wxCommandEvent e;
|
||||||
OnReload(e);
|
OnReload(e);
|
||||||
|
@ -1114,8 +1164,9 @@ void OPJFrame::OnMoreRes(wxCommandEvent& event)
|
||||||
|
|
||||||
void OPJFrame::OnPrevComp(wxCommandEvent& event)
|
void OPJFrame::OnPrevComp(wxCommandEvent& event)
|
||||||
{
|
{
|
||||||
if (--wxGetApp().m_components < 1)
|
if (--wxGetApp().m_components < 1) {
|
||||||
wxGetApp().m_components = 1;
|
wxGetApp().m_components = 1;
|
||||||
|
}
|
||||||
|
|
||||||
wxCommandEvent e;
|
wxCommandEvent e;
|
||||||
OnReload(e);
|
OnReload(e);
|
||||||
|
@ -1139,10 +1190,11 @@ void OPJFrame::OnNextComp(wxCommandEvent& event)
|
||||||
|
|
||||||
void OPJFrame::OnToggleBrowser(wxCommandEvent& WXUNUSED(event))
|
void OPJFrame::OnToggleBrowser(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (markerTreeWindow->IsShown())
|
if (markerTreeWindow->IsShown()) {
|
||||||
markerTreeWindow->Show(false);
|
markerTreeWindow->Show(false);
|
||||||
else
|
} else {
|
||||||
markerTreeWindow->Show(true);
|
markerTreeWindow->Show(true);
|
||||||
|
}
|
||||||
|
|
||||||
wxLayoutAlgorithm layout;
|
wxLayoutAlgorithm layout;
|
||||||
layout.LayoutMDIFrame(this);
|
layout.LayoutMDIFrame(this);
|
||||||
|
@ -1155,10 +1207,11 @@ void OPJFrame::OnToggleBrowser(wxCommandEvent& WXUNUSED(event))
|
||||||
|
|
||||||
void OPJFrame::OnTogglePeeker(wxCommandEvent& WXUNUSED(event))
|
void OPJFrame::OnTogglePeeker(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (loggingWindow->IsShown())
|
if (loggingWindow->IsShown()) {
|
||||||
loggingWindow->Show(false);
|
loggingWindow->Show(false);
|
||||||
else
|
} else {
|
||||||
loggingWindow->Show(true);
|
loggingWindow->Show(true);
|
||||||
|
}
|
||||||
|
|
||||||
wxLayoutAlgorithm layout;
|
wxLayoutAlgorithm layout;
|
||||||
layout.LayoutMDIFrame(this);
|
layout.LayoutMDIFrame(this);
|
||||||
|
@ -1171,10 +1224,11 @@ void OPJFrame::OnTogglePeeker(wxCommandEvent& WXUNUSED(event))
|
||||||
|
|
||||||
void OPJFrame::OnToggleToolbar(wxCommandEvent& WXUNUSED(event))
|
void OPJFrame::OnToggleToolbar(wxCommandEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (tool_bar->IsShown())
|
if (tool_bar->IsShown()) {
|
||||||
tool_bar->Show(false);
|
tool_bar->Show(false);
|
||||||
else
|
} else {
|
||||||
tool_bar->Show(true);
|
tool_bar->Show(true);
|
||||||
|
}
|
||||||
|
|
||||||
wxLayoutAlgorithm layout;
|
wxLayoutAlgorithm layout;
|
||||||
layout.LayoutMDIFrame(this);
|
layout.LayoutMDIFrame(this);
|
||||||
|
@ -1189,17 +1243,16 @@ void OPJFrame::OnSashDrag(wxSashEvent& event)
|
||||||
{
|
{
|
||||||
int wid, hei;
|
int wid, hei;
|
||||||
|
|
||||||
if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE)
|
if (event.GetDragStatus() == wxSASH_STATUS_OUT_OF_RANGE) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch (event.GetId()) {
|
switch (event.GetId()) {
|
||||||
case OPJFRAME_BROWSEWIN:
|
case OPJFRAME_BROWSEWIN: {
|
||||||
{
|
|
||||||
markerTreeWindow->SetDefaultSize(wxSize(event.GetDragRect().width, 1000));
|
markerTreeWindow->SetDefaultSize(wxSize(event.GetDragRect().width, 1000));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case OPJFRAME_LOGWIN:
|
case OPJFRAME_LOGWIN: {
|
||||||
{
|
|
||||||
loggingWindow->SetDefaultSize(wxSize(1000, event.GetDragRect().height));
|
loggingWindow->SetDefaultSize(wxSize(1000, event.GetDragRect().height));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1227,8 +1280,7 @@ void OPJFrame::OnThreadLogmsg(wxCommandEvent& event)
|
||||||
wxLogMessage(event.GetString());
|
wxLogMessage(event.GetString());
|
||||||
#else
|
#else
|
||||||
int n = event.GetInt();
|
int n = event.GetInt();
|
||||||
if ( n == -1 )
|
if (n == -1) {
|
||||||
{
|
|
||||||
m_dlgProgress->Destroy();
|
m_dlgProgress->Destroy();
|
||||||
m_dlgProgress = (wxProgressDialog *)NULL;
|
m_dlgProgress = (wxProgressDialog *)NULL;
|
||||||
|
|
||||||
|
@ -1236,11 +1288,8 @@ void OPJFrame::OnThreadLogmsg(wxCommandEvent& event)
|
||||||
// we may need to wake up the main event loop for the dialog to be
|
// we may need to wake up the main event loop for the dialog to be
|
||||||
// really closed
|
// really closed
|
||||||
wxWakeUpIdle();
|
wxWakeUpIdle();
|
||||||
}
|
} else {
|
||||||
else
|
if (!m_dlgProgress->Update(n)) {
|
||||||
{
|
|
||||||
if ( !m_dlgProgress->Update(n) )
|
|
||||||
{
|
|
||||||
wxCriticalSectionLocker lock(m_critsectWork);
|
wxCriticalSectionLocker lock(m_critsectWork);
|
||||||
|
|
||||||
m_cancelled = true;
|
m_cancelled = true;
|
||||||
|
@ -1258,11 +1307,13 @@ void OPJFrame::SaveFile(wxArrayString paths, wxArrayString filenames)
|
||||||
|
|
||||||
if (wxFile::Exists(paths[0].c_str())) {
|
if (wxFile::Exists(paths[0].c_str())) {
|
||||||
|
|
||||||
s.Printf(wxT("File %s already exists. Do you want to overwrite it?\n"), filenames[0].c_str());
|
s.Printf(wxT("File %s already exists. Do you want to overwrite it?\n"),
|
||||||
|
filenames[0].c_str());
|
||||||
wxMessageDialog dialog3(this, s, _T("File exists"), wxYES_NO);
|
wxMessageDialog dialog3(this, s, _T("File exists"), wxYES_NO);
|
||||||
if (dialog3.ShowModal() == wxID_NO)
|
if (dialog3.ShowModal() == wxID_NO) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*s.Printf(_T("File %d: %s (%s)\n"), (int)0, paths[0].c_str(), filenames[0].c_str());
|
/*s.Printf(_T("File %d: %s (%s)\n"), (int)0, paths[0].c_str(), filenames[0].c_str());
|
||||||
msg += s;
|
msg += s;
|
||||||
|
@ -1270,17 +1321,20 @@ void OPJFrame::SaveFile(wxArrayString paths, wxArrayString filenames)
|
||||||
wxMessageDialog dialog2(this, msg, _T("Selected files"));
|
wxMessageDialog dialog2(this, msg, _T("Selected files"));
|
||||||
dialog2.ShowModal();*/
|
dialog2.ShowModal();*/
|
||||||
|
|
||||||
if (!GetActiveChild())
|
if (!GetActiveChild()) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
((OPJChildFrame *) GetActiveChild())->m_canvas->m_savename = paths[0];
|
((OPJChildFrame *) GetActiveChild())->m_canvas->m_savename = paths[0];
|
||||||
|
|
||||||
OPJEncoThread *ethread = ((OPJChildFrame *) GetActiveChild())->m_canvas->CreateEncoThread();
|
OPJEncoThread *ethread = ((OPJChildFrame *)
|
||||||
|
GetActiveChild())->m_canvas->CreateEncoThread();
|
||||||
|
|
||||||
if (ethread->Run() != wxTHREAD_NO_ERROR)
|
if (ethread->Run() != wxTHREAD_NO_ERROR) {
|
||||||
wxLogMessage(wxT("Can't start enco thread!"));
|
wxLogMessage(wxT("Can't start enco thread!"));
|
||||||
else
|
} else {
|
||||||
wxLogMessage(wxT("New enco thread started."));
|
wxLogMessage(wxT("New enco thread started."));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1293,7 +1347,8 @@ void OPJFrame::OpenFiles(wxArrayString paths, wxArrayString filenames)
|
||||||
for (size_t n = 0; n < count; n++) {
|
for (size_t n = 0; n < count; n++) {
|
||||||
|
|
||||||
wxString msg, s;
|
wxString msg, s;
|
||||||
s.Printf(_T("File %d: %s (%s)\n"), (int)n, paths[n].c_str(), filenames[n].c_str());
|
s.Printf(_T("File %d: %s (%s)\n"), (int)n, paths[n].c_str(),
|
||||||
|
filenames[n].c_str());
|
||||||
|
|
||||||
msg += s;
|
msg += s;
|
||||||
|
|
||||||
|
@ -1311,12 +1366,14 @@ void OPJFrame::OpenFiles(wxArrayString paths, wxArrayString filenames)
|
||||||
m_childhash[winNumber] = subframe;
|
m_childhash[winNumber] = subframe;
|
||||||
|
|
||||||
// create own marker tree
|
// create own marker tree
|
||||||
m_treehash[winNumber] = new OPJMarkerTree(m_bookCtrl, subframe, paths[n], wxT("Parsing..."), TreeTest_Ctrl,
|
m_treehash[winNumber] = new OPJMarkerTree(m_bookCtrl, subframe, paths[n],
|
||||||
|
wxT("Parsing..."), TreeTest_Ctrl,
|
||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxTR_DEFAULT_STYLE | wxSUNKEN_BORDER
|
wxTR_DEFAULT_STYLE | wxSUNKEN_BORDER
|
||||||
);
|
);
|
||||||
|
|
||||||
m_bookCtrl->AddPage(m_treehash[winNumber], wxString::Format(wxT("%u"), winNumber), false);
|
m_bookCtrl->AddPage(m_treehash[winNumber], wxString::Format(wxT("%u"),
|
||||||
|
winNumber), false);
|
||||||
|
|
||||||
for (unsigned int p = 0; p < m_bookCtrl->GetPageCount(); p++) {
|
for (unsigned int p = 0; p < m_bookCtrl->GetPageCount(); p++) {
|
||||||
if (m_bookCtrl->GetPageText(p) == wxString::Format(wxT("%u"), winNumber)) {
|
if (m_bookCtrl->GetPageText(p) == wxString::Format(wxT("%u"), winNumber)) {
|
||||||
|
@ -1403,7 +1460,8 @@ void OPJFrame::OnMemoryOpen(wxCommandEvent& WXUNUSED(event))
|
||||||
// do nothing
|
// do nothing
|
||||||
return;
|
return;
|
||||||
|
|
||||||
wxTextEntryDialog dialog(this, wxT("Memory HEX address range: start_address-stop_address"),
|
wxTextEntryDialog dialog(this,
|
||||||
|
wxT("Memory HEX address range: start_address-stop_address"),
|
||||||
wxT("Decode a memory buffer"),
|
wxT("Decode a memory buffer"),
|
||||||
wxT("0x-0x"),
|
wxT("0x-0x"),
|
||||||
wxOK | wxCANCEL | wxCENTRE,
|
wxOK | wxCANCEL | wxCENTRE,
|
||||||
|
@ -1421,7 +1479,8 @@ BEGIN_EVENT_TABLE(OPJCanvas, wxScrolledWindow)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
// Define a constructor for my canvas
|
// Define a constructor for my canvas
|
||||||
OPJCanvas::OPJCanvas(wxFileName fname, wxWindow *parent, const wxPoint& pos, const wxSize& size)
|
OPJCanvas::OPJCanvas(wxFileName fname, wxWindow *parent, const wxPoint& pos,
|
||||||
|
const wxSize& size)
|
||||||
: wxScrolledWindow(parent, wxID_ANY, pos, size,
|
: wxScrolledWindow(parent, wxID_ANY, pos, size,
|
||||||
wxSUNKEN_BORDER | wxNO_FULL_REPAINT_ON_RESIZE)
|
wxSUNKEN_BORDER | wxNO_FULL_REPAINT_ON_RESIZE)
|
||||||
{
|
{
|
||||||
|
@ -1435,10 +1494,11 @@ OPJCanvas::OPJCanvas(wxFileName fname, wxWindow *parent, const wxPoint& pos, con
|
||||||
|
|
||||||
OPJDecoThread *dthread = CreateDecoThread();
|
OPJDecoThread *dthread = CreateDecoThread();
|
||||||
|
|
||||||
if (dthread->Run() != wxTHREAD_NO_ERROR)
|
if (dthread->Run() != wxTHREAD_NO_ERROR) {
|
||||||
wxLogMessage(wxT("Can't start deco thread!"));
|
wxLogMessage(wxT("Can't start deco thread!"));
|
||||||
else
|
} else {
|
||||||
wxLogMessage(wxT("New deco thread started."));
|
wxLogMessage(wxT("New deco thread started."));
|
||||||
|
}
|
||||||
|
|
||||||
// 100% zoom
|
// 100% zoom
|
||||||
//m_zooml = 100;
|
//m_zooml = 100;
|
||||||
|
@ -1449,8 +1509,9 @@ OPJDecoThread *OPJCanvas::CreateDecoThread(void)
|
||||||
{
|
{
|
||||||
OPJDecoThread *dthread = new OPJDecoThread(this);
|
OPJDecoThread *dthread = new OPJDecoThread(this);
|
||||||
|
|
||||||
if (dthread->Create() != wxTHREAD_NO_ERROR)
|
if (dthread->Create() != wxTHREAD_NO_ERROR) {
|
||||||
wxLogError(wxT("Can't create deco thread!"));
|
wxLogError(wxT("Can't create deco thread!"));
|
||||||
|
}
|
||||||
|
|
||||||
wxCriticalSectionLocker enter(wxGetApp().m_deco_critsect);
|
wxCriticalSectionLocker enter(wxGetApp().m_deco_critsect);
|
||||||
wxGetApp().m_deco_threads.Add(dthread);
|
wxGetApp().m_deco_threads.Add(dthread);
|
||||||
|
@ -1462,8 +1523,9 @@ OPJEncoThread *OPJCanvas::CreateEncoThread(void)
|
||||||
{
|
{
|
||||||
OPJEncoThread *ethread = new OPJEncoThread(this);
|
OPJEncoThread *ethread = new OPJEncoThread(this);
|
||||||
|
|
||||||
if (ethread->Create() != wxTHREAD_NO_ERROR)
|
if (ethread->Create() != wxTHREAD_NO_ERROR) {
|
||||||
wxLogError(wxT("Can't create enco thread!"));
|
wxLogError(wxT("Can't create enco thread!"));
|
||||||
|
}
|
||||||
|
|
||||||
wxCriticalSectionLocker enter(wxGetApp().m_enco_critsect);
|
wxCriticalSectionLocker enter(wxGetApp().m_enco_critsect);
|
||||||
wxGetApp().m_enco_threads.Add(ethread);
|
wxGetApp().m_enco_threads.Add(ethread);
|
||||||
|
@ -1483,15 +1545,19 @@ void OPJCanvas::OnDraw(wxDC& dc)
|
||||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||||
//int tw, th;
|
//int tw, th;
|
||||||
dc.DrawRectangle(OPJ_CANVAS_BORDER, OPJ_CANVAS_BORDER,
|
dc.DrawRectangle(OPJ_CANVAS_BORDER, OPJ_CANVAS_BORDER,
|
||||||
(unsigned long int) (0.5 + (double) m_zooml * (double) m_childframe->m_twidth / 100.0),
|
(unsigned long int)(0.5 + (double) m_zooml * (double) m_childframe->m_twidth /
|
||||||
(unsigned long int) (0.5 + (double) m_zooml * (double) m_childframe->m_theight / 100.0));
|
100.0),
|
||||||
|
(unsigned long int)(0.5 + (double) m_zooml * (double) m_childframe->m_theight /
|
||||||
|
100.0));
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
dc.SetFont(*wxSWISS_FONT);
|
dc.SetFont(*wxSWISS_FONT);
|
||||||
dc.SetPen(*wxBLACK_PEN);
|
dc.SetPen(*wxBLACK_PEN);
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
dc.DrawText(_T("Decoding image, please wait... (press \"Zoom to Fit\" to show the image)"), 40, 50);
|
dc.DrawText(
|
||||||
|
_T("Decoding image, please wait... (press \"Zoom to Fit\" to show the image)"),
|
||||||
|
40, 50);
|
||||||
#else
|
#else
|
||||||
dc.DrawText(_T("Decoding image, please wait..."), 40, 50);
|
dc.DrawText(_T("Decoding image, please wait..."), 40, 50);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1530,8 +1596,7 @@ void OPJCanvas::OnThreadSignal(wxCommandEvent& event)
|
||||||
wxLogMessage(event.GetString());
|
wxLogMessage(event.GetString());
|
||||||
#else
|
#else
|
||||||
int n = event.GetInt();
|
int n = event.GetInt();
|
||||||
if ( n == -1 )
|
if (n == -1) {
|
||||||
{
|
|
||||||
m_dlgProgress->Destroy();
|
m_dlgProgress->Destroy();
|
||||||
m_dlgProgress = (wxProgressDialog *)NULL;
|
m_dlgProgress = (wxProgressDialog *)NULL;
|
||||||
|
|
||||||
|
@ -1539,11 +1604,8 @@ void OPJCanvas::OnThreadSignal(wxCommandEvent& event)
|
||||||
// we may need to wake up the main event loop for the dialog to be
|
// we may need to wake up the main event loop for the dialog to be
|
||||||
// really closed
|
// really closed
|
||||||
wxWakeUpIdle();
|
wxWakeUpIdle();
|
||||||
}
|
} else {
|
||||||
else
|
if (!m_dlgProgress->Update(n)) {
|
||||||
{
|
|
||||||
if ( !m_dlgProgress->Update(n) )
|
|
||||||
{
|
|
||||||
wxCriticalSectionLocker lock(m_critsectWork);
|
wxCriticalSectionLocker lock(m_critsectWork);
|
||||||
|
|
||||||
m_cancelled = true;
|
m_cancelled = true;
|
||||||
|
@ -1564,7 +1626,8 @@ BEGIN_EVENT_TABLE(OPJChildFrame, wxMDIChildFrame)
|
||||||
EVT_KILL_FOCUS(OPJChildFrame::OnLostFocus)
|
EVT_KILL_FOCUS(OPJChildFrame::OnLostFocus)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
OPJChildFrame::OPJChildFrame(OPJFrame *parent, wxFileName fname, int winnumber, const wxString& title, const wxPoint& pos, const wxSize& size,
|
OPJChildFrame::OPJChildFrame(OPJFrame *parent, wxFileName fname, int winnumber,
|
||||||
|
const wxString& title, const wxPoint& pos, const wxSize& size,
|
||||||
const long style):
|
const long style):
|
||||||
wxMDIChildFrame(parent, wxID_ANY, title, pos, size, style)
|
wxMDIChildFrame(parent, wxID_ANY, title, pos, size, style)
|
||||||
{
|
{
|
||||||
|
@ -1586,7 +1649,8 @@ const long style):
|
||||||
int width, height;
|
int width, height;
|
||||||
GetClientSize(&width, &height);
|
GetClientSize(&width, &height);
|
||||||
|
|
||||||
OPJCanvas *canvas = new OPJCanvas(fname, this, wxPoint(0, 0), wxSize(width, height));
|
OPJCanvas *canvas = new OPJCanvas(fname, this, wxPoint(0, 0), wxSize(width,
|
||||||
|
height));
|
||||||
#if USE_PENCIL_ON_CANVAS
|
#if USE_PENCIL_ON_CANVAS
|
||||||
canvas->SetCursor(wxCursor(wxCURSOR_PENCIL));
|
canvas->SetCursor(wxCursor(wxCURSOR_PENCIL));
|
||||||
#endif
|
#endif
|
||||||
|
@ -1611,7 +1675,8 @@ OPJChildFrame::~OPJChildFrame(void)
|
||||||
void OPJChildFrame::OnClose(wxCloseEvent& event)
|
void OPJChildFrame::OnClose(wxCloseEvent& event)
|
||||||
{
|
{
|
||||||
for (unsigned int p = 0; p < m_frame->m_bookCtrl->GetPageCount(); p++) {
|
for (unsigned int p = 0; p < m_frame->m_bookCtrl->GetPageCount(); p++) {
|
||||||
if (m_frame->m_bookCtrl->GetPageText(p) == wxString::Format(wxT("%u"), m_winnumber)) {
|
if (m_frame->m_bookCtrl->GetPageText(p) == wxString::Format(wxT("%u"),
|
||||||
|
m_winnumber)) {
|
||||||
m_frame->m_bookCtrl->DeletePage(p);
|
m_frame->m_bookCtrl->DeletePage(p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1630,12 +1695,14 @@ void OPJChildFrame::OnActivate(wxActivateEvent& event)
|
||||||
void OPJChildFrame::OnGotFocus(wxFocusEvent& event)
|
void OPJChildFrame::OnGotFocus(wxFocusEvent& event)
|
||||||
{
|
{
|
||||||
// we need to check if the notebook is being destroyed or not
|
// we need to check if the notebook is being destroyed or not
|
||||||
if (!m_frame->m_bookCtrl)
|
if (!m_frame->m_bookCtrl) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (unsigned int p = 0; p < m_frame->m_bookCtrl->GetPageCount(); p++) {
|
for (unsigned int p = 0; p < m_frame->m_bookCtrl->GetPageCount(); p++) {
|
||||||
|
|
||||||
if (m_frame->m_bookCtrl->GetPageText(p) == wxString::Format(wxT("%u"), m_winnumber)) {
|
if (m_frame->m_bookCtrl->GetPageText(p) == wxString::Format(wxT("%u"),
|
||||||
|
m_winnumber)) {
|
||||||
m_frame->m_bookCtrl->ChangeSelection(p);
|
m_frame->m_bookCtrl->ChangeSelection(p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,7 +207,7 @@ int main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (irreversible && check) {
|
if (irreversible && check) {
|
||||||
/* Due to irreversible inverse DWT not being symetric of forward */
|
/* Due to irreversible inverse DWT not being symmetric of forward */
|
||||||
/* See BUG_WEIRD_TWO_INVK in dwt.c */
|
/* See BUG_WEIRD_TWO_INVK in dwt.c */
|
||||||
printf("-I and -check aren't compatible\n");
|
printf("-I and -check aren't compatible\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -118,7 +118,7 @@ typedef struct opj_stream_private {
|
||||||
opj_stream_seek_fn m_seek_fn;
|
opj_stream_seek_fn m_seek_fn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Actual data stored into the stream if readed from. Data is read by chunk of fixed size.
|
* Actual data stored into the stream if read from. Data is read by chunk of fixed size.
|
||||||
* you should never access this data directly.
|
* you should never access this data directly.
|
||||||
*/
|
*/
|
||||||
OPJ_BYTE * m_stored_data;
|
OPJ_BYTE * m_stored_data;
|
||||||
|
|
|
@ -513,7 +513,7 @@ static void opj_idwt53_h(const opj_dwt_t *dwt,
|
||||||
|
|
||||||
#if (defined(__SSE2__) || defined(__AVX2__)) && !defined(STANDARD_SLOW_VERSION)
|
#if (defined(__SSE2__) || defined(__AVX2__)) && !defined(STANDARD_SLOW_VERSION)
|
||||||
|
|
||||||
/* Conveniency macros to improve the readabilty of the formulas */
|
/* Conveniency macros to improve the readability of the formulas */
|
||||||
#if __AVX2__
|
#if __AVX2__
|
||||||
#define VREG __m256i
|
#define VREG __m256i
|
||||||
#define LOAD_CST(x) _mm256_set1_epi32(x)
|
#define LOAD_CST(x) _mm256_set1_epi32(x)
|
||||||
|
|
|
@ -136,7 +136,7 @@ static INLINE OPJ_UINT32 read_le_uint32(const void* dataIn)
|
||||||
* Each run represents the number of zero events before a one event.
|
* Each run represents the number of zero events before a one event.
|
||||||
*/
|
*/
|
||||||
typedef struct dec_mel {
|
typedef struct dec_mel {
|
||||||
// data decoding machinary
|
// data decoding machinery
|
||||||
OPJ_UINT8* data; //!<the address of data (or bitstream)
|
OPJ_UINT8* data; //!<the address of data (or bitstream)
|
||||||
OPJ_UINT64 tmp; //!<temporary buffer for read data
|
OPJ_UINT64 tmp; //!<temporary buffer for read data
|
||||||
int bits; //!<number of bits stored in tmp
|
int bits; //!<number of bits stored in tmp
|
||||||
|
@ -600,7 +600,7 @@ void rev_read_mrp(rev_struct_t *mrp)
|
||||||
* an architecture that read size must be compatible with the
|
* an architecture that read size must be compatible with the
|
||||||
* alignment of the read address
|
* alignment of the read address
|
||||||
*
|
*
|
||||||
* There is another simiar subroutine rev_init. This subroutine does
|
* There is another similar subroutine rev_init. This subroutine does
|
||||||
* NOT skip the first 12 bits, and starts with unstuff set to true.
|
* NOT skip the first 12 bits, and starts with unstuff set to true.
|
||||||
*
|
*
|
||||||
* @param [in] mrp is a pointer to rev_struct structure
|
* @param [in] mrp is a pointer to rev_struct structure
|
||||||
|
@ -1566,7 +1566,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
|
||||||
}
|
}
|
||||||
|
|
||||||
//first quad, starting at first sample in quad and moving on
|
//first quad, starting at first sample in quad and moving on
|
||||||
if (qinf[0] & 0x10) { //is it signifcant? (sigma_n)
|
if (qinf[0] & 0x10) { //is it significant? (sigma_n)
|
||||||
OPJ_UINT32 val;
|
OPJ_UINT32 val;
|
||||||
|
|
||||||
ms_val = frwd_fetch(&magsgn); //get 32 bits of magsgn data
|
ms_val = frwd_fetch(&magsgn); //get 32 bits of magsgn data
|
||||||
|
@ -1816,14 +1816,14 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
|
||||||
if ((qinf[0] & 0xF0) & ((qinf[0] & 0xF0) - 1)) { // is \gamma_q 1?
|
if ((qinf[0] & 0xF0) & ((qinf[0] & 0xF0) - 1)) { // is \gamma_q 1?
|
||||||
OPJ_UINT32 E = (ls0 & 0x7Fu);
|
OPJ_UINT32 E = (ls0 & 0x7Fu);
|
||||||
E = E > (lsp[1] & 0x7Fu) ? E : (lsp[1] & 0x7Fu); //max(E, E^NE, E^NF)
|
E = E > (lsp[1] & 0x7Fu) ? E : (lsp[1] & 0x7Fu); //max(E, E^NE, E^NF)
|
||||||
//since U_q alread has u_q + 1, we subtract 2 instead of 1
|
//since U_q already has u_q + 1, we subtract 2 instead of 1
|
||||||
U_q[0] += E > 2 ? E - 2 : 0;
|
U_q[0] += E > 2 ? E - 2 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((qinf[1] & 0xF0) & ((qinf[1] & 0xF0) - 1)) { //is \gamma_q 1?
|
if ((qinf[1] & 0xF0) & ((qinf[1] & 0xF0) - 1)) { //is \gamma_q 1?
|
||||||
OPJ_UINT32 E = (lsp[1] & 0x7Fu);
|
OPJ_UINT32 E = (lsp[1] & 0x7Fu);
|
||||||
E = E > (lsp[2] & 0x7Fu) ? E : (lsp[2] & 0x7Fu); //max(E, E^NE, E^NF)
|
E = E > (lsp[2] & 0x7Fu) ? E : (lsp[2] & 0x7Fu); //max(E, E^NE, E^NF)
|
||||||
//since U_q alread has u_q + 1, we subtract 2 instead of 1
|
//since U_q already has u_q + 1, we subtract 2 instead of 1
|
||||||
U_q[1] += E > 2 ? E - 2 : 0;
|
U_q[1] += E > 2 ? E - 2 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2153,13 +2153,13 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
|
||||||
nxt_sig = y & 0x4 ? sigma1 : sigma2; //future samples
|
nxt_sig = y & 0x4 ? sigma1 : sigma2; //future samples
|
||||||
nxt_mbr = y & 0x4 ? mbr1 : mbr2; //future samples
|
nxt_mbr = y & 0x4 ? mbr1 : mbr2; //future samples
|
||||||
val = 3u << (p - 2); // sample values for newly discovered
|
val = 3u << (p - 2); // sample values for newly discovered
|
||||||
// signficant samples including the bin center
|
// significant samples including the bin center
|
||||||
for (i = 0; i < width;
|
for (i = 0; i < width;
|
||||||
i += 8, cur_sig++, cur_mbr++, nxt_sig++, nxt_mbr++) {
|
i += 8, cur_sig++, cur_mbr++, nxt_sig++, nxt_mbr++) {
|
||||||
OPJ_UINT32 ux, tx;
|
OPJ_UINT32 ux, tx;
|
||||||
OPJ_UINT32 mbr = *cur_mbr;
|
OPJ_UINT32 mbr = *cur_mbr;
|
||||||
OPJ_UINT32 new_sig = 0;
|
OPJ_UINT32 new_sig = 0;
|
||||||
if (mbr) { //are there any samples that migt be signficant
|
if (mbr) { //are there any samples that might be significant
|
||||||
OPJ_INT32 n;
|
OPJ_INT32 n;
|
||||||
for (n = 0; n < 8; n += 4) {
|
for (n = 0; n < 8; n += 4) {
|
||||||
OPJ_UINT32 col_mask;
|
OPJ_UINT32 col_mask;
|
||||||
|
@ -2187,7 +2187,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
//scan mbr to find a new signficant sample
|
//scan mbr to find a new significant sample
|
||||||
sample_mask = 0x11111111u & col_mask; // LSB
|
sample_mask = 0x11111111u & col_mask; // LSB
|
||||||
if (mbr & sample_mask) {
|
if (mbr & sample_mask) {
|
||||||
assert(dp[0] == 0); // the sample must have been 0
|
assert(dp[0] == 0); // the sample must have been 0
|
||||||
|
@ -2196,7 +2196,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
|
||||||
OPJ_UINT32 t;
|
OPJ_UINT32 t;
|
||||||
new_sig |= sample_mask; // new significant samples
|
new_sig |= sample_mask; // new significant samples
|
||||||
t = 0x32u << (j * 4);// propagation to neighbors
|
t = 0x32u << (j * 4);// propagation to neighbors
|
||||||
mbr |= t & inv_sig; //remove already signifcant samples
|
mbr |= t & inv_sig; //remove already significant samples
|
||||||
}
|
}
|
||||||
cwd >>= 1;
|
cwd >>= 1;
|
||||||
++cnt; //consume bit and increment number of
|
++cnt; //consume bit and increment number of
|
||||||
|
@ -2254,7 +2254,7 @@ OPJ_BOOL opj_t1_ht_decode_cblk(opj_t1_t *t1,
|
||||||
for (j = n; j < end; ++j, ++dp, col_mask <<= 4) {
|
for (j = n; j < end; ++j, ++dp, col_mask <<= 4) {
|
||||||
OPJ_UINT32 sample_mask;
|
OPJ_UINT32 sample_mask;
|
||||||
|
|
||||||
if ((col_mask & new_sig) == 0) { //if non is signficant
|
if ((col_mask & new_sig) == 0) { //if non is significant
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
/*@{*/
|
/*@{*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on reading header. Developpers wanting to extend the library can add their own reading procedures.
|
* Sets up the procedures to do on reading header. Developers wanting to extend the library can add their own reading procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_j2k_setup_header_reading(opj_j2k_t *p_j2k,
|
static OPJ_BOOL opj_j2k_setup_header_reading(opj_j2k_t *p_j2k,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -89,22 +89,22 @@ static OPJ_BOOL opj_j2k_decoding_validation(opj_j2k_t * p_j2k,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters
|
* Sets up the validation ,i.e. adds the procedures to launch to make sure the codec parameters
|
||||||
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
* are valid. Developers wanting to extend the library can add their own validation procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_j2k_setup_encoding_validation(opj_j2k_t *p_j2k,
|
static OPJ_BOOL opj_j2k_setup_encoding_validation(opj_j2k_t *p_j2k,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters
|
* Sets up the validation ,i.e. adds the procedures to launch to make sure the codec parameters
|
||||||
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
* are valid. Developers wanting to extend the library can add their own validation procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_j2k_setup_decoding_validation(opj_j2k_t *p_j2k,
|
static OPJ_BOOL opj_j2k_setup_decoding_validation(opj_j2k_t *p_j2k,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the validation ,i.e. adds the procedures to lauch to make sure the codec parameters
|
* Sets up the validation ,i.e. adds the procedures to launch to make sure the codec parameters
|
||||||
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
* are valid. Developers wanting to extend the library can add their own validation procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_j2k_setup_end_compress(opj_j2k_t *p_j2k,
|
static OPJ_BOOL opj_j2k_setup_end_compress(opj_j2k_t *p_j2k,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -147,7 +147,7 @@ static OPJ_BOOL opj_j2k_create_tcd(opj_j2k_t *p_j2k,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Excutes the given procedures on the given codec.
|
* Executes the given procedures on the given codec.
|
||||||
*
|
*
|
||||||
* @param p_procedure_list the list of procedures to execute
|
* @param p_procedure_list the list of procedures to execute
|
||||||
* @param p_j2k the jpeg2000 codec to execute the procedures on.
|
* @param p_j2k the jpeg2000 codec to execute the procedures on.
|
||||||
|
@ -1430,7 +1430,7 @@ static const opj_dec_memory_marker_handler_t j2k_memory_marker_handler_tab [] =
|
||||||
{J2K_MS_MCC, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_mcc},
|
{J2K_MS_MCC, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_mcc},
|
||||||
{J2K_MS_MCO, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_mco},
|
{J2K_MS_MCO, J2K_STATE_MH | J2K_STATE_TPH, opj_j2k_read_mco},
|
||||||
#ifdef USE_JPWL
|
#ifdef USE_JPWL
|
||||||
#ifdef TODO_MS /* remove these functions which are not commpatible with the v2 API */
|
#ifdef TODO_MS /* remove these functions which are not compatible with the v2 API */
|
||||||
{J2K_MS_EPC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epc},
|
{J2K_MS_EPC, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epc},
|
||||||
{J2K_MS_EPB, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epb},
|
{J2K_MS_EPB, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_epb},
|
||||||
{J2K_MS_ESD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_esd},
|
{J2K_MS_ESD, J2K_STATE_MH | J2K_STATE_TPH, j2k_read_esd},
|
||||||
|
@ -1790,7 +1790,7 @@ static OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino,
|
||||||
tpnum *= l_current_poc->layE;
|
tpnum *= l_current_poc->layE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* whould we split here ? */
|
/* would we split here ? */
|
||||||
if (cp->m_specific_param.m_enc.m_tp_flag == prog[i]) {
|
if (cp->m_specific_param.m_enc.m_tp_flag == prog[i]) {
|
||||||
cp->m_specific_param.m_enc.m_tp_pos = i;
|
cp->m_specific_param.m_enc.m_tp_pos = i;
|
||||||
break;
|
break;
|
||||||
|
@ -8019,7 +8019,7 @@ OPJ_BOOL opj_j2k_setup_encoder(opj_j2k_t *p_j2k,
|
||||||
}
|
}
|
||||||
#endif /* USE_JPWL */
|
#endif /* USE_JPWL */
|
||||||
|
|
||||||
/* initialize the mutiple tiles */
|
/* initialize the multiple tiles */
|
||||||
/* ---------------------------- */
|
/* ---------------------------- */
|
||||||
cp->tcps = (opj_tcp_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_t));
|
cp->tcps = (opj_tcp_t*) opj_calloc(cp->tw * cp->th, sizeof(opj_tcp_t));
|
||||||
if (!cp->tcps) {
|
if (!cp->tcps) {
|
||||||
|
@ -8829,7 +8829,7 @@ static OPJ_BOOL opj_j2k_read_header_procedure(opj_j2k_t *p_j2k,
|
||||||
if (l_marker_handler->id == J2K_MS_UNK) {
|
if (l_marker_handler->id == J2K_MS_UNK) {
|
||||||
if (! opj_j2k_read_unk(p_j2k, p_stream, &l_current_marker, p_manager)) {
|
if (! opj_j2k_read_unk(p_j2k, p_stream, &l_current_marker, p_manager)) {
|
||||||
opj_event_msg(p_manager, EVT_ERROR,
|
opj_event_msg(p_manager, EVT_ERROR,
|
||||||
"Unknow marker have been detected and generated error.\n");
|
"Unknown marker has been detected and generated error.\n");
|
||||||
return OPJ_FALSE;
|
return OPJ_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9834,7 +9834,7 @@ OPJ_BOOL opj_j2k_decode_tile(opj_j2k_t * p_j2k,
|
||||||
/* When using the opj_read_tile_header / opj_decode_tile_data API */
|
/* When using the opj_read_tile_header / opj_decode_tile_data API */
|
||||||
/* such as in test_tile_decoder, m_output_image is NULL, so fall back */
|
/* such as in test_tile_decoder, m_output_image is NULL, so fall back */
|
||||||
/* to the full image dimension. This is a bit surprising that */
|
/* to the full image dimension. This is a bit surprising that */
|
||||||
/* opj_set_decode_area() is only used to determinte intersecting tiles, */
|
/* opj_set_decode_area() is only used to determine intersecting tiles, */
|
||||||
/* but full tile decoding is done */
|
/* but full tile decoding is done */
|
||||||
l_image_for_bounds = p_j2k->m_output_image ? p_j2k->m_output_image :
|
l_image_for_bounds = p_j2k->m_output_image ? p_j2k->m_output_image :
|
||||||
p_j2k->m_private_image;
|
p_j2k->m_private_image;
|
||||||
|
@ -11725,7 +11725,7 @@ static OPJ_BOOL opj_j2k_decode_tiles(opj_j2k_t *p_j2k,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on decoding data. Developpers wanting to extend the library can add their own reading procedures.
|
* Sets up the procedures to do on decoding data. Developers wanting to extend the library can add their own reading procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_j2k_setup_decoding(opj_j2k_t *p_j2k,
|
static OPJ_BOOL opj_j2k_setup_decoding(opj_j2k_t *p_j2k,
|
||||||
opj_event_mgr_t * p_manager)
|
opj_event_mgr_t * p_manager)
|
||||||
|
@ -11857,7 +11857,7 @@ static OPJ_BOOL opj_j2k_decode_one_tile(opj_j2k_t *p_j2k,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on decoding one tile. Developpers wanting to extend the library can add their own reading procedures.
|
* Sets up the procedures to do on decoding one tile. Developers wanting to extend the library can add their own reading procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_j2k_setup_decoding_tile(opj_j2k_t *p_j2k,
|
static OPJ_BOOL opj_j2k_setup_decoding_tile(opj_j2k_t *p_j2k,
|
||||||
opj_event_mgr_t * p_manager)
|
opj_event_mgr_t * p_manager)
|
||||||
|
@ -12083,7 +12083,7 @@ OPJ_BOOL opj_j2k_get_tile(opj_j2k_t *p_j2k,
|
||||||
opj_image_destroy(p_j2k->m_output_image);
|
opj_image_destroy(p_j2k->m_output_image);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Create the ouput image from the information previously computed*/
|
/* Create the output image from the information previously computed*/
|
||||||
p_j2k->m_output_image = opj_image_create0();
|
p_j2k->m_output_image = opj_image_create0();
|
||||||
if (!(p_j2k->m_output_image)) {
|
if (!(p_j2k->m_output_image)) {
|
||||||
return OPJ_FALSE;
|
return OPJ_FALSE;
|
||||||
|
|
|
@ -331,14 +331,14 @@ static OPJ_BOOL opj_jp2_read_colr(opj_jp2_t *jp2,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on writing header after the codestream.
|
* Sets up the procedures to do on writing header after the codestream.
|
||||||
* Developpers wanting to extend the library can add their own writing procedures.
|
* Developers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_setup_end_header_writing(opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_setup_end_header_writing(opj_jp2_t *jp2,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on reading header after the codestream.
|
* Sets up the procedures to do on reading header after the codestream.
|
||||||
* Developpers wanting to extend the library can add their own writing procedures.
|
* Developers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_setup_end_header_reading(opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_setup_end_header_reading(opj_jp2_t *jp2,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -388,13 +388,13 @@ static OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the validation ,i.e. adds the procedures to launch to make sure the codec parameters
|
* Sets up the validation ,i.e. adds the procedures to launch to make sure the codec parameters
|
||||||
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
* are valid. Developers wanting to extend the library can add their own validation procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_setup_encoding_validation(opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_setup_encoding_validation(opj_jp2_t *jp2,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on writing header. Developpers wanting to extend the library can add their own writing procedures.
|
* Sets up the procedures to do on writing header. Developers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_setup_header_writing(opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_setup_header_writing(opj_jp2_t *jp2,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
@ -457,14 +457,14 @@ static OPJ_BOOL opj_jp2_read_boxhdr_char(opj_jp2_box_t *box,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the validation ,i.e. adds the procedures to launch to make sure the codec parameters
|
* Sets up the validation ,i.e. adds the procedures to launch to make sure the codec parameters
|
||||||
* are valid. Developpers wanting to extend the library can add their own validation procedures.
|
* are valid. Developers wanting to extend the library can add their own validation procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_setup_decoding_validation(opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_setup_decoding_validation(opj_jp2_t *jp2,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets up the procedures to do on reading header.
|
* Sets up the procedures to do on reading header.
|
||||||
* Developpers wanting to extend the library can add their own writing procedures.
|
* Developers wanting to extend the library can add their own writing procedures.
|
||||||
*/
|
*/
|
||||||
static OPJ_BOOL opj_jp2_setup_header_reading(opj_jp2_t *jp2,
|
static OPJ_BOOL opj_jp2_setup_header_reading(opj_jp2_t *jp2,
|
||||||
opj_event_mgr_t * p_manager);
|
opj_event_mgr_t * p_manager);
|
||||||
|
|
|
@ -455,9 +455,9 @@ typedef struct opj_cparameters {
|
||||||
char infile[OPJ_PATH_LEN];
|
char infile[OPJ_PATH_LEN];
|
||||||
/** output file name */
|
/** output file name */
|
||||||
char outfile[OPJ_PATH_LEN];
|
char outfile[OPJ_PATH_LEN];
|
||||||
/** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */
|
/** DEPRECATED. Index generation is now handled with the opj_encode_with_info() function. Set to NULL */
|
||||||
int index_on;
|
int index_on;
|
||||||
/** DEPRECATED. Index generation is now handeld with the opj_encode_with_info() function. Set to NULL */
|
/** DEPRECATED. Index generation is now handled with the opj_encode_with_info() function. Set to NULL */
|
||||||
char index[OPJ_PATH_LEN];
|
char index[OPJ_PATH_LEN];
|
||||||
/** subimage encoding: origin image offset in x direction */
|
/** subimage encoding: origin image offset in x direction */
|
||||||
int image_offset_x0;
|
int image_offset_x0;
|
||||||
|
@ -1453,7 +1453,7 @@ OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(opj_codec_t *p_decompressor,
|
||||||
* Get the decoded tile from the codec
|
* Get the decoded tile from the codec
|
||||||
*
|
*
|
||||||
* @param p_codec the jpeg2000 codec.
|
* @param p_codec the jpeg2000 codec.
|
||||||
* @param p_stream input streamm
|
* @param p_stream input stream
|
||||||
* @param p_image output image
|
* @param p_image output image
|
||||||
* @param tile_index index of the tile which will be decode
|
* @param tile_index index of the tile which will be decode
|
||||||
*
|
*
|
||||||
|
|
|
@ -277,7 +277,7 @@ static INLINE OPJ_INT32 opj_int_fix_mul_t1(OPJ_INT32 a, OPJ_INT32 b)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Addtion two signed integers with a wrap-around behaviour.
|
Addition two signed integers with a wrap-around behaviour.
|
||||||
Assumes complement-to-two signed integers.
|
Assumes complement-to-two signed integers.
|
||||||
@param a
|
@param a
|
||||||
@param b
|
@param b
|
||||||
|
|
|
@ -943,7 +943,7 @@ static void opj_get_all_encoding_parameters(const opj_image_t *p_image,
|
||||||
*p_dy_min = 0x7fffffff;
|
*p_dy_min = 0x7fffffff;
|
||||||
|
|
||||||
for (compno = 0; compno < p_image->numcomps; ++compno) {
|
for (compno = 0; compno < p_image->numcomps; ++compno) {
|
||||||
/* aritmetic variables to calculate*/
|
/* arithmetic variables to calculate*/
|
||||||
OPJ_UINT32 l_level_no;
|
OPJ_UINT32 l_level_no;
|
||||||
OPJ_UINT32 l_rx0, l_ry0, l_rx1, l_ry1;
|
OPJ_UINT32 l_rx0, l_ry0, l_rx1, l_ry1;
|
||||||
OPJ_UINT32 l_px0, l_py0, l_px1, py1;
|
OPJ_UINT32 l_px0, l_py0, l_px1, py1;
|
||||||
|
@ -1225,7 +1225,7 @@ static void opj_pi_update_decode_poc(opj_pi_iterator_t * p_pi,
|
||||||
/* loop*/
|
/* loop*/
|
||||||
OPJ_UINT32 pino;
|
OPJ_UINT32 pino;
|
||||||
|
|
||||||
/* encoding prameters to set*/
|
/* encoding parameters to set*/
|
||||||
OPJ_UINT32 l_bound;
|
OPJ_UINT32 l_bound;
|
||||||
|
|
||||||
opj_pi_iterator_t * l_current_pi = 00;
|
opj_pi_iterator_t * l_current_pi = 00;
|
||||||
|
@ -1272,7 +1272,7 @@ static void opj_pi_update_decode_not_poc(opj_pi_iterator_t * p_pi,
|
||||||
/* loop*/
|
/* loop*/
|
||||||
OPJ_UINT32 pino;
|
OPJ_UINT32 pino;
|
||||||
|
|
||||||
/* encoding prameters to set*/
|
/* encoding parameters to set*/
|
||||||
OPJ_UINT32 l_bound;
|
OPJ_UINT32 l_bound;
|
||||||
|
|
||||||
opj_pi_iterator_t * l_current_pi = 00;
|
opj_pi_iterator_t * l_current_pi = 00;
|
||||||
|
@ -1401,11 +1401,11 @@ opj_pi_iterator_t *opj_pi_create_decode(opj_image_t *p_image,
|
||||||
OPJ_UINT32 pino;
|
OPJ_UINT32 pino;
|
||||||
OPJ_UINT32 compno, resno;
|
OPJ_UINT32 compno, resno;
|
||||||
|
|
||||||
/* to store w, h, dx and dy fro all components and resolutions */
|
/* to store w, h, dx and dy for all components and resolutions */
|
||||||
OPJ_UINT32 * l_tmp_data;
|
OPJ_UINT32 * l_tmp_data;
|
||||||
OPJ_UINT32 ** l_tmp_ptr;
|
OPJ_UINT32 ** l_tmp_ptr;
|
||||||
|
|
||||||
/* encoding prameters to set */
|
/* encoding parameters to set */
|
||||||
OPJ_UINT32 l_max_res;
|
OPJ_UINT32 l_max_res;
|
||||||
OPJ_UINT32 l_max_prec;
|
OPJ_UINT32 l_max_prec;
|
||||||
OPJ_UINT32 l_tx0, l_tx1, l_ty0, l_ty1;
|
OPJ_UINT32 l_tx0, l_tx1, l_ty0, l_ty1;
|
||||||
|
@ -1624,11 +1624,11 @@ opj_pi_iterator_t *opj_pi_initialise_encode(const opj_image_t *p_image,
|
||||||
OPJ_UINT32 pino;
|
OPJ_UINT32 pino;
|
||||||
OPJ_UINT32 compno, resno;
|
OPJ_UINT32 compno, resno;
|
||||||
|
|
||||||
/* to store w, h, dx and dy fro all components and resolutions*/
|
/* to store w, h, dx and dy for all components and resolutions*/
|
||||||
OPJ_UINT32 * l_tmp_data;
|
OPJ_UINT32 * l_tmp_data;
|
||||||
OPJ_UINT32 ** l_tmp_ptr;
|
OPJ_UINT32 ** l_tmp_ptr;
|
||||||
|
|
||||||
/* encoding prameters to set*/
|
/* encoding parameters to set*/
|
||||||
OPJ_UINT32 l_max_res;
|
OPJ_UINT32 l_max_res;
|
||||||
OPJ_UINT32 l_max_prec;
|
OPJ_UINT32 l_max_prec;
|
||||||
OPJ_UINT32 l_tx0, l_tx1, l_ty0, l_ty1;
|
OPJ_UINT32 l_tx0, l_tx1, l_ty0, l_ty1;
|
||||||
|
|
|
@ -200,7 +200,7 @@ typedef struct opj_t1 {
|
||||||
OPJ_UINT32 flagssize;
|
OPJ_UINT32 flagssize;
|
||||||
OPJ_BOOL encoder;
|
OPJ_BOOL encoder;
|
||||||
|
|
||||||
/* Thre 3 variables below are only used by the decoder */
|
/* The 3 variables below are only used by the decoder */
|
||||||
/* set to TRUE in multithreaded context */
|
/* set to TRUE in multithreaded context */
|
||||||
OPJ_BOOL mustuse_cblkdatabuffer;
|
OPJ_BOOL mustuse_cblkdatabuffer;
|
||||||
/* Temporary buffer to concatenate all chunks of a codebock */
|
/* Temporary buffer to concatenate all chunks of a codebock */
|
||||||
|
|
|
@ -887,7 +887,7 @@ static vlc_src_table_t tbl1[] = {
|
||||||
* \li \c cwd_len : 3bits -> the codeword length of the VLC codeword;
|
* \li \c cwd_len : 3bits -> the codeword length of the VLC codeword;
|
||||||
* the VLC cwd is in the LSB of bitstream \n
|
* the VLC cwd is in the LSB of bitstream \n
|
||||||
* \li \c u_off : 1bit -> u_offset, which is 1 if u value is not 0 \n
|
* \li \c u_off : 1bit -> u_offset, which is 1 if u value is not 0 \n
|
||||||
* \li \c rho : 4bits -> signficant samples within a quad \n
|
* \li \c rho : 4bits -> significant samples within a quad \n
|
||||||
* \li \c e_1 : 4bits -> EMB e_1 \n
|
* \li \c e_1 : 4bits -> EMB e_1 \n
|
||||||
* \li \c e_k : 4bits -> EMB e_k \n
|
* \li \c e_k : 4bits -> EMB e_k \n
|
||||||
* \n
|
* \n
|
||||||
|
@ -924,7 +924,7 @@ OPJ_BOOL vlc_init_tables()
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is to convert table entries into values for decoder look up
|
// this is to convert table entries into values for decoder look up
|
||||||
// There can be at most 1024 possibilites, not all of them are valid.
|
// There can be at most 1024 possibilities, not all of them are valid.
|
||||||
//
|
//
|
||||||
for (int i = 0; i < 1024; ++i) {
|
for (int i = 0; i < 1024; ++i) {
|
||||||
int cwd = i & 0x7F; // from i extract codeword
|
int cwd = i & 0x7F; // from i extract codeword
|
||||||
|
|
|
@ -1124,7 +1124,7 @@ static OPJ_BOOL opj_t2_read_packet_header(opj_t2_t* p_t2,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
When the marker PPT/PPM is used the packet header are store in PPT/PPM marker
|
When the marker PPT/PPM is used the packet header are store in PPT/PPM marker
|
||||||
This part deal with this caracteristic
|
This part deal with this characteristic
|
||||||
step 1: Read packet header in the saved structure
|
step 1: Read packet header in the saved structure
|
||||||
step 2: Return to codestream for decoding
|
step 2: Return to codestream for decoding
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -87,7 +87,7 @@ typedef struct aux_response_param {
|
||||||
unsigned char *data; /*!< sending data */
|
unsigned char *data; /*!< sending data */
|
||||||
OPJ_SIZE_T datalen; /*!< length of data */
|
OPJ_SIZE_T datalen; /*!< length of data */
|
||||||
OPJ_SIZE_T maxlenPerFrame; /*!< maximum data length to send per frame */
|
OPJ_SIZE_T maxlenPerFrame; /*!< maximum data length to send per frame */
|
||||||
SOCKET listensock; /*!< listeing socket */
|
SOCKET listensock; /*!< listening socket */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
HANDLE hTh; /*!< thread handle */
|
HANDLE hTh; /*!< thread handle */
|
||||||
#endif
|
#endif
|
||||||
|
@ -131,7 +131,7 @@ void send_responsedata_on_aux(OPJ_BOOL istcp, auxtrans_param_t auxtrans,
|
||||||
auxresponse->hTh = (HANDLE)_beginthreadex(NULL, 0, &aux_streaming, auxresponse,
|
auxresponse->hTh = (HANDLE)_beginthreadex(NULL, 0, &aux_streaming, auxresponse,
|
||||||
0, &threadId);
|
0, &threadId);
|
||||||
if (auxresponse->hTh == 0) {
|
if (auxresponse->hTh == 0) {
|
||||||
fprintf(FCGI_stderr, "ERRO: pthread_create() %s",
|
fprintf(FCGI_stderr, "ERROR: pthread_create() %s",
|
||||||
strerror((int)auxresponse->hTh));
|
strerror((int)auxresponse->hTh));
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -77,7 +77,7 @@ void send_PNMstream(SOCKET connected_socket, Byte_t *pnmstream,
|
||||||
*
|
*
|
||||||
* @param [in] connected_socket file descriptor of the connected socket
|
* @param [in] connected_socket file descriptor of the connected socket
|
||||||
* @param [in] xmlstream xml data stream
|
* @param [in] xmlstream xml data stream
|
||||||
* @param [in] length legnth of the xml data stream
|
* @param [in] length length of the xml data stream
|
||||||
*/
|
*/
|
||||||
void send_XMLstream(SOCKET connected_socket, Byte_t *xmlstream,
|
void send_XMLstream(SOCKET connected_socket, Byte_t *xmlstream,
|
||||||
OPJ_SIZE_T length);
|
OPJ_SIZE_T length);
|
||||||
|
@ -87,7 +87,7 @@ void send_XMLstream(SOCKET connected_socket, Byte_t *xmlstream,
|
||||||
*
|
*
|
||||||
* @param [in] connected_socket file descriptor of the connected socket
|
* @param [in] connected_socket file descriptor of the connected socket
|
||||||
* @param [in] tid tid string
|
* @param [in] tid tid string
|
||||||
* @param [in] tidlen legnth of the tid string
|
* @param [in] tidlen length of the tid string
|
||||||
*/
|
*/
|
||||||
void send_TIDstream(SOCKET connected_socket, const char *tid,
|
void send_TIDstream(SOCKET connected_socket, const char *tid,
|
||||||
OPJ_SIZE_T tidlen);
|
OPJ_SIZE_T tidlen);
|
||||||
|
@ -97,7 +97,7 @@ void send_TIDstream(SOCKET connected_socket, const char *tid,
|
||||||
*
|
*
|
||||||
* @param [in] connected_socket file descriptor of the connected socket
|
* @param [in] connected_socket file descriptor of the connected socket
|
||||||
* @param [in] cid cid string
|
* @param [in] cid cid string
|
||||||
* @param [in] cidlen legnth of the cid string
|
* @param [in] cidlen length of the cid string
|
||||||
*/
|
*/
|
||||||
void send_CIDstream(SOCKET connected_socket, const char *cid,
|
void send_CIDstream(SOCKET connected_socket, const char *cid,
|
||||||
OPJ_SIZE_T cidlen);
|
OPJ_SIZE_T cidlen);
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
#endif /*SERVER*/
|
#endif /*SERVER*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* chekc JP2 box indexing
|
* check JP2 box indexing
|
||||||
*
|
*
|
||||||
* @param[in] toplev_boxlist top level box list
|
* @param[in] toplev_boxlist top level box list
|
||||||
* @return if correct (true) or wrong (false)
|
* @return if correct (true) or wrong (false)
|
||||||
|
|
|
@ -140,7 +140,7 @@ OPJ_BOOL close_channel(query_param_t query_param,
|
||||||
#ifndef SERVER
|
#ifndef SERVER
|
||||||
fprintf(logstream, "local log: close all\n");
|
fprintf(logstream, "local log: close all\n");
|
||||||
#endif
|
#endif
|
||||||
/* all channels associatd with the session will be closed */
|
/* all channels associated with the session will be closed */
|
||||||
if (!delete_session(cursession, sessionlist)) {
|
if (!delete_session(cursession, sessionlist)) {
|
||||||
return OPJ_FALSE;
|
return OPJ_FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ typedef struct metadata_param {
|
||||||
boxlist_param_t *boxlist; /**< box list*/
|
boxlist_param_t *boxlist; /**< box list*/
|
||||||
placeholderlist_param_t *placeholderlist; /**< placeholder box list*/
|
placeholderlist_param_t *placeholderlist; /**< placeholder box list*/
|
||||||
boxcontents_param_t
|
boxcontents_param_t
|
||||||
*boxcontents; /**< box contens in case of no boxlist and placeholderlist*/
|
*boxcontents; /**< box contents in case of no boxlist and placeholderlist*/
|
||||||
struct metadata_param
|
struct metadata_param
|
||||||
*next; /**< pointer to the next metadata-bin*/
|
*next; /**< pointer to the next metadata-bin*/
|
||||||
} metadata_param_t;
|
} metadata_param_t;
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
/** Marker index parameters*/
|
/** Marker index parameters*/
|
||||||
typedef struct markeridx_param {
|
typedef struct markeridx_param {
|
||||||
Byte2_t code; /**< marker code*/
|
Byte2_t code; /**< marker code*/
|
||||||
Byte2_t num_remain; /**< remining number of the same marker index segments listed immediately*/
|
Byte2_t num_remain; /**< remaining number of the same marker index segments listed immediately*/
|
||||||
OPJ_OFF_T offset; /**< offset relative to the start of the*/
|
OPJ_OFF_T offset; /**< offset relative to the start of the*/
|
||||||
/**codestream ( including the length*/
|
/**codestream ( including the length*/
|
||||||
/**parameter but not the marker itself)*/
|
/**parameter but not the marker itself)*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
This directory contains 3rd party libs (PNG, ZLIB)...
|
This directory contains 3rd party libs (PNG, ZLIB)...
|
||||||
|
|
||||||
They are convinient copy of code from people outside of the OpenJPEG community.
|
They are convenient copy of code from people outside of the OpenJPEG community.
|
||||||
They are solely provided for ease of build of OpenJPEG on system where those
|
They are solely provided for ease of build of OpenJPEG on system where those
|
||||||
3rd party libs are not easily accessible (typically non-UNIX).
|
3rd party libs are not easily accessible (typically non-UNIX).
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue