#include "contributors.h"
#include <math.h>
#include <time.h>
#include <sys/timeb.h>
#include "global.h"
#include "filehandle.h"
#include "mbuffer.h"
#include "img_luma.h"
#include "img_chroma.h"
#include "img_distortion.h"
#include "intrarefresh.h"
#include "slice.h"
#include "fmo.h"
#include "sei.h"
#include "memalloc.h"
#include "nalu.h"
#include "ratectl.h"
#include "mb_access.h"
#include "context_ini.h"
#include "biariencode.h"
#include "enc_statistics.h"
#include "conformance.h"
#include "report.h"
#include "q_matrix.h"
#include "q_offsets.h"
#include "wp.h"
#include "input.h"
#include "image.h"
#include "errdo.h"
#include "img_process.h"

Go to the source code of this file.
Functions | |
| void | DeblockFrame (ImageParameters *img, imgpel **, imgpel ***) |
| static void | code_a_picture (Picture *pic) |
| static void | field_picture (Picture *top, Picture *bottom) |
| static void | prepare_enc_frame_picture (StorablePicture **stored_pic) |
| static void | writeout_picture (Picture *pic) |
| static byte | picture_structure_decision (Picture *frame, Picture *top, Picture *bot) |
| static void | distortion_fld (Picture *field_pic, ImageData *imgData) |
| static void | field_mode_buffer (ImageParameters *img, InputParameters *params) |
| static void | frame_mode_buffer (ImageParameters *img, InputParameters *params) |
| static void | init_frame (ImageParameters *img) |
| static void | init_field (ImageParameters *img) |
| static void | put_buffer_frame (ImageParameters *p_img) |
| static void | put_buffer_top (ImageParameters *p_img) |
| static void | put_buffer_bot (ImageParameters *p_img) |
| static void | PaddAutoCropBorders (FrameFormat output, int img_size_x, int img_size_y, int img_size_x_cr, int img_size_y_cr, imgpel **pImage[3]) |
| static void | rdPictureCoding (void) |
| static void | ReportFirstframe (int64 tmp_time, int64 me_time) |
| static void | ReportIntra (int64 tmp_time, int64 me_time) |
| static void | ReportP (int64 tmp_time, int64 me_time) |
| static void | ReportB (int64 tmp_time, int64 me_time) |
| static void | ReportNALNonVLCBits (int64 tmp_time, int64 me_time) |
| void | MbAffPostProc (void) |
| void | set_slice_type (ImageParameters *p_img, int slice_type) |
| void | code_a_plane (ImageParameters *img, Picture *pic) |
| int | get_idr_flag (void) |
| void | update_global_stats (StatParameters *gl_stats, StatParameters *cur_stats) |
| void | free_pictures (int stored_pic) |
| int | encode_one_frame (ImageParameters *img) |
| void | copy_params (StorablePicture *enc_picture, seq_parameter_set_rbsp_t *active_sps) |
| static void | calc_picture_bits (Picture *frame) |
| void | frame_picture (Picture *frame, ImageData *imgData, int rd_pass) |
| static void | combine_field (void) |
| static byte | decide_fld_frame (float snr_frame_Y, float snr_field_Y, int bit_field, int bit_frame, double lambda_picture) |
| static void | init_dec_ref_pic_marking_buffer (void) |
| void | UnifiedOneForthPix (StorablePicture *s) |
| void | UnifiedOneForthPix_JV (int nplane, StorablePicture *s) |
| Boolean | dummy_slice_too_big (int bits_slice) |
| static void | copy_motion_vectors_MB (ImageParameters *img, RD_DATA *rdopt) |
| void | copy_rdopt_data (Macroblock *currMB, int bot_block) |
| static void | ReportSimple (ImageParameters *cur_img, char *pic_type, int cur_bits, DistMetric *metric, int tmp_time, int me_time) |
| static void | ReportVerbose (ImageParameters *cur_img, char *pic_type, int cur_bits, int wp_method, int lambda, DistMetric *mPSNR, int tmp_time, int me_time, int direct_mode) |
| static void | ReportVerboseNVB (ImageParameters *cur_img, char *pic_type, int cur_bits, int nvb_bits, int wp_method, int lambda, DistMetric *mPSNR, int tmp_time, int me_time, int direct_mode) |
| static void | ReportVerboseSSIM (ImageParameters *cur_img, char *pic_type, int cur_bits, int wp_method, int lambda, DistMetric *mPSNR, DistMetric *mSSIM, int tmp_time, int me_time, int direct_mode) |
| static void | ReportVerboseNVBSSIM (ImageParameters *cur_img, char *pic_type, int cur_bits, int nvb_bits, int wp_method, int lambda, DistMetric *mPSNR, DistMetric *mSSIM, int tmp_time, int me_time, int direct_mode) |
| int | CalculateFrameNumber (ImageParameters *p_img) |
| void | output_SP_coefficients () |
| void | read_SP_coefficients () |
| void | select_plane (ColorPlane color_plane) |
| static int | is_gop_first_unit (void) |
| void | write_non_vcl_nalu (void) |
Variables | |
| pic_parameter_set_rbsp_t * | PicParSet [MAXPPS] |
| StorablePicture * | enc_picture |
| StorablePicture ** | enc_frame_picture |
| StorablePicture ** | enc_field_picture |
| StorablePicture * | enc_frame_picture_JV [MAX_PLANE] |
Definition in file image.c.
| int CalculateFrameNumber | ( | ImageParameters * | p_img | ) |
Calculates the absolute frame number in the source file out of various variables in img-> and params->.
Definition at line 2041 of file image.c.
References InputParameters::adaptive_idr_period, ImageParameters::b_frame_to_code, ImageParameters::base_dist, GOP_DATA::display_no, InputParameters::EnableIDRGOP, ImageParameters::frame_interval, ImageParameters::frame_no, InputParameters::frame_skip, ImageParameters::frm_number, ImageParameters::gop_number, InputParameters::HierarchicalCoding, InputParameters::idr_period, InputParameters::intra_delay, InputParameters::last_frame, ImageParameters::lastIDRnumber, ImageParameters::lastIntraNumber, InputParameters::no_frames, ImageParameters::number, InputParameters::NumberBFrames, ImageParameters::rewind_frame, ImageParameters::start_frame_no, and ImageParameters::start_tr_gop.
Referenced by prepare_first_layer(), and prepare_second_layer().
| static void code_a_picture | ( | Picture * | pic | ) | [static] |
Encodes a picture.
This is the main picture coding loop.. It is called by all this frame and field coding stuff after the img-> elements have been set up. Not sure whether it is useful for MB-adaptive frame/field coding
Allocates forced INTRA MBs (even for fields!)
Definition at line 226 of file image.c.
References code_a_plane(), ImageParameters::colour_plane_id, ImageParameters::current_mb_nr, ImageParameters::current_slice_nr, ImageParameters::currentPicture, InputParameters::EnableIDRGOP, ImageParameters::frm_no_in_file, ImageParameters::frm_number, get_idr_flag(), ImageParameters::last_idr_number, ImageParameters::MbaffFrameFlag, RandomIntraNewPicture(), and ImageParameters::SumFrameQP.
Referenced by field_picture(), and frame_picture().

