⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jcmainct.c

📁 基于Linux的ffmepg decoder
💻 C
字号:
/* * jcmainct.c * * Copyright (C) 1994-1996, Thomas G. Lane. * This file is part of the Independent JPEG Group's software. * For conditions of distribution and use, see the accompanying README file. * * This file contains the main buffer controller for compression. * The main buffer lies between the pre-processor and the JPEG * compressor proper; it holds downsampled data in the JPEG colorspace. */#define JPEG_INTERNALS#include "jinclude.h"#include "jpeglib.h"/* Note: currently, there is no operating mode in which a full-image buffer * is needed at this step.  If there were, that mode could not be used with * "raw data" input, since this module is bypassed in that case.  However, * we've left the code here for possible use in special applications. */#undef FULL_MAIN_BUFFER_SUPPORTED/* Private buffer controller object */typedef struct {  struct jpeg_c_main_controller pub; /* public fields */  JDIMENSION cur_iMCU_row;	/* number of current iMCU row */  JDIMENSION rowgroup_ctr;	/* counts row groups received in iMCU row */  //boolean suspended;		/* remember if we suspended output */  //J_BUF_MODE pass_mode;		/* current operating mode */} my_main_controller;typedef my_main_controller * my_main_ptr;/* * Initialize for a processing pass. */METHODDEF(void)start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode){  my_main_ptr main = (my_main_ptr) cinfo->main;  main->cur_iMCU_row = 0;	/* initialize counters */  main->rowgroup_ctr = 0;}/* * Process some data. * This routine handles the simple pass-through mode, * where we have only a strip buffer. */GLOBAL(void)  process_data_simple_main1 (j_compress_ptr cinfo, JDIMENSION *in_row_ctr){  my_main_ptr main = (my_main_ptr) cinfo->main;   while (main->cur_iMCU_row < cinfo->total_iMCU_rows) {             	*in_row_ctr += v_sampf[0]<<3;	cMCUrow = main->cur_iMCU_row; //pwhsu++:20040120	compress_data1(cinfo);    main->rowgroup_ctr = 0;    main->cur_iMCU_row++;  }	/*end of while*/  //pwhsu:20031020}/* * Initialize main buffer controller. */GLOBAL(void)jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer){  my_main_ptr main;  //int ci;  //jpeg_component_info *compptr;  main = (my_main_ptr)    (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,				SIZEOF(my_main_controller));  cinfo->main = (struct jpeg_c_main_controller *) main;  main->pub.start_pass = start_pass_main;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -