#include <math.h>
#include <limits.h>
#include "global.h"
#include "rdopt.h"
#include "q_around.h"
#include "rdopt_coding_state.h"
#include "memalloc.h"
#include "mb_access.h"
#include "elements.h"
#include "intrarefresh.h"
#include "image.h"
#include "transform8x8.h"
#include "cabac.h"
#include "biariencode.h"
#include "vlc.h"
#include "me_umhex.h"
#include "ratectl.h"
#include "mode_decision.h"
#include "rd_intra_jm.h"
#include "fmo.h"
#include "macroblock.h"
#include "symbol.h"
#include "q_offsets.h"
#include "conformance.h"
#include "errdo.h"
#include "mv-search.h"
#include "md_common.h"

Go to the source code of this file.
Defines | |
| #define | FASTMODE 1 |
| #define | IS_FW ((b8x8info->best8x8pdir[mode][k]==0 || b8x8info->best8x8pdir[mode][k]==2) && (mode!=P8x8 || b8x8info->best8x8mode[k]!=0 || !bslice)) |
| #define | IS_BW ((b8x8info->best8x8pdir[mode][k]==1 || b8x8info->best8x8pdir[mode][k]==2) && (mode!=P8x8 || b8x8info->best8x8mode[k]!=0)) |
Functions | |
| void | StoreMV8x8 (int dir) |
| void | RestoreMV8x8 (int dir) |
| void | alloc_rd8x8data (RD_8x8DATA *rd_data) |
| void | free_rd8x8data (RD_8x8DATA *rd_data) |
| void | clear_rdopt (InputParameters *params) |
| void | init_rdopt (InputParameters *params) |
| void | UpdatePixelMap () |
| int | CheckReliabilityOfRef (int block, int list_idx, int ref, int mode) |
| double | RDCost_for_4x4IntraBlocks (Slice *currSlice, Macroblock *currMB, int *nonzero, int b8, int b4, int ipmode, double lambda, int mostProbableMode, int c_nzCbCr[3], int is_cavlc) |
| double | RDCost_for_8x8blocks (Slice *currSlice, Macroblock *currMB, int *cnt_nonz, int64 *cbp_blk, double lambda, int block, int mode, short pdir, short l0_ref, short l1_ref, short bipred_me, int is_cavlc) |
| int | I16Offset (int cbp, int i16mode) |
| void | SetModesAndRefframeForBlocks (Macroblock *currMB, int mode) |
| void | SetCoeffAndReconstruction8x8 (Macroblock *currMB) |
| int | RDCost_for_macroblocks (Slice *currSlice, Macroblock *currMB, double lambda, int mode, double *min_rdcost, double *min_dcost, double *min_rate, int i16mode, int is_cavlc) |
| void | store_macroblock_parameters (Macroblock *currMB, int mode) |
| void | set_stored_macroblock_parameters (Macroblock *currMB) |
| void | SetRefAndMotionVectors (PicMotionParams *motion, Macroblock *currMB, int block, int mode, int pdir, int fwref, int bwref, short bipred_me) |
| byte | field_flag_inference (Macroblock *currMB) |
| void | StoreMVBlock8x8 (int dir, int block8x8, int mode, int l0_ref, int l1_ref, int pdir8, int bipred_me, int bslice) |
| void | RestoreMVBlock8x8 (int dir, int block8x8, RD_8x8DATA *tr, int bslice) |
| void | StoreNewMotionVectorsBlock8x8 (int dir, int block8x8, int mode, int l0_ref, int l1_ref, int pdir8, int bipred_me, int bslice) |
| int | GetBestTransformP8x8 () |
| void | set_mbaff_parameters (Macroblock *currMB) |
| void | store_coding_state_cs_cm (Slice *currSlice, Macroblock *currMB) |
| void | reset_coding_state_cs_cm (Slice *currSlice, Macroblock *currMB) |
| void | assign_enc_picture_params (int mode, char best_pdir, int block, int list_offset, int best_l0_ref, int best_l1_ref, int bslice, short bipred_me) |
| void | copy_4x4block (imgpel **oblock, imgpel **iblock, int o_xoffset, int i_xoffset) |
| void | set_block8x8_info (Block8x8Info *b8x8info, int mode, int block, char best_ref[2], char best_pdir, short bipred_me) |
| void | set_subblock8x8_info (Block8x8Info *b8x8info, int mode, int block, RD_8x8DATA *tr) |
| void | update_refresh_map (int intra, int intra1, Macroblock *currMB) |
| int | valid_intra_mode (int ipmode) |
| void | compute_comp_cost (imgpel **cur_img, imgpel **prd_img, int pic_opix_x, int *cost) |
| void | generate_pred_error (imgpel **cur_img, imgpel **prd_img, imgpel **cur_prd, int **m7, int pic_opix_x, int block_x) |
| void | update_qp_cbp_tmp (Macroblock *currMB, int cbp, int best_mode) |
| void | update_qp_cbp (Macroblock *currMB, short best_mode) |
Variables | |
| static int | diff [16] |
| static int | diff4x4 [64] |
| static int | diff8x8 [64] |
| RD_8x8DATA | tr4x4 |
| RD_8x8DATA | tr8x8 |
| imgpel *** | rec8x8 = NULL |
| imgpel *** | rec4x4 = NULL |
| imgpel *** | rec4x4CbCr = NULL |
| imgpel ** | pred = NULL |
| imgpel ** | rec_mbY = NULL |
| imgpel *** | rec_mb_cr = NULL |
| static int ** | lrec_rec = NULL |
| static int *** | lrec_rec_uv = NULL |
| int **** | cofAC = NULL |
| int *** | cofDC = NULL |
| int ** | cofAC4x4 = NULL |
| int **** | cofAC4x4intern = NULL |
| int | cbp |
| int | cbp8x8 |
| int | cnt_nonz_8x8 |
| int | cbp_blk8x8 |
| char ** | l0_refframe |
| char ** | l1_refframe |
| short | b8mode [4] |
| short | b8pdir [4] |
| short | b8bipred_me [4] |
| CSptr | cs_mb = NULL |
| CSptr | cs_b8 = NULL |
| CSptr | cs_cm = NULL |
| CSptr | cs_ib8 = NULL |
| CSptr | cs_ib4 = NULL |
| int | best_c_imode |
| int | best_i16offset |
| short | best_mode |
| int | luma_transform_size_8x8_flag |
| short ***** | all_mv8x8 = NULL |
| int ***** | cofAC4x4CbCrintern = NULL |
| int ***** | cofAC8x8ts = NULL |
| int ***** | coefAC8x8 = NULL |
| int ** | cofAC4x4CbCr [2] |
| int64 | cbp_blk8_8x8ts |
| int | cbp8_8x8ts |
| int | cost8_8x8ts |
| int | cnt_nonz8_8x8ts |
| double | mb16x16_cost |
| double | lambda_mf_factor |
| char | b4_ipredmode [16] |
| char | b4_intra_pred_modes [16] |
Definition in file rdopt.c.
| int CheckReliabilityOfRef | ( | int | block, | |
| int | list_idx, | |||
| int | ref, | |||
| int | mode | |||
| ) |
Checks if a given reference frame is reliable for the current macroblock, given the motion vectors that the motion search has returned.
Definition at line 324 of file rdopt.c.
References ImageParameters::all_mv, ImageParameters::block_x, ImageParameters::block_y, ImageParameters::height, pixel_map, and ImageParameters::width.
Referenced by list_prediction_cost().
| void clear_rdopt | ( | InputParameters * | params | ) |
delete structure for RD-optimized mode decision
Definition at line 127 of file rdopt.c.
References delete_coding_state(), free_mem2D(), free_mem2Dint(), free_mem2Dpel(), free_mem3Dint(), free_mem3Dpel(), free_mem5Dshort(), free_mem_ACcoeff(), free_mem_ACcoeff_new(), free_mem_DCcoeff(), and InputParameters::Transform8x8Mode.
Referenced by free_encoder_memory().