| void code_a_plane | ( | ImageParameters * | img, | |
| Picture * | pic | |||
| ) |
picture level initialization of FMO
Definition at line 170 of file image.c.
References ImageParameters::bytes_in_picture, CalculateOffset8Param(), CalculateOffsetParam(), CalculateQuant8Param(), CalculateQuantParam(), ImageParameters::current_mb_nr, ImageParameters::current_slice_nr, DeblockFrame(), encode_one_slice(), encode_one_slice_MBAFF(), FmoEndPicture(), FmoInit(), FmoStartPicture(), storable_picture::imgUV, storable_picture::imgY, ImageParameters::MbaffFrameFlag, ImageParameters::nal_reference_idc, InputParameters::SkipDeBlockNonRef, ImageParameters::slice_group_change_cycle, and InputParameters::Transform8x8Mode.
Referenced by code_a_picture().

| static void combine_field | ( | void | ) | [static] |
form frame picture from two field pictures
Definition at line 1078 of file image.c.
References ImageParameters::height, ImageParameters::height_cr, imgUV_com, imgY_com, ImageParameters::width, ImageParameters::width_cr, YUV400, and ImageParameters::yuv_format.
Referenced by distortion_fld().
| void copy_rdopt_data | ( | Macroblock * | currMB, | |
| int | bot_block | |||
| ) |
For MB level field/frame coding
Definition at line 1633 of file image.c.
References RD_DATA::all_mv, RD_DATA::b8mode, macroblock::b8mode, RD_DATA::b8pdir, macroblock::b8pdir, macroblock::bipred_me, ImageParameters::block_x, ImageParameters::block_y, RD_DATA::c_ipred_mode, macroblock::c_ipred_mode, RD_DATA::cbp, macroblock::cbp, RD_DATA::cbp_blk, macroblock::cbp_blk, RD_DATA::cofAC, ImageParameters::cofAC, RD_DATA::cofDC, ImageParameters::cofDC, RD_DATA::delta_qp, macroblock::delta_qp, RD_DATA::i16offset, ImageParameters::i16offset, storable_picture::imgUV, storable_picture::imgY, RD_DATA::intra_pred_modes, macroblock::intra_pred_modes, RD_DATA::intra_pred_modes8x8, macroblock::intra_pred_modes8x8, RD_DATA::ipredmode, ImageParameters::ipredmode, macroblock::list_offset, RD_DATA::luma_transform_size_8x8_flag, macroblock::luma_transform_size_8x8_flag, ImageParameters::mb_cr_size_x, ImageParameters::mb_cr_size_y, RD_DATA::mb_type, macroblock::mb_type, ImageParameters::MbaffFrameFlag, RD_DATA::mode, storable_picture::motion, pic_motion_params::mv, ImageParameters::num_blk8x8_uv, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_x, ImageParameters::pix_y, RD_DATA::prev_cbp, macroblock::prev_cbp, RD_DATA::prev_dqp, macroblock::prev_dqp, RD_DATA::prev_qp, macroblock::prev_qp, RD_DATA::qp, macroblock::qp, InputParameters::RDOQ_QP_Num, RD_DATA::rec_mb_cr, RD_DATA::rec_mbY, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, storable_picture::ref_pic_num, RD_DATA::refar, ImageParameters::type, update_qp(), InputParameters::UseRDOQuant, YUV400, and ImageParameters::yuv_format.
Referenced by encode_one_slice_MBAFF().

