1. 22 Dec, 2010 1 commit
    • Robert Sprowson's avatar
      Reorganise rojpeg. · e5be19dd
      Robert Sprowson authored
      Aside from moving blocks around and adding comments, decisions about numcomponents use switch/case statements to allow CMYK support in the future.
      Split out (some of the) Huffman decoding to allow arithmetic support in the future.
      Moved memcpy() and memset() into CSupport.
      Tested in all colour depths with 1x1; 1x2; 2x1; 2x2 sampling & ChangeFSI.
      Tighten up check on cinfo being NULL (was previously only checked in the colour decoder, not the monochrome).
      
      Version 1.37. Tagged as 'SprExtend-1_37'
      e5be19dd
  2. 13 Oct, 2010 1 commit
    • Robert Sprowson's avatar
      Paper and fill some JPEG cracks. · 06d6b99e
      Robert Sprowson authored
      The exit_c function was repeatedly being called with the line number argument and error code the wrong way round and since only bits 0-2 of the error code are inspected on exit any fatal exits from the ported JPEG library code would either report the wrong error or fail silently (depending on the line number) - example a 12 bits per sample JPEG would be rendered without fault into a screen full of random memory garbage.
      Assembling/compiling with the 'jpeg' switch off didn't work, fixed, and also now zeros out the SWI decode values in the module header.
      Moved include of 'yuvtabs.s' into the colour conversion code.
      Deleted panic_exit, it did nothing useful but trace a value then exit, so it now just calls exit() like everyone else.
      Removed excess call to find_image_dims(), this was needed just to get the workspace requirements when the JPEG had already been sized up by asm_find_image_dims() earlier. Side effect of removing the pilot JPEG code earlier is that this call can now only get to the JPEG code from a JPEG_ SWI. Changed to just pass the workspace requirements into 'c.PutScaled' and save a duplicate scan.
      Fatal exits from the assembler huffman decoder now report a sensible error.
      Trimmed out all the JPEG assessment code from 'c.PutScaled' and moved it into 'c.rojpeg' so the put scaled is only concerned with putting things scaled.
      Sanitised the #includes a bit.
      Fixed on last check of wp->save_mode looking at the wrong bits for the mode number.
      Resolved all the warning in the genhdr/genyuvtabs/genpalette utilities by casting a bit harder.[A[B
      Added new more descriptive error messages to the messages file (not currently used), and made the 'not supported by' ones consistent so the tokeniser might crunch the file a bit more.
      In looks_like_jpeg() changed a bitwise to logical or.
      Fixed longstanding problem of not being able to render JPEGs at a scale of less than 1/6 in any greyscale mode, because, err, there was no code to do it - only the colour case was checked for. Implemented for 8bpp grey and 32bpp grey (which gets dithered for other lower modes) by just converting the luma channel into an equally weighted RGB value or replicating it for 256 greys.
      Tested in all 8 colour depths on a Risc PC using sampling ratios of 1x1; 2x1; 1x2; 2x2 of the IJG test image scaled in !Draw by 0.16.
      
      Version 1.32. Tagged as 'SprExtend-1_32'
      06d6b99e
  3. 01 Sep, 2010 1 commit
    • Robert Sprowson's avatar
      Clean up pass. · ff031992
      Robert Sprowson authored
      Trim 200+ lines of changes dating back to 1987, combine with non duplicates in the 'BlackLog'.
      Use 'offsetof' macro in genjhdr to avoid warnings about uninitialised variables, rename from makejhdr so all the utils are clearly demarked.
      Add throwback to MkCFSI-j.
      Replace reason codes passed to SWIs with textual equivalents from the respective header files.
      Speed up SWI despatch a bit by making the first few debug instructions depend on 'debuggs'.
      Qualify all of the debug switches with the global 'debug' one.
      Eliminate single use of 'pullx' macro.
      Make do_branch() take an unsigned opcode so 50% of the branches don't result in implied cast warnings.
      Added an UNUSED() macro to reduce a few of the legitimate warnings (the remainder are either in the original JPEG code or ones that it is worth checking the logic of.
      Unixify one last filename.
      
      Version 1.24. Tagged as 'SprExtend-1_24'
      ff031992
  4. 22 Jan, 1997 1 commit
  5. 06 Nov, 1996 1 commit
  6. 05 Nov, 1996 1 commit