| void copy_4x4block | ( | imgpel ** | oblock, | |
| imgpel ** | iblock, | |||
| int | o_xoffset, | |||
| int | i_xoffset | |||
| ) |
copy data in iblock to oblock
Definition at line 2664 of file rdopt.c.
Referenced by Mode_Decision_for_4x4IntraBlocks_JM_High().
| byte field_flag_inference | ( | Macroblock * | currMB | ) |
skip macroblock field inference
Definition at line 2160 of file rdopt.c.
References ImageParameters::mb_data, macroblock::mb_field, macroblock::mbAddrA, macroblock::mbAddrB, macroblock::mbAvailA, and macroblock::mbAvailB.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), encode_one_macroblock_low(), RDCost_for_macroblocks(), and writeMBLayer().
| int GetBestTransformP8x8 | ( | void | ) |
Makes the decision if 8x8 tranform will be used (for RD-off).
Definition at line 2405 of file rdopt.c.
References distortion4x4(), distortion8x8(), ImageParameters::opix_x, ImageParameters::opix_y, pCurImg, and InputParameters::Transform8x8Mode.
Referenced by encode_one_macroblock_low().

| int I16Offset | ( | int | cbp, | |
| int | i16mode | |||
| ) |
Gets mode offset for intra16x16 mode.
Definition at line 739 of file rdopt.c.
Referenced by encode_one_macroblock_low(), and RDCost_for_macroblocks().
| void init_rdopt | ( | InputParameters * | params | ) |
create structure for RD-optimized mode decision
Definition at line 177 of file rdopt.c.
References create_coding_state(), InputParameters::CtxAdptLagrangeMult, distortionSSE(), encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), encode_one_macroblock_low(), find_sad_16x16_JM(), get_mem2D(), get_mem2Dint(), get_mem2Dpel(), get_mem3Dint(), get_mem3Dpel(), get_mem5Dshort(), get_mem_ACcoeff(), get_mem_ACcoeff_new(), get_mem_DCcoeff(), Mode_Decision_for_4x4IntraBlocks_JM_High(), Mode_Decision_for_4x4IntraBlocks_JM_Low(), Mode_Decision_for_8x8IntraBlocks_JM_High(), Mode_Decision_for_8x8IntraBlocks_JM_Low(), InputParameters::rdopt, and InputParameters::Transform8x8Mode.
Referenced by init_encoder().