| void DeblockFrame | ( | ImageParameters * | img, | |
| imgpel ** | , | |||
| imgpel *** | ||||
| ) |
Filter all macroblocks in order of increasing macroblock address.
Definition at line 90 of file loopFilter.c.
References DeblockMb(), EdgeLoopChromaMBAff(), EdgeLoopChromaNormal(), EdgeLoopLumaMBAff(), EdgeLoopLumaNormal(), GetStrengthMBAff(), ImageParameters::mb_data, macroblock::mb_type, ImageParameters::MbaffFrameFlag, ImageParameters::PicSizeInMbs, macroblock::qp, and macroblock::qpc.

| static byte decide_fld_frame | ( | float | snr_frame_Y, | |
| float | snr_field_Y, | |||
| int | bit_field, | |||
| int | bit_frame, | |||
| double | lambda_picture | |||
| ) | [static] |
RD decision of frame and field coding.
Definition at line 1138 of file image.c.
Referenced by picture_structure_decision().
| static void distortion_fld | ( | Picture * | field_pic, | |
| ImageData * | imgData | |||
| ) | [static] |
Distortion Field.
Definition at line 1107 of file image.c.
References ImageParameters::auto_crop_bottom, ImageParameters::buf_cycle, combine_field(), find_distortion(), ImageParameters::gop_number, ImageParameters::height, ImageParameters::height_cr, ImageParameters::height_cr_frame, ImageParameters::number, InputParameters::output, pCurImg, ImageParameters::start_frame_no, and YUV400.
Referenced by field_picture().

