Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6704 Discussions

UIC sample JPEG: meaning of JPEGDecoderParams::SetDCTType

Ryan_Wong
Beginner
412 Views
Inside the UIC JPEG sample, (uic_jpeg_dec.h), the classJPEGDecoderParams has the following field:
[bash]ExcStatus SetDCTType(int dctType)
{
    m_dctType = dctType;
    return ExcStatusOk;
}
int GetDCTType(void)
{
    return m_dctType;
}
[/bash]
However, after careful searching, it appears the field is unused. Is it safe to remove this field? Is there reference to either JPEG specification or IJG documentation regarding the meaning of this field?
Thank you.
0 Kudos
1 Solution
SergeyKostrov
Valued Contributor II
412 Views
1.
It is similar to 'use_qdct' param but due to some reason a consistency was lost. Take a look at
'JPGViewDoc.h' header:

...

class CJPGViewDoc : public CDocument
{
...
void SetDCTType( int use_qdct ) { m_param_jpeg.use_qdct = use_qdct; return; }
...
};
...

2.
In 'JPGView.rc' there is a control 'IDC_USE_QDCT'with a text 'Use fast DCT for not complete blocks'
and it looks like a letter'q' in the 'use_qdct'stands for 'quick'.

Best regards,
Sergey


View solution in original post

0 Kudos
5 Replies
Sergey_K_Intel
Employee
412 Views
Hi Ryan,
You are right, this field can be safely removed. It might be a duplicate of m_use_qdct data member of CJPEGDecoder class, but abandoned for some reason.
We'll inspect the functions and data members to get rid of unused codes.
Thank you,
Sergey
0 Kudos
levicki
Valued Contributor I
412 Views
I guess that this DCT type parameter was meant to be used to chose whether to use integer or float DCT.
0 Kudos
SergeyKostrov
Valued Contributor II
413 Views
1.
It is similar to 'use_qdct' param but due to some reason a consistency was lost. Take a look at
'JPGViewDoc.h' header:

...

class CJPGViewDoc : public CDocument
{
...
void SetDCTType( int use_qdct ) { m_param_jpeg.use_qdct = use_qdct; return; }
...
};
...

2.
In 'JPGView.rc' there is a control 'IDC_USE_QDCT'with a text 'Use fast DCT for not complete blocks'
and it looks like a letter'q' in the 'use_qdct'stands for 'quick'.

Best regards,
Sergey


0 Kudos
SergeyKostrov
Valued Contributor II
412 Views
Quoting Igor Levicki
I guess that this DCT type parameter was meant to be used to chose whether to use integer or float DCT.


It looks like no.

Even ifan integer-based DCT implementations could be done results, compared to float-based
implementations,will be less accurate( roundoff problems ) but they can be calculatedfaster.

Best regards,
Sergey

0 Kudos
levicki
Valued Contributor I
412 Views
I do agree that avoiding floating points today has no speed benefits -- I was just pointing out that IJG has those two modes and similarily named variable.

0 Kudos
Reply