| double RDCost_for_4x4IntraBlocks | ( | Slice * | currSlice, | |
| Macroblock * | currMB, | |||
| int * | nonzero, | |||
| int | b8, | |||
| int | b4, | |||
| int | ipmode, | |||
| double | lambda, | |||
| int | mostProbableMode, | |||
| int | c_nzCbCr[3], | |||
| int | is_cavlc | |||
| ) |
R-D Cost for an 4x4 Intra block.
Definition at line 470 of file rdopt.c.
References assignSE2partition, syntaxelement::context, storable_picture::imgY, syntaxelement::len, ImageParameters::opix_y, ImageParameters::P444_joined, storable_picture::p_curr_img, Slice::partArr, InputParameters::partition_mode, pCurImg, ImageParameters::pix_x, ImageParameters::pix_y, select_plane(), syntaxelement::type, syntaxelement::value1, writeCoeff4x4_CABAC(), and writeCoeff4x4_CAVLC().
Referenced by Mode_Decision_for_4x4IntraBlocks_JM_High().

| double RDCost_for_8x8blocks | ( | Slice * | currSlice, | |
| Macroblock * | currMB, | |||
| int * | cnt_nonz, | |||
| int64 * | cbp_blk, | |||
| double | lambda, | |||
| int | block, | |||
| int | mode, | |||
| short | pdir, | |||
| short | l0_ref, | |||
| short | l1_ref, | |||
| short | bipred_me, | |||
| int | is_cavlc | |||
| ) |
R-D Cost for an 8x8 Partition.
Definition at line 558 of file rdopt.c.
References macroblock::ar_mode, arienco_bits_written(), assignSE2partition, B8Mode2Value(), macroblock::bipred_me, ImageParameters::block_x, ImageParameters::block_y, compute_residue_block(), ImageParameters::currentSlice, decode_one_b8block(), direct_pdir, direct_ref_idx, datapartition::ee_cabac, storable_picture::imgUV, storable_picture::imgY, syntaxelement::len, macroblock::luma_transform_size_8x8_flag, LumaResidualCoding8x8(), ImageParameters::mb_pred, InputParameters::NoOfDecoders, ImageParameters::num_ref_idx_l0_active, ImageParameters::num_ref_idx_l1_active, ImageParameters::opix_x, ImageParameters::opix_y, ImageParameters::P444_joined, storable_picture::p_dec_img, storable_picture::p_img, Slice::partArr, InputParameters::partition_mode, pCurImg, ImageParameters::pix_x, ImageParameters::pix_y, InputParameters::rdopt, Decoders::res_img, Slice::tex_ctx, syntaxelement::type, ImageParameters::type, ue_linfo(), syntaxelement::value1, writeCBP_BIT_CABAC(), writeCoeff8x8(), writeMotionVector8x8(), and writeReferenceFrame().
Referenced by submacroblock_mode_decision().