| Boolean dummy_slice_too_big | ( | int | bits_slice | ) |
| int encode_one_frame | ( | ImageParameters * | img | ) |
Encodes one frame.
Definition at line 361 of file image.c.
References InputParameters::AdaptiveRounding, ImageParameters::AdaptiveRounding, ImageParameters::AverageFrameQP, ImageParameters::b_frame_to_code, InputParameters::basicunit, ImageParameters::bot_MB, ImageParameters::currentPicture, InputParameters::DFAlpha, ImageParameters::DFAlphaC0Offset, InputParameters::DFBeta, ImageParameters::DFBetaOffset, InputParameters::DFDisableIdc, ImageParameters::DFDisableIdc, InputParameters::direct_spatial_mv_pred_flag, ImageParameters::direct_spatial_mv_pred_flag, error(), field_mode_buffer(), field_picture(), ImageParameters::field_picture, ImageParameters::fld_flag, frame_mode_buffer(), ImageParameters::frame_no, frame_picture(), ImageParameters::frameOffsetAvail, ImageParameters::FrameSizeInMbs, free_pictures(), free_slice_list(), free_storable_picture(), ImageParameters::frm_iter, ImageParameters::frm_no_in_file, ImageParameters::frm_number, InputParameters::GenerateMultiplePPS, ImageParameters::gop_number, ImageParameters::height, ImageParameters::height_cr, InputParameters::infile_header, init_frame(), InputParameters::input_file1, ImageParameters::lastIDRnumber, ImageParameters::lastINTRA, ImageParameters::lastIntraNumber, InputParameters::MbInterlace, ImageParameters::nal_reference_idc, InputParameters::output, output_SP_coefficients(), PaddAutoCropBorders(), ImageParameters::pic_order_cnt_type, InputParameters::PicInterlace, picture_structure_decision(), put_buffer_frame(), rc_init_frame(), InputParameters::RCEnable, InputParameters::RCUpdateMode, ImageParameters::rd_pass, InputParameters::rdopt, rdPictureCoding(), InputParameters::RDPictureDecision, InputParameters::RDPictureIntra, read_SP_coefficients(), ReadOneFrame(), InputParameters::redundant_pic_flag, replace_top_pic_with_frame(), ReportNALNonVLCBits(), InputParameters::RestrictRef, InputParameters::si_frame_indicator, InputParameters::source, InputParameters::sp2_frame_indicator, InputParameters::sp_output_indicator, storable_picture::stats, store_picture_in_dpb(), ImageParameters::SumFrameQP, ImageParameters::type, update_global_stats(), UpdateDecoders(), UpdatePixelMap(), InputParameters::Verbose, ImageParameters::width, ImageParameters::width_cr, InputParameters::WPIterMC, InputParameters::WPMCPrecision, wpxInitWPXPasses(), ImageParameters::write_macroblock, write_non_vcl_nalu(), and writeout_picture().
Referenced by encode_one_redundant_frame(), and encode_sequence().

| static void field_mode_buffer | ( | ImageParameters * | img, | |
| InputParameters * | params | |||
| ) | [static] |
Field Mode Buffer.
Definition at line 1182 of file image.c.
References put_buffer_frame().
Referenced by encode_one_frame().

