summaryrefslogtreecommitdiff
path: root/vp9/vp9_cx_iface.c
AgeCommit message (Collapse)Author
2020-02-18Cap delta_q_uv to -15..15Jerome Jiang
only 4 bits in bitstream Change-Id: I338fe54475e094ee5e556467e0b66c982bb560fa
2020-02-05Add coded_frame to EncodeFrameResultsangiebird
This coded_frame represents the raw coded image. Change-Id: Iea439da2f9e84c4507b082d77ebaac49bfd74fff
2020-01-28Fix initialization of delta_q_uvJerome Jiang
Change-Id: If778c6534a5e68a9bcd5974f778e97e1c5cc89ee
2020-01-22Merge "vp9: fix control for delta qp for uv"Jerome Jiang
2020-01-21vp9: fix control for delta qp for uvJerome Jiang
It could be overwritten by other controls. Change-Id: I86b430842d6819d3858bc65e728f7cb2bd471284
2020-01-17add static_assert.hJames Zern
unify COMPILE_TIME_ASSERT definitions and rename to VPX_STATIC_ASSERT Change-Id: Id51150c204e0c4eaf355ee45b20915113209d524
2020-01-17vp9: add delta q for uv channel. add tests.Jerome Jiang
Add control for delta q for uv. 0 by default. Change-Id: Ib8ed160b1a5c9a61ba15985076f6c6f121477103
2019-11-22Change vp9_get_encoder_config.angiebird
Add vp9_dump_encoder_config for config comparison. This function will generate the same VP9EncoderConfig used by the vpxenc command given below. The configs in the vpxenc command corresponds to parameters of vp9_get_encoder_config() as follows. WIDTH: frame_width HEIGHT: frame_height FPS: frame_rate BITRATE: target_bitrate INPUT, OUTPUT, LIMIT will not affect VP9EncoderConfig vpxenc command: INPUT=bus_cif.y4m OUTPUT=output.webm WIDTH=352 HEIGHT=288 BITRATE=600 FPS=30/1 LIMIT=150 ./vpxenc --limit=$LIMIT --width=$WIDTH --height=$HEIGHT --fps=$FPS --lag-in-frames=25 \ --codec=vp9 --good --cpu-used=0 --threads=0 --profile=0 \ --min-q=0 --max-q=63 --auto-alt-ref=1 --passes=2 --kf-max-dist=150 \ --kf-min-dist=0 --drop-frame=0 --static-thresh=0 --bias-pct=50 \ --minsection-pct=0 --maxsection-pct=150 --arnr-maxframes=7 --psnr \ --arnr-strength=5 --sharpness=0 --undershoot-pct=100 --overshoot-pct=100 \ --frame-parallel=0 --tile-columns=0 --cpu-used=0 --end-usage=vbr \ --target-bitrate=$BITRATE -o $OUTPUT $INPUT Change-Id: If7fd635d6f3fad4e6199a4fbcd556323efc1c250
2019-11-18Add frame_type and show_idx to EncodeFrameResultangiebird
Let vp9_get_compressed_data update ENCODE_FRAME_RESULT, a C version of EncodeFrameResult. Let unit test to test frame_type and show_idx properly. Change-Id: Id810c26c826254fd82249f19ab855ea3b440d99c
2019-11-18Add SimpleEncode::EncodeFrame()angiebird
Change-Id: I08f074b7db2011f88769bd1d9d50cb376c238fe5
2019-11-18Add ComputeFirstPassStats()angiebird
Change-Id: Iaed87a4fa35f456aec5d88d07fade636280eb211
2019-11-15vp9_cx_iface: quiet unused fn warning w/CONFIG_REALTIME_ONLYJames Zern
since: 71684703a Remove output_pkt_list from cpi Change-Id: I14afae6598051680fdaf8c7509b6705d73789dd6
2019-11-14Remove output_pkt_list from cpiangiebird
Move the pkt operations to encoder_encode Change-Id: Ibe730baab61bf7a395998641f106eb0f06d3b8ae
2019-11-13Pack psnr pkt outside of vp9_get_compressed_dataangiebird
Change-Id: I5549c3dbcbe1550824deaebf03178e38c1b07d54
2019-11-13Add g_timebase/g_timebase_in_ts to oxcfangiebird
Use get_g_timebase_in_ts() to set priv->timestamp_ratio and oxcf->g_timebase_in_ts Change-Id: Iea9d589cb7e5611067bcedfdf6f5becd4592d3cf
2019-11-13Add frame_rate param to vp9_get_encoder_configangiebird
Change-Id: I14a3d076d71240b4ed2436947418aa3177911fc1
2019-10-30Move noise_sensitivity to set_encoder_configangiebird
Change-Id: Ia9a0d71dc8a329d00ebf20a82d42cda43e13431b
2019-10-29Remove bits_left update in encoder_encode()angiebird
It's already updated properly in vp9_init_second_pass() Change-Id: I94ee2e8536387c94a2abf9a7686011c76489c2f9
2019-10-29Add vp9_get_encoder_config / vp9_get_frame_infoangiebird
Change-Id: Id5c8b2d69a36d218ec04cd504868ce0efebf6b69
2019-09-16Fix msan on svc tests.Jerome Jiang
BUG=b/140939146 Change-Id: Ib3e714f01c58fc0452c7e1adfc8fd3f1d9f8e0a0
2019-06-29vp9_cx_iface,encoder_encode: fix -Wclobbered for ptsJames Zern
Change-Id: Ia7fd4fedb0dcbb626d0e7f4951360e2462b518e2
2019-06-18Fix timestamp overflow issuesYue Chen
- Save the initial user-specified timestamp and rebase all further timestamps by this value. This makes libvpx internal timestamps to always start from zero, regardless of the user's timestamps. - Calculate reduced timestamp conversion ratio and use it to convert user's timestamps to libvpx internal timestamps and back. The effect of this is that integer overflow due to multiplication doesn't happen for a much longer time. BUG=webm:701 Change-Id: Ic6f5eacd9a7c21b95707d31ee2da77dc8ac7dccf
2019-04-23Revert "Add VPX_TUNE_SSIM and VPX_TUNE_PSNR enums"Sai Deng
This reverts commit 1d8d8f562bf382e47071bb38d13b7ded366820af. Reason for revert: change the api names will break existing code. Original change's description: > Add VPX_TUNE_SSIM and VPX_TUNE_PSNR enums > > Change-Id: I3df5af2c60b774e6d395062077542c52db868236 TBR=jingning@google.com,builds@webmproject.org,sdeng@google.com Change-Id: Ic94c19739f595f4544e8b68892ab9d9c1bbccd79 No-Presubmit: true No-Tree-Checks: true No-Try: true
2019-04-23Add VPX_TUNE_SSIM and VPX_TUNE_PSNR enumssdeng
Change-Id: I3df5af2c60b774e6d395062077542c52db868236
2019-04-13Add Tune for SSIM for high bitdepth encodingsdeng
midres_bd10 test results: avg_psnr ssim ms_ssim 3.189 -4.083 -5.258 Change-Id: I9faccc02f34692fc304d82241390f92267f5a72c
2019-04-12Add Tune for SSIMsdeng
Implementation with some tuning of the paper: C. Yeo, H. L. Tan, and Y. H. Tan, "On rate distortion optimization using SSIM," Circuits and Systems for Video Technology, IEEE Transactions on, vol. 23, no. 7, pp. 1170-1181, 2013. Test results: avg_psnr ssim ms-ssim lowres 2.516 -2.622 -2.450 midres 2.312 -3.062 -3.882 hdres 2.292 -4.293 -5.246 The encoding time is about the same as the baseline. Change-Id: Ida2c380ade79b6c15cf12b88bf090069da8765d8
2019-04-03vp8cx.h: s/VP8E_(SET_MAX_INTER_BITRATE_PCT)/VP9E_$1/James Zern
this was renamed in: 268f10669 Provide information on codec controls but the corresponding type checked control call was missed. Change-Id: I151cb42516b10e551b31273327de4ec1bac3c81b
2019-03-14Merge "Enclose macro arguments in parentheses"Jerome Jiang
2019-03-14Enclose macro arguments in parenthesesJerome Jiang
BUG=webm:1606 Change-Id: I661485b860243c95b6450035dbac77b0dd4d9ff4
2019-03-05vp9: map speed > 9 to speed 9.Jerome Jiang
Report warning in example encoder. Change-Id: Iec4cdffce9faa65241756fbdac498214c8b93cc1
2018-11-16vp9: Reorganize the buffer level for cbr modeMarco Paniconi
Refactor the code with some changes. Split update into two parts: move the fillup (with per-frame-bandwidth) before the encoding, and keep the leaking part (with encoded_frame_size) after the encoding (postencode). For SVC with ref_frame_config usage: allow usage of timestamp delta for the fillup part of buffer, instead of the (average) framerate passed in via the duration. Moving the buffer fillup (+per-frame-bandwidth) part to the pre-encode causes some difference in performance (since buffer level affects active_worst/QPand frame-dropping), but the change is observed to be small. Made small adjustment to active_worst_quality to compensate. Adjust some thresholds in datarate tests. Change-Id: I81a5562367034f318cffd451304bc4a34bf02a1d
2018-11-07Merge "vp9: postencode drop frame for screen content in CBR."Jerome Jiang
2018-11-06vp9: postencode drop frame for screen content in CBR.Jerome Jiang
Encode the next frame at max q. For layers: post_encode_drop is only check on base spatial layer, and if base is post-encoded-dropped, then whole superframe is dropped. Added API to guard postencode dropping. Turned off by default. Added unittest. BUG=b/112990050 Change-Id: I42fee279014aca616f7a4d9b582cb2bf5da2f2e7
2018-11-05vpx_codec_enc_config_default: disable 'usage'Johann
Found with clang-tidy. This value is unused in libvpx. There is an existing test which ensures this is not used: test/encode_api_test.cc: EXPECT_EQ(VPX_CODEC_INVALID_PARAM, vpx_codec_enc_config_default(kCodecs[i], &cfg, 1)); Change-Id: I94bd0663c6652b4267204c02c3921972c854d0b0
2018-09-17Remove multi_arf_allowed variable.Paul Wilkins
Removes deprecated multi_arf_allowed variable and dependent code. Change-Id: Ic1cf341f807c38207e728c48a4c4442387db93ff
2018-09-08Merge "Extend auto-alt-ref parameter range"Jingning Han
2018-09-07Extend auto-alt-ref parameter rangeJingning Han
Extend the upper limit from 2 (dual ARFs) to maximum ARF layers. This would later allow --auto-alt-ref to directly control the ARF layer depth later on. Change-Id: I6324fe980122e73dc98f81c8d7de1193a1a16e51
2018-09-05vp9-svc: Allow for setting framerate per spatial layer.Marco Paniconi
Add duration to set_svc_ref_frame_config. BUG=b/113346831 Change-Id: I63613aed6b1183f98d04831600a6bdd645c740df
2018-09-04Increase encoder buffer for multi-layer ARFsJingning Han
When multi-layer ARF mode is enabled, increase the encoder buffer to account for the situation where several ARFs are coded together in a frame packet. Change-Id: I4e53095f6b6ac5a3c8d79414411ac39880bf1523
2018-08-31vp9-svc: Add first_spatial_layer_to_encode per superframeMarco Paniconi
VP9E_SET_SVC_LAYER_ID sets the first spatial layer to encoder per superframe, so add this parameter to svc encoder. This is needed, for example, to properly set is_key_frame for spatial layers when base spatial layer is skipped encoded. Change-Id: Ifd4ac77f539197ec021e62f4c624a6cc79d64f43
2018-08-27Rework enc/dec mismatch detectionJingning Han
The previous enc/dec mismatch detection assumes the previously reconstructed frame would always stay at frame buffer pool index at 0. It could hence cause certain delay in enc/dec mismatch detection when the immediate reconstruction frame is not yet propagated to index 0 in the buffer map pool. This change always keeps the latest decoded show frame buffer index and directly gets the reconstructed frame from encoder and decoder buffer pools to check for mismatch. Change-Id: If53092cbc42ab78d55af5b83f12a489fc362f3ae
2018-08-16SVC: extend api to specify temporal id for each spatial layers.Jerome Jiang
BUG=b/112294545 Change-Id: I5be230c8969d69af3ad87068fdf3834ef1af11d9
2018-08-14Add vpxenc control to turn on/off tpl modelJingning Han
The default is set to turn on the temporal dependency model at speed 0. Use --enable-tpl to control turning it on/off when calling vpxenc. Change-Id: I61614cd8100ae57dc01fd46b2a69c5b67287f18a
2018-08-11vp9-svc: Fix to updated SET_SVC_REF_FRAME_CONFIG controlMarco Paniconi
Add flag to separate two cases of bypass (flexible) SVC mode: usage of using the SET_SVC_REF_FRAME_CONFIG vs passing in the frame_flags in the vpx_encode (only used for temporal layers). This fixes failures in Datarate Temporal layer test, introduced in commit: a66da31 Change-Id: Ie62f933987c20792d1f963d645e98c1903bdd423
2018-08-09vp9-svc: Update to SET/GET_SVC_REF_FRAME_CONFIG apiJerome Jiang
Add update_buffer_slot to SVC API to allow for refreshing any of the 8 reference buffers. Remove frame_flags from the struct. Remove svc tests from vp8 build. BUG=b/112292577 Change-Id: I0551c349d2b311227245a8ed1639cdbbaf5bc5db
2018-07-09vp9-svc: Intra-only frame for spatial layers.Marco Paniconi
Use case is for layered (SVC) coding to allow higher resolution layers to continue decoding with temporal references, while base spatial layer is intra-only frame. Made encoder changes to real-time path for encoding intra-only frame. The intra-only frame will be followed by the overlay/copy frame (with both packed in the same superframe). Use existing control to enable intra_only frame. Intra only is only applied to base spatial layer, and only allowed under fixed/non-flexible SVC mode, and only for 1 < number_spatial_layers < 4. Added svc datarate unittest for inserting intra_only frame as sync frame. Added svc end to end tests to check mismatch. Change-Id: I2f4f0106b2c4f51ce77aa2c1c6823ba83ff2f7a0 Signed-off-by: Marco Paniconi <marpan@google.com>
2018-06-20vp9-svc: Add support for spatial layer sync frames.Marco Paniconi
Add encoder control to allow application to insert spatial layer sync frame. The sync frame disables temporal prediction for that spatial layer. This is useful for RTC application to have receiver start decoding a higher spatial layer, without inserting a key frame on base spatial layer. If the layer sync is requested on the base spatial layer this then force a key frame, otherwise it only disables the temporal reference for that spatial layer, allowing temporal prediction to continue for the other layers. Although the temporal prediction is disabled and reset on a layer sync frame, the inter-layer prediction for the sync frame is enabled on INTER frames. So the meaning of INTER_LAYER_PRED_OFF_NONKEY is modified to mean disable inter-layer prediction on non-key and non-sync frames. Added unittest for inserting layer sync frames. Bump up ABI version. Change-Id: Id458acc400a77c853551f125c4e7b6d001991f03
2018-06-18vp9: Enable cyclic refresh for HBD in real-time.Jerome Jiang
Keep denoiser and skin detection disabled since some key functions don't work with >8 bits source. Add test for HBD with denoiser and cyclic refresh enabled to make sure nothing crashes. BUG=webm:1534 Change-Id: Id61fe1e38ed1768f273870a6bdd5f163aa769fe4
2018-06-08vp9 svc: clean up first_spatial_layer_to_encode.Jerome Jiang
Change-Id: I3c9aefd3ea5028797b9105d7e49b1cb2f762a9fc
2018-06-07vp9 svc: add control to set using second temporal ref.Jerome Jiang
Bump up ABI version. Change-Id: I4498d7ea4ed72994c5f847aa98e75b0150dd7f82