| int RDCost_for_macroblocks | ( | Slice * | currSlice, | |
| Macroblock * | currMB, | |||
| double | lambda, | |||
| int | mode, | |||
| double * | min_rdcost, | |||
| double * | min_dcost, | |||
| double * | min_rate, | |||
| int | i16mode, | |||
| int | is_cavlc | |||
| ) |
R-D Cost for a macroblock.
Definition at line 1310 of file rdopt.c.
References ImageParameters::all_mv, ImageParameters::block_x, ImageParameters::block_y, macroblock::cbp, ChromaResidualCoding(), ImageParameters::cod_counter, compute_residue_block(), decode_one_mb(), direct_pdir, field_flag_inference(), I16Offset(), ImageParameters::i16offset, storable_picture::imgUV, storable_picture::imgY, Intra16x16_Mode_Decision(), ImageParameters::lossless_qpprime_flag, LumaResidualCoding(), ImageParameters::mb_cr_size_x, ImageParameters::mb_cr_size_y, macroblock::mb_field, macroblock::mb_nr, ImageParameters::mb_pred, macroblock::mb_type, ImageParameters::MbaffFrameFlag, Mode_Decision_for_Intra4x4Macroblock(), Mode_Decision_for_Intra8x8Macroblock(), storable_picture::motion, ImageParameters::mpr_16x16, InputParameters::NoOfDecoders, ImageParameters::num_blk8x8_uv, ImageParameters::nz_coeff, ImageParameters::opix_c_x, ImageParameters::opix_c_y, ImageParameters::opix_x, ImageParameters::opix_y, out_of_bounds_mvs(), storable_picture::p_curr_img, storable_picture::p_dec_img, pCurImg, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_y, macroblock::PrevMB, InputParameters::ProfileIDC, macroblock::qp_scaled, InputParameters::RCEnable, InputParameters::rdopt, Decoders::res_img, reset_coding_state(), SetCoeffAndReconstruction8x8(), SetModesAndRefframeForBlocks(), SetMotionVectorsMB(), store_coding_state(), ImageParameters::type, ue_linfo(), writeMBLayer(), YUV400, YUV444, and ImageParameters::yuv_format.
Referenced by compute_mode_RD_cost().