| static void field_picture | ( | Picture * | top, | |
| Picture * | bottom | |||
| ) | [static] |
Encodes a field picture, consisting of top and bottom field.
Definition at line 977 of file image.c.
References alloc_storable_picture(), ImageParameters::auto_crop_bottom, ImageParameters::bottompoc, InputParameters::BRefPictures, ImageParameters::buf_cycle, code_a_picture(), storable_picture::coded_frame, distortion_fld(), ImageParameters::fld_flag, storable_picture::frame_num, ImageParameters::frame_num, storable_picture::frame_poc, ImageParameters::FrameSizeInMbs, get_mb_block_pos_normal(), getNonAffNeighbour(), ImageParameters::gop_number, ImageParameters::height, ImageParameters::height_cr, ImageParameters::height_cr_frame, init_field(), InputParameters::IntraBottom, ImageParameters::MbaffFrameFlag, storable_picture::MbaffFrameFlag, ImageParameters::number, InputParameters::output, storable_picture::pic_num, ImageParameters::PicSizeInMbs, storable_picture::poc, put_buffer_bot(), put_buffer_top(), rc_init_bottom_field(), rc_init_top_field(), InputParameters::RCEnable, InputParameters::RCUpdateMode, set_slice_type(), ImageParameters::start_frame_no, store_picture_in_dpb(), storable_picture::structure, ImageParameters::structure, ImageParameters::SumFrameQP, ImageParameters::ThisPOC, ImageParameters::toppoc, ImageParameters::type, update_mv_limits(), ImageParameters::width, and ImageParameters::width_cr.
Referenced by encode_one_frame().

| static void frame_mode_buffer | ( | ImageParameters * | img, | |
| InputParameters * | params | |||
| ) | [static] |
Frame Mode Buffer.
Definition at line 1194 of file image.c.
References ImageParameters::auto_crop_bottom, ImageParameters::gop_number, ImageParameters::height, ImageParameters::height_cr, ImageParameters::height_cr_frame, InputParameters::MbInterlace, ImageParameters::number, InputParameters::output, InputParameters::PicInterlace, put_buffer_bot(), put_buffer_frame(), put_buffer_top(), and ImageParameters::start_frame_no.
Referenced by encode_one_frame().

| void frame_picture | ( | Picture * | frame, | |
| ImageData * | imgData, | |||
| int | rd_pass | |||
| ) |
Encodes a frame picture.
Definition at line 930 of file image.c.
References code_a_picture(), find_distortion(), ImageParameters::fld_flag, ImageParameters::FrameSizeInMbs, make_frame_picture_JV(), ImageParameters::PicSizeInMbs, prepare_enc_frame_picture(), ImageParameters::structure, ImageParameters::SumFrameQP, and update_mv_limits().
Referenced by encode_one_frame(), and rdPictureCoding().

| void free_pictures | ( | int | stored_pic | ) |
Free storable pictures.
Definition at line 345 of file image.c.
References free_storable_picture().
Referenced by encode_one_frame().

