Questions tagged [turbojpeg]

TurboJPEG is a high-level API for the libjpeg-turbo library.

TurboJPEG is a higher-level API originally developed for use by VirtualGL and TurboVNC (but other projects, both open source and proprietary, now use it as well.) TurboJPEG provides an easy-to-use interface for compressing and decompressing JPEG images in memory.

18 questions
37
votes
4 answers

Examples or tutorials of using libjpeg-turbo's TurboJPEG

The instructions for libjpeg-turbo here describes the TurboJPEG API thus: "This API wraps libjpeg-turbo and provides an easy-to-use interface for compressing and decompressing JPEG images in memory". Great, but are there some solid examples of using…
occulus
  • 16,959
  • 6
  • 53
  • 76
4
votes
1 answer

How to compress a YUYV image into a jpeg

(Cross posted to libjpeg-turbo-users list.) I'm having a problem with libjpeg-turbo. The tjCompress2 function requires an RGB or Greyscale image to…
fadedbee
  • 42,671
  • 44
  • 178
  • 308
4
votes
2 answers

Strange results while compressing batch of pictures with libjpegturbo

First, what I (want to) do: compress and scale down an batch of pictures (jpg). Lets assume the original picture has this 1600w x 1200h dimensions. Now, i want to have one compressed copy of 1600x1200 and another 800x600 and 400x300. What I…
user950117
  • 117
  • 4
  • 12
3
votes
1 answer

How to display a JPEG on ANativeWindow?

I am trying to show a JPEG to a ANativeWindow with the Android NDK. I am getting the ANativeWindow* by doing: _window = ANativeWindow_fromSurface(env, surface) I am loading the jpeg, with libjpeg-turbo, by doing: if (tjDecompressHeader2(tj, jpeg,…
François
  • 123
  • 1
  • 10
3
votes
1 answer

How to get java wrapper for libjpeg-turbo to actually compress?

I'm having trouble getting libjpeg-turbo in my java project to actually compress an image. It writes a .jpg fine - but the final size of the result is always e.g. almost the same as a 24bit windows .bmp of the same image. A 480x854 image turns…
jdowdell
  • 1,578
  • 12
  • 24
2
votes
0 answers

TurboJpeg: No speed improvements

I'm on a 64-bit CentOS 6.4 machine. I have a simple benchmark that reads a JPEG into memory or writes a JPEG. I was previously using libjpeg. Now, I installed TurboJpeg, recompiled, and I see no performance improvement. I re-linked against…
JB_User
  • 3,117
  • 7
  • 31
  • 51
1
vote
1 answer

turbojpeg's tjDecompressToYUV2 data format

I would like to convert a JPEG image into Y'UV420p using turbo jpeg. I think that this uses some 2x2 blocks with there being twice the information in the Y' that there is in each of the U and V components but I haven't been able to find an example…
user7287311
1
vote
3 answers

libjpeg turbo tjCompressFromYUV

I'd like to compress a planar 4:2:0 YUV buffer to a jpeg image using libturbojpeg in C, but I'm having trouble using the tjCompressFromYUV() function. This is my code: #define PADDING 2 tjhandle tjh; unsigned long buf_size; unsigned char…
AleA
  • 13
  • 3
1
vote
1 answer

extract Grayscale from yuv in libjpeg

On either TurboJpeg or the underlying libJpeg APIs - is there a simple function for extracting the Y component from the Ycbcr (after I've already read the image)? I know I can loop over the data and extract the bytes. Isn't this already implemented?
mousomer
  • 2,632
  • 2
  • 24
  • 25
1
vote
1 answer

YCbCr input directly from jpeg loader

I need to extract CbCr chroma data from JPEG images, for image analysis. (in C/C++) As I understand it, the JPEG "raw data" is compressed YCbCr. Am I correct in this assumption? How can I verify this for a given image? I am currently using…
mousomer
  • 2,632
  • 2
  • 24
  • 25
1
vote
1 answer

Scaling using libjpegturbo in java

I have an image that I want to re-scale the size so that the file size will be small. By using libjpegturbo class TJScalingFactor and TJCompressor, I am still unable to re-scale the image as there is no method which allow height and width to be…
0
votes
0 answers

Why using TurboJPEG to decompress JPEG to BMP is slower than OpencV?

Using turbojpeg is theoretically faster, but my tests showed the opposite. The result: the size of jpg: 5040*5216 opencv: 4.2.0 quailty : 100 sample: 4:2:0 use fastdct using OpenCV imencode: 38.78 ms using turbo decompress: 87.5 ms Following is my…
xf Li
  • 11
0
votes
1 answer

What is "CCIR601_sampling" in libjpeg?

As the title states: Both the jpeg_compress_struct and the jpeg_decompress_struct in libjpeg have a field defined like this: boolean CCIR601_sampling; /* TRUE=first samples are cosited */ I am having a hard time figuring out what this means, or…
Greg Kennedy
  • 430
  • 4
  • 23
0
votes
1 answer

How to force ROS compressed_image_transport to use libturbojpeg for jpeg compression?

In my Jetson Xavier, a see 'libjpegturbo' library is available. How can I make compressed_image_transport plugin to use 'turbojpeg' library for good compression level. Below is a snapchot of ldconfig..
Jai
  • 377
  • 2
  • 14
0
votes
1 answer

TurboJPEG API from libjpeg-turbo-1.5.1-vc.exe produces wrong output

I wrote a test-program in C in Visual Studio 2015 for testing libjpeg-turbo TurboJPEG-API. In this test-program I generate an image of 800x800 RGB pixels and write this to disk. When I use TJSAMP_GRAY at the tjCompress2 function the produced image…
Matthias
  • 948
  • 1
  • 6
  • 25
1
2