| void reset_coding_state_cs_cm | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
restore coding state (for rd-optimized mode decision), used for 8x8 transformation
Definition at line 2567 of file rdopt.c.
References reset_coding_state().
Referenced by Mode_Decision_for_8x8IntraBlocks_JM_High().

| void RestoreMV8x8 | ( | int | dir | ) |
Restore motion vectors of 8x8 partitions of one macroblock.
Definition at line 2320 of file rdopt.c.
References RestoreMVBlock8x8(), and ImageParameters::type.
Referenced by set_stored_macroblock_parameters(), and SetCoeffAndReconstruction8x8().

| void RestoreMVBlock8x8 | ( | int | dir, | |
| int | block8x8, | |||
| RD_8x8DATA * | tr, | |||
| int | bslice | |||
| ) |
Restore motion vectors for 8x8 partition.
Definition at line 2259 of file rdopt.c.
References ImageParameters::all_mv, ImageParameters::bipred_mv, and error().
Referenced by RestoreMV8x8().

| void set_block8x8_info | ( | Block8x8Info * | b8x8info, | |
| int | mode, | |||
| int | block, | |||
| char | best_ref[2], | |||
| char | best_pdir, | |||
| short | bipred_me | |||
| ) |
Set block 8x8 mode information.
Definition at line 2679 of file rdopt.c.
References Block8x8Info::best8x8l0ref, Block8x8Info::best8x8l1ref, Block8x8Info::best8x8pdir, and Block8x8Info::bipred8x8me.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().
| void set_mbaff_parameters | ( | Macroblock * | currMB | ) |
Sets MBAFF RD parameters.
Definition at line 2457 of file rdopt.c.
References macroblock::b8mode, RD_DATA::b8mode, macroblock::b8pdir, RD_DATA::b8pdir, macroblock::bipred_me, InputParameters::BiPredMERefinements, ImageParameters::block_x, ImageParameters::block_y, macroblock::cbp, RD_DATA::cbp, macroblock::cbp_blk, RD_DATA::cbp_blk, ImageParameters::cofAC, RD_DATA::cofAC, ImageParameters::cofDC, RD_DATA::cofDC, ImageParameters::i16offset, RD_DATA::i16offset, storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes, RD_DATA::intra_pred_modes, macroblock::intra_pred_modes8x8, RD_DATA::intra_pred_modes8x8, RD_DATA::ipredmode, ImageParameters::ipredmode, macroblock::luma_transform_size_8x8_flag, RD_DATA::luma_transform_size_8x8_flag, ImageParameters::mb_cr_size_x, ImageParameters::mb_cr_size_y, macroblock::mb_type, RD_DATA::mb_type, RD_DATA::mode, storable_picture::motion, ImageParameters::num_blk8x8_uv, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_x, ImageParameters::pix_y, RD_DATA::rec_mb_cr, RD_DATA::rec_mbY, pic_motion_params::ref_idx, RD_DATA::refar, ImageParameters::type, YUV400, and ImageParameters::yuv_format.
Referenced by encode_one_macroblock_low().
| void set_stored_macroblock_parameters | ( | Macroblock * | currMB | ) |
Set stored macroblock parameters.
Definition at line 1669 of file rdopt.c.
References ImageParameters::AdaptiveRounding, ImageParameters::all_mv, RD_DATA::b8mode, macroblock::b8mode, RD_DATA::b8pdir, macroblock::b8pdir, macroblock::bipred_me, ImageParameters::bipred_mv, 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, Decoders::dec_mbY_best, macroblock::delta_qp, RD_DATA::delta_qp, errdo_get_best_block(), ImageParameters::i16offset, RD_DATA::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, ImageParameters::ipredmode8x8, is_bipred_enabled(), 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::P444_joined, storable_picture::p_dec_img, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_x, ImageParameters::pix_y, macroblock::prev_cbp, RD_DATA::prev_cbp, macroblock::prev_dqp, RD_DATA::prev_dqp, macroblock::prev_qp, RD_DATA::prev_qp, macroblock::qp, RD_DATA::qp, InputParameters::rdopt, 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, RestoreMV8x8(), SetMotionVectorsMB(), InputParameters::Transform8x8Mode, ImageParameters::type, update_offset_params(), InputParameters::UseRDOQuant, macroblock::valid_8x8, YUV400, and ImageParameters::yuv_format.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), and encode_one_macroblock_highloss().