| int get_idr_flag | ( | void | ) |
Determine whether picture is coded as IDR.
Definition at line 269 of file image.c.
References InputParameters::adaptive_idr_period, ImageParameters::frm_number, ImageParameters::gop_number, InputParameters::idr_period, ImageParameters::lastIDRnumber, ImageParameters::lastIntraNumber, ImageParameters::structure, and ImageParameters::type.
Referenced by code_a_picture(), is_gop_first_unit(), and write_non_vcl_nalu().
| static void init_dec_ref_pic_marking_buffer | ( | void | ) | [static] |
mmco initializations should go here
Definition at line 1227 of file image.c.
References ImageParameters::dec_ref_pic_marking_buffer.
Referenced by init_frame().
| static void init_field | ( | ImageParameters * | img | ) | [static] |
Initializes the parameters for a new field.
Definition at line 1368 of file image.c.
References ImageParameters::b_frame_to_code, ImageParameters::bitdepth_luma_qp_scale, ImageParameters::block_c_x, ImageParameters::block_x, ImageParameters::block_y, ImageParameters::buf_cycle, ImageParameters::current_mb_nr, ImageParameters::current_slice_nr, InputParameters::DispPQPOffset, ImageParameters::fld_type, ImageParameters::frame_no, ImageParameters::gop_number, InputParameters::HierarchicalCoding, InputParameters::intra_upd, InputParameters::jumpd, ImageParameters::mb_x, ImageParameters::mb_y, ImageParameters::mb_y_intra, ImageParameters::mb_y_upd, ImageParameters::nal_reference_idc, ImageParameters::number, InputParameters::NumberBFrames, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_x, ImageParameters::pix_y, InputParameters::qp, ImageParameters::qp, InputParameters::qp2start, InputParameters::qpBRSOffset, InputParameters::qpsp, ImageParameters::qpsp, InputParameters::RCEnable, GOP_DATA::slice_qp, InputParameters::sp2_frame_indicator, ImageParameters::start_frame_no, ImageParameters::type, and ImageParameters::width.
Referenced by field_picture().
| static void init_frame | ( | ImageParameters * | img | ) | [static] |
Initializes the parameters for a new frame.
KS: hard code qp increment
Definition at line 1239 of file image.c.
References ImageParameters::b_frame_to_code, ImageParameters::bitdepth_luma_qp_scale, ImageParameters::block_c_x, ImageParameters::block_x, ImageParameters::block_y, ImageParameters::current_mb_nr, ImageParameters::current_slice_nr, InputParameters::DispPQPOffset, ImageParameters::frame_no, ImageParameters::FrameSizeInMbs, ImageParameters::frm_number, ImageParameters::height, InputParameters::HierarchicalCoding, init_dec_ref_pic_marking_buffer(), InputParameters::intra_upd, ImageParameters::long_term_reference_flag, ImageParameters::mb_data, ImageParameters::mb_data_JV, ImageParameters::mb_x, ImageParameters::mb_y, ImageParameters::mb_y_intra, ImageParameters::mb_y_upd, ImageParameters::nal_reference_idc, ImageParameters::no_output_of_prior_pics_flag, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_x, ImageParameters::pix_y, InputParameters::qp, ImageParameters::qp, InputParameters::qp2start, InputParameters::qpBRSOffset, InputParameters::qpsp, ImageParameters::qpsp, InputParameters::RCEnable, macroblock::slice_nr, GOP_DATA::slice_qp, InputParameters::sp2_frame_indicator, and ImageParameters::type.
Referenced by encode_one_frame().

| static int is_gop_first_unit | ( | void | ) | [static] |
Brief Is this picture the first access unit in this GOP?
Definition at line 2517 of file image.c.
References InputParameters::EnableOpenGOP, get_idr_flag(), and ImageParameters::type.
Referenced by write_non_vcl_nalu().

| void output_SP_coefficients | ( | void | ) |
Brief Output SP frames coefficients
Definition at line 2389 of file image.c.
References error(), ImageParameters::height, ImageParameters::height_cr, InputParameters::sp_output_filename, ImageParameters::width, and ImageParameters::width_cr.
Referenced by encode_one_frame().

| static void PaddAutoCropBorders | ( | FrameFormat | output, | |
| int | img_size_x, | |||
| int | img_size_y, | |||
| int | img_size_x_cr, | |||
| int | img_size_y_cr, | |||
| imgpel ** | pImage[3] | |||
| ) | [static] |
Padding of automatically added border for picture sizes that are not multiples of macroblock/macroblock pair size.
| output | Image dimensions | |
| img_size_x | coded image horizontal size (luma) | |
| img_size_y | code image vertical size (luma) | |
| img_size_x_cr | coded image horizontal size (chroma) | |
| img_size_y_cr | code image vertical size (chroma) | |
| pImage | image planes |
Definition at line 1991 of file image.c.
References YUV400, and ImageParameters::yuv_format.
Referenced by encode_one_frame().
| static byte picture_structure_decision | ( | Picture * | frame, | |
| Picture * | top, | |||
| Picture * | bot | |||
| ) | [static] |
Picture Structure Decision.
all distrortions of a field picture are accumulated in the top field
Definition at line 1157 of file image.c.
References ImageParameters::bitdepth_lambda_scale, decide_fld_frame(), ImageParameters::qp, and ImageParameters::type.
Referenced by encode_one_frame().

