summaryrefslogtreecommitdiff
path: root/vp9/simple_encode.cc
AgeCommit message (Collapse)Author
2021-04-06Fix compilation for CONFIG_RATE_CTRLCheng Chen
Recently, some function signatures have been changed. This change fixes compilation error if --enable-rate-ctrl is used. Change-Id: Ib8e9cb5e181ba1d4a6969883e377f3dd93e9289a
2020-11-24Merge "Revert "Close out file in EndEncode()""Angie Chiang
2020-11-24Revert "Close out file in EndEncode()"Angie Chiang
This reverts commit 7370cecd8929141adb8140b924d3dd8ac1887d36. Reason for revert: I accidentally check in this CL Change-Id: I71ff0b98649070df3edd13b98170a7091541057b
2020-11-24Merge "Close out file in EndEncode()"Angie Chiang
2020-11-20Allow user to set rc_mode and cq_level in SimpleEncodeAngie Chiang
Change-Id: If3f56837e2c78a8b0fe7e0040f297c3f3ddb9c8b
2020-11-09Accumulate frame tpl stats and pass through rate control apiCheng Chen
Tpl stats is computed at the beginning of encoding the altref frame. We aggregate tpl stats of all blocks for every frame of the current group of picture. After the altref frame is encoded, the tpl stats is passed through the encode frame result to external environment. Change-Id: I2284f8cf9c45d35ba02f3ea45f0187edbbf48294
2020-10-02Add SetEncodeConfig and DumpEncodeConfigsangiebird
Change-Id: Ie6864b1133c26021d9c4883df033ecd2969585ed
2020-08-10Close out file in EndEncode()angiebird
Change-Id: Ib6549f954ce6d5d966eef09a119b46f0cc2f54f7
2020-08-10Correct the first pass motion vector scaleangiebird
Change-Id: I005a648f7f9ead9d36a39330dfbb096919affb34
2020-08-10Make target_frame_bits error margin configurable.angiebird
Change-Id: I05dd4d60741743c13951727ce6608acf4224ebec
2020-08-07Add rq_history to encode_frame_resultangiebird
Change-Id: Ic2a52dcf5e5a6d57b80d390a2c48ee498e89e7b2
2020-08-07Fix ObserveFirstPassMotionVectors()angiebird
1) Use kRefFrameTypeNone in the unit test 2) Reset mv_info in fp_motion_vector_info_init 3) Call fp_motion_vector_info_init() in first_pass_encode() 4) Set mv_info for intra frame. 5) Set mv_info with zero mv as default for inter frame 6) Remove duplicated fp_motion_vector_info in encode_frame_info Change-Id: I2f7db5cd4cf1f19db039c9ce638d17b832f45b6e
2020-08-03L2E: Add ObserveFirstPassMotionVectorCheng Chen
Store motion vectors for each 16x16 block found in the first pass motion search. Provide an api "ObserveFirstPassMotionVector()" in SimpleEncode class, similar to "ObserveFirstPassStats()". Change-Id: Ia86386b7e4aa549f7000e7965c287380bf52e62c
2020-07-20Add init version of EncodeFrameWithTargetFrameBits()angiebird
Will add a unit test in a followup CL. Change-Id: I6a6354f307c427e1a352be7c6421927323eb5e1b
2020-07-15Add SetEncodeSpeed() to SimpleEncodeangiebird
Change-Id: I2fcf37045a96bb101de3359e2e69dcc266c1dc10
2020-06-11Let SetExternalGroupOfPicturesMap use c-style arrangiebird
Change-Id: Ic92ce5a3cc5bb74120eb32fc6219e43b1b861f14
2020-06-08Fix assertion error in simple_encode.ccangiebird
Change-Id: I271d11cc35d34d5450a8b56fabcedaf2bb7c6565
2020-05-28Add extra check / unit test to SetExternalGroupOfPicturesMap()angiebird
Let SetExternalGroupOfPicturesMap() modify the gop_map_ to satisfy the following constraints. 1) Each key frame position should be at the start of a gop. 2) The last gop should not use an alt ref. Add unit test for SetExternalGroupOfPicturesMap() Change-Id: Iee9bd238ad0fc5c2ccbf2fbd065a280c854cd718
2020-05-26Add functions to compute/observe key frame mapangiebird
Change-Id: I2fc0efb2ac35e64af3350bddaa802a206d1aa13c
2020-05-26Make SetExternalGroupOfPicture support no arf modeangiebird
Rename external_arf_indexes by gop_map Use kGopMapFlagStart to indicate the start of a gop in the gop_map. Use kGopMapFlagUseAltRef to indicate whether to use altref in the gop_map. Change-Id: I743e3199a24b9ae1abd5acd290da1a1f8660e6ac
2020-05-26Add GOP_COMMANDangiebird
Send GOP_COMMAND to vp9 for setting gop decisions on the fly. GOP_COMMAND has three members. use: use this command to set gop or use vp9's gop decision. show_frame_count: number of show frames in this gop. use_alt_ref: use alt ref frame or not. Move the logic of processing external_arf_indexes_ from get_gop_coding_frame_num() to GetGopCommand() and GetCodingFrameNumFromGopMap(). Change-Id: Ic1942c7a4cf6eecdf3507864577688350c7ef0cf
2020-03-17Correct time_base of ivf header in SimpleEncodeangiebird
Change-Id: I8a14fcad3e7b4c4689f4e7387414e59ba9c4c20a
2020-03-03Add unit test for ref_frame_infoangiebird
Fix several bugs to make the test pass. 1) Move update_frame_indexes() out of show_frame check. 2) Init coding_indexes[i] to -1 when key frame appears 3) Fix a bug in PostUpdateRefFrameInfo() Change-Id: Ie7c70a1d460e5b89475a1aef77416fc9a88387e1
2020-03-03Add key frame group info to SimpleEncodeangiebird
Change-Id: I2c5abbe23c84c6d794e06ed6429136b10fb18683
2020-03-03Add ref_frame_info to encode_frame_resultangiebird
Change-Id: If41a1ea6ce0a2b8db3811f2fa8efcf16f97fa0bd
2020-03-02Add GetVectorData()angiebird
It's necessary to get data pointer from a vector sometimes. This function will guarantee that the data pointer is nullptr if the vector is empty. Change-Id: I156308bcb193fe404452d3cd3b24b3f80c3c3727
2020-02-26Add RefFrameInfoangiebird
RefFrameInfo contains the coding_indexes and valid_list of three reference frame types. Note that I will add unit test in the follow-up CLs. Change-Id: Ia055df1f8a5537b2bdd02c78991df9bbf48e951a
2020-02-25Keep ref frame coding indexes in SimpleEncodeangiebird
Change-Id: Id76aeb54ef93b11ca9a582f76289da0e60368e56
2020-02-24Make external arf consistent with vp9Cheng Chen
Add a test to ensure that encoding with the external arfs gets the same result as long as the arfs are the same as the vp9 baseline. Change-Id: I92c79001018f4df3bc16e9fc56c733509bebb9dc
2020-02-24Allow external arf to determine gop sizeCheng Chen
When "rate_ctrl" experiment is on, we allow the external arf passed from outside to determine group of picture size in define_gf_group(). Change-Id: I0b8c3e1bf3087f21a4e484354168df4967d35bba
2020-02-24Add interface for external arf indexes.Cheng Chen
Pass in external arf indexes to encode command. Change-Id: Ifea5a7d835643760fc5effc594bb448848f6d639
2020-02-21Rename values in RefFrameType and FrameTypeangiebird
Replace golden and altref by past and future in RefFrameType. So that we don't get confused with FrameType and RefFrameType. Change-Id: I1be45d49f76c68869fc4bf53ff946fee9ce7eb9d
2020-02-20Use ref_frame[0] to determine mv_countangiebird
The motion vector counts should be determined by whether this block is using intra_mode or not. Change-Id: If866c91fb8a3f2b3944e5b219a90154d2172690d
2020-02-20Add kGoldenFrame and kOverlayFrame to FrameTypeangiebird
Add coding_index to EncodeFrameInfo Add start_coding_index to GroupOfPicture Add frame_coding_index_ to SimpleEncode The definition of coding index is as follows. Each show or no show frame is assigned with a coding index based on its coding order (starting from zero) in the coding process of the entire video. The coding index for each frame is unique. Change-Id: I43e18434a0dff0d1cd6f927a693d6860e4038337
2020-02-06Replace NULL by nullptr in simple_encode.c/hangiebird
Change-Id: Ib68740a02be852d03a3a2ad4d9d4a7d84d537590
2020-02-06Rename inverse_vpx_rational to invert_vpx_rationalangiebird
Change-Id: I9139ebc22be74e9726eee157821faf22d44bd30f
2020-02-06Pass motion vector info to encode frame resultCheng Chen
Pass the motion vector info stored to the encode frame result through the interface "update_encode_frame_result()". Change-Id: I589affa0c4c4d0fd4d639edff9068e44a715beff
2020-02-05Let SimpleEncode be able to output bitstreamangiebird
Add outfile_path to SimpleEncode() with default value NULL. The encoder will only output bitstream when outfile_path is set. Change-Id: Ic68e5358ea454358c510bb0ae214f4201cb3db39
2020-02-05Add coded_frame to EncodeFrameResultsangiebird
This coded_frame represents the raw coded image. Change-Id: Iea439da2f9e84c4507b082d77ebaac49bfd74fff
2020-01-28Change partition_info to a vectorCheng Chen
Change-Id: Ia59229da51671045448ea904ed65026155868993
2020-01-27Pass partition info to encode frame resultCheng Chen
Init the memory for partition information in "EncodeFrameResult". And pass the partition information of vp9 encoder to it through the interface: "update_encode_frame_result()". Change-Id: Iea049e661da79f54d41da7924b9ef28ff7cfbfa3
2020-01-24Store frame partition infoCheng Chen
Allocate partition information for the frame, and update it when a superblock (64x64) is encoded. The unit size of the smallest block is 4x4. For each 4x4 block, store the current positition (row, column), the start positition (row_start, column_start) of the partition, and the block width and height of the partition. Change-Id: I11c16bbca7e89a088715a1200abd23fe2f9ca1d6
2020-01-13Merge "Copy frame counts to the encode result."Cheng Chen
2020-01-10simple_encode*.cc: add missing copyrightJames Zern
Change-Id: I58ddf13698e3892aa591af4196ca03d7c09426c6
2020-01-09Copy frame counts to the encode result.Cheng Chen
Explicitly copy frame counts of each frame to the encode result struct. Change-Id: Icc18ac83a9e2be8d7a4819f2fffcfda6568b275c
2019-12-16Rename encode_frame_indexangiebird
to next_encode_frame_index Change-Id: Id9bd2a0f6c4278bf0f0c270eb937a317232dead6
2019-12-16Add start_show_index/show_frame_countangiebird
to GroupOfPicture Change-Id: I905be72686b6c0e27ea782a12f1e8a8176c8b0f5
2019-12-12Add GetFramePixelCount to SimpleEncodeangiebird
Gets the total number of pixels of YUV planes per frame. Change-Id: Ifdf35190cdde1378de6d7e93ab4428868a5795fa
2019-12-11Cosmetic changes for RATE_CTRL related functionsangiebird
Move input parameters ahead of output parameters. Change-Id: I384f69523b6be92224535d05373ebb33467a040e
2019-12-10Add GetNextEncodeFrameInfo ObserveGroupOfPictureangiebird
GetNextEncodeFrameInfo() Gets encode_frame_info for the next coding frame. ObserveGroupOfPicture() Provides the group of pictures that the next coding frame is in. Change-Id: Idbc437d32c392f25b06efb2d4e1ec01347d678f2