| void set_subblock8x8_info | ( | Block8x8Info * | b8x8info, | |
| int | mode, | |||
| int | block, | |||
| RD_8x8DATA * | tr | |||
| ) |
Set block 8x8 mode information for P8x8 mode.
Definition at line 2720 of file rdopt.c.
References Block8x8Info::best8x8l0ref, Block8x8Info::best8x8l1ref, Block8x8Info::best8x8mode, Block8x8Info::best8x8pdir, and Block8x8Info::bipred8x8me.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().
| void SetCoeffAndReconstruction8x8 | ( | Macroblock * | currMB | ) |
Sets Coefficients and reconstruction for an 8x8 block.
Definition at line 1028 of file rdopt.c.
References _LUMA_8x8_COEFF_COST_, macroblock::b8mode, macroblock::b8pdir, macroblock::bipred_me, ImageParameters::block_x, ImageParameters::block_y, macroblock::cbp, macroblock::cbp_blk, ImageParameters::cofAC, Decoders::dec_mb_pred_best8x8, Decoders::dec_mbY_best8x8, errdo_get_best_block(), storable_picture::imgUV, storable_picture::imgY, macroblock::list_offset, ImageParameters::lossless_qpprime_flag, macroblock::luma_transform_size_8x8_flag, storable_picture::motion, ImageParameters::P444_joined, storable_picture::p_dec_img, ImageParameters::pix_x, ImageParameters::pix_y, macroblock::qp_scaled, InputParameters::rdopt, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, storable_picture::ref_pic_num, RestoreMV8x8(), StoreMV8x8(), ImageParameters::type, and macroblock::valid_8x8.
Referenced by encode_one_macroblock_low(), and RDCost_for_macroblocks().

| void SetModesAndRefframeForBlocks | ( | Macroblock * | currMB, | |
| int | mode | |||
| ) |
Sets modes and reference frames for a macroblock.
Definition at line 751 of file rdopt.c.
References macroblock::ar_mode, macroblock::b8mode, macroblock::b8pdir, ImageParameters::b8x8info, Block8x8Info::best8x8l0ref, Block8x8Info::best8x8l1ref, Block8x8Info::best8x8mode, Block8x8Info::best8x8pdir, Block8x8Info::bipred8x8me, macroblock::bipred_me, ImageParameters::block_x, ImageParameters::block_y, direct_pdir, direct_ref_idx, macroblock::list_offset, macroblock::luma_transform_size_8x8_flag, macroblock::mb_type, storable_picture::motion, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, storable_picture::ref_pic_num, and ImageParameters::type.
Referenced by compute_mode_RD_cost(), encode_one_macroblock_low(), and RDCost_for_macroblocks().
| void SetRefAndMotionVectors | ( | PicMotionParams * | motion, | |
| Macroblock * | currMB, | |||
| int | block, | |||
| int | mode, | |||
| int | pdir, | |||
| int | fwref, | |||
| int | bwref, | |||
| short | bipred_me | |||
| ) |
Set reference frames and motion vectors.
Definition at line 1968 of file rdopt.c.
References ImageParameters::all_mv, ImageParameters::bipred_mv, ImageParameters::block_x, ImageParameters::block_y, direct_ref_idx, is_bipred_enabled(), macroblock::list_offset, pic_motion_params::mv, InputParameters::part_size, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, storable_picture::ref_pic_num, and ImageParameters::type.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), encode_one_macroblock_low(), submacroblock_mode_decision(), and submacroblock_mode_decision_low().