| static void prepare_enc_frame_picture | ( | StorablePicture ** | stored_pic | ) | [static] |
Prepare and allocate an encoded frame picture structure.
Definition at line 888 of file image.c.
References alloc_storable_picture(), ImageParameters::bottompoc, ImageParameters::frame_num, ImageParameters::framepoc, get_mb_block_pos_mbaff(), get_mb_block_pos_normal(), getAffNeighbour(), getNonAffNeighbour(), ImageParameters::height, ImageParameters::height_cr, ImageParameters::MbaffFrameFlag, InputParameters::MbInterlace, ImageParameters::structure, ImageParameters::ThisPOC, ImageParameters::toppoc, ImageParameters::width, and ImageParameters::width_cr.
Referenced by frame_picture().

| static void put_buffer_bot | ( | ImageParameters * | img | ) | [static] |
point to bottom field coding variables
Definition at line 2135 of file image.c.
References ImageParameters::fld_type, pCurImg, YUV400, and ImageParameters::yuv_format.
Referenced by field_picture(), and frame_mode_buffer().
| static void put_buffer_frame | ( | ImageParameters * | img | ) | [static] |
point to frame coding variables
Definition at line 2097 of file image.c.
References pCurImg, YUV400, and ImageParameters::yuv_format.
Referenced by encode_one_frame(), field_mode_buffer(), and frame_mode_buffer().
| static void put_buffer_top | ( | ImageParameters * | img | ) | [static] |
point to top field coding variables
Definition at line 2115 of file image.c.
References ImageParameters::fld_type, pCurImg, YUV400, and ImageParameters::yuv_format.
Referenced by field_picture(), and frame_mode_buffer().
| static void rdPictureCoding | ( | void | ) | [static] |
performs multi-pass encoding of same picture using different coding conditions
Definition at line 2157 of file image.c.
References ImageParameters::AdaptiveRounding, frame_picture(), ImageParameters::FrameSizeInMbs, InputParameters::GenerateMultiplePPS, intras, ImageParameters::nal_reference_idc, picture_coding_decision(), ImageParameters::qp, rc_init_frame_rdpic(), rc_restore_state(), rc_save_state(), InputParameters::RCEnable, ImageParameters::RCMaxQP, ImageParameters::RCMinQP, ImageParameters::rd_pass, InputParameters::RDBSliceWeightOnly, InputParameters::RDPSliceBTest, InputParameters::RDPSliceWeightOnly, set_slice_type(), ImageParameters::SumFrameQP, ImageParameters::type, InputParameters::WPMCPrecBSlice, InputParameters::WPMCPrecision, and ImageParameters::write_macroblock.
Referenced by encode_one_frame().

| void read_SP_coefficients | ( | void | ) |
Brief Read SP frames coefficients
Definition at line 2441 of file image.c.
References ImageParameters::frame_no, ImageParameters::height, ImageParameters::height_cr, InputParameters::qp2start, ImageParameters::size, InputParameters::sp2_input_filename1, InputParameters::sp2_input_filename2, ImageParameters::width, and ImageParameters::width_cr.
Referenced by encode_one_frame().
| static void ReportNALNonVLCBits | ( | int64 | tmp_time, | |
| int64 | me_time | |||
| ) | [static] |
Need to add type (i.e. SPS, PPS, SEI etc).
Definition at line 1778 of file image.c.
References ImageParameters::frame_no, and InputParameters::Verbose.
Referenced by encode_one_frame().
| void select_plane | ( | ColorPlane | color_plane | ) |
Brief Select appropriate image plane (for 444 coding)
Definition at line 2500 of file image.c.
References ImageParameters::curr_prd, ImageParameters::curr_res, ImageParameters::dc_pred_value, ImageParameters::dc_pred_value_comp, ImageParameters::max_imgpel_value, ImageParameters::max_imgpel_value_comp, ImageParameters::mb_pred, ImageParameters::mb_rres, storable_picture::p_curr_img, storable_picture::p_curr_img_sub, storable_picture::p_img, storable_picture::p_img_sub, and pCurImg.
Referenced by encode_one_macroblock_low(), Intra16x16_Mode_Decision(), LumaResidualCoding8x8(), Mode_Decision_for_4x4IntraBlocks_JM_High(), Mode_Decision_for_4x4IntraBlocks_JM_Low(), Mode_Decision_for_8x8IntraBlocks_JM_High(), Mode_Decision_for_8x8IntraBlocks_JM_Low(), RDCost_for_4x4IntraBlocks(), RDCost_for_8x8IntraBlocks(), and UnifiedOneForthPix().
| void set_slice_type | ( | ImageParameters * | p_img, | |
| int | slice_type | |||
| ) |
Sets slice type.
Definition at line 163 of file image.c.
References InputParameters::RCMaxQP, ImageParameters::RCMaxQP, InputParameters::RCMinQP, ImageParameters::RCMinQP, and ImageParameters::type.
Referenced by encode_one_redundant_frame(), ExplicitUpdateImgParams(), field_picture(), rdPictureCoding(), and SetImgType().
| void UnifiedOneForthPix | ( | StorablePicture * | s | ) |
Upsample 4 times, store them in out4x. Color is simply copied.
Definition at line 1482 of file image.c.
References InputParameters::ChromaMCBuffer, get_mem4Dpel(), get_mem5Dpel(), getSubImagesChroma(), getSubImagesLuma(), storable_picture::imgUV_sub, storable_picture::imgY, storable_picture::imgY_sub, InputParameters::intra_period, no_mem_exit(), ImageParameters::P444_joined, storable_picture::p_curr_img, storable_picture::p_curr_img_sub, storable_picture::p_img_sub, select_plane(), storable_picture::size_x_padded, storable_picture::size_y_padded, YUV400, YUV420, YUV422, and ImageParameters::yuv_format.
Referenced by dpb_combine_field(), dpb_split_field(), insert_picture_in_dpb(), and replace_top_pic_with_frame().

| void UnifiedOneForthPix_JV | ( | int | nplane, | |
| StorablePicture * | s | |||
| ) |
Upsample 4 times, store them in out4x. Color is simply copied for 4:4:4 Independent mode.
Definition at line 1568 of file image.c.
References storable_picture::colour_plane_id, get_mem4Dpel(), get_mem5Dpel(), getSubImagesLuma(), storable_picture::imgUV, storable_picture::imgUV_sub, storable_picture::imgY, storable_picture::imgY_sub, no_mem_exit(), storable_picture::p_curr_img, storable_picture::p_curr_img_sub, storable_picture::p_img, storable_picture::p_img_sub, storable_picture::size_x_padded, and storable_picture::size_y_padded.
Referenced by dpb_combine_field(), dpb_split_field(), insert_picture_in_dpb(), and replace_top_pic_with_frame().

| void update_global_stats | ( | StatParameters * | gl_stats, | |
| StatParameters * | cur_stats | |||
| ) |
Update global stats.
Definition at line 300 of file image.c.
References InputParameters::skip_gl_stats.
Referenced by encode_one_frame().
| void write_non_vcl_nalu | ( | void | ) |
Brief AUD, SPS, PPS, and SEI messages
Commented out by StW, needs fixing in SEI.h to keep the trace file clean
Definition at line 2528 of file image.c.
References ImageParameters::frm_number, get_idr_flag(), is_gop_first_unit(), ImageParameters::layer, ImageParameters::number, PrepareAggregationSEIMessage(), InputParameters::ResendPPS, InputParameters::ResendSPS, rewrite_paramsets(), InputParameters::SendAUD, InputParameters::ToneMappingSEIPresentFlag, ImageParameters::type, UpdateSubseqInfo(), Write_AUD_NALU(), and write_PPS().
Referenced by encode_one_frame().

| static void writeout_picture | ( | Picture * | pic | ) | [static] |
This function write out a picture.
Definition at line 835 of file image.c.
References datapartition::bitstream, ImageParameters::currentPicture, Slice::max_part_nr, datapartition::nal_unit, Slice::partArr, and Bitstream::write_flag.
Referenced by encode_one_frame().
| StorablePicture* enc_frame_picture_JV[MAX_PLANE] |
enc_frame_picture to be used during 4:4:4 independent mode encoding
enc_frame to be used during 4:4:4 independent mode encoding
Definition at line 93 of file image.c.
Referenced by change_plane_JV(), and make_frame_picture_JV().