| void store_coding_state_cs_cm | ( | Slice * | currSlice, | |
| Macroblock * | currMB | |||
| ) |
store coding state (for rd-optimized mode decision), used for 8x8 transformation
Definition at line 2556 of file rdopt.c.
References store_coding_state().

| void store_macroblock_parameters | ( | Macroblock * | currMB, | |
| int | mode | |||
| ) |
Store macroblock parameters.
Definition at line 1557 of file rdopt.c.
References ImageParameters::AdaptiveRounding, ImageParameters::ARCofAdj4x4, ImageParameters::ARCofAdj8x8, macroblock::b8mode, macroblock::b8pdir, macroblock::bipred_me, ImageParameters::block_x, ImageParameters::block_y, macroblock::c_ipred_mode, macroblock::cbp, macroblock::cbp_blk, ImageParameters::cofAC, ImageParameters::cofDC, Decoders::dec_mbY_best, errdo_store_best_block(), ImageParameters::i16offset, storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes, macroblock::intra_pred_modes8x8, ImageParameters::ipredmode, ImageParameters::ipredmode8x8, macroblock::luma_transform_size_8x8_flag, ImageParameters::mb_cr_size_x, ImageParameters::mb_cr_size_y, storable_picture::motion, storable_picture::p_dec_img, ImageParameters::pix_c_x, ImageParameters::pix_c_y, ImageParameters::pix_x, ImageParameters::pix_y, InputParameters::rdopt, pic_motion_params::ref_idx, store_adaptive_rounding_16x16(), ImageParameters::type, YUV400, and ImageParameters::yuv_format.
Referenced by compute_mode_RD_cost().

| void StoreMV8x8 | ( | int | dir | ) |
Store motion vectors of 8x8 partitions of one macroblock.
| void StoreMVBlock8x8 | ( | int | dir, | |
| int | block8x8, | |||
| int | mode, | |||
| int | l0_ref, | |||
| int | l1_ref, | |||
| int | pdir8, | |||
| int | bipred_me, | |||
| int | bslice | |||
| ) |
Store motion vectors for 8x8 partition.
Definition at line 2187 of file rdopt.c.
References ImageParameters::all_mv, ImageParameters::bipred_mv, and error().
Referenced by StoreMV8x8().

| void StoreNewMotionVectorsBlock8x8 | ( | int | dir, | |
| int | block8x8, | |||
| int | mode, | |||
| int | l0_ref, | |||
| int | l1_ref, | |||
| int | pdir8, | |||
| int | bipred_me, | |||
| int | bslice | |||
| ) |
Store predictors for 8x8 partition.
Definition at line 2338 of file rdopt.c.
References ImageParameters::all_mv, and ImageParameters::bipred_mv.
Referenced by submacroblock_mode_decision(), and submacroblock_mode_decision_low().
| void update_qp_cbp | ( | Macroblock * | currMB, | |
| short | best_mode | |||
| ) |
Update QP Parameters (in case of SKIP MBs or MBAFF).
Definition at line 2838 of file rdopt.c.
References macroblock::cbp, RD_DATA::delta_qp, macroblock::delta_qp, InputParameters::MbInterlace, RD_DATA::prev_cbp, macroblock::prev_cbp, macroblock::prev_qp, RD_DATA::qp, ImageParameters::qp, macroblock::qp, and update_qp().
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().

| void UpdatePixelMap | ( | void | ) |
Updates the pixel map that shows, which reference frames are reliable for each MB-area of the picture.
Definition at line 275 of file rdopt.c.
References ImageParameters::height, InputParameters::num_ref_frames, pixel_map, refresh_map, ImageParameters::type, and ImageParameters::width.
Referenced by encode_one_frame().