Title of Invention: Adaptive motion vector precision for video coding Abstract: A method of decoding video data, including receiving an encoded block of video data that was encoded using an inter-prediction mode, receiving one or more syntax elements indicating a motion vector difference (MVD) associated with the encoded block of video data, determining a current MVD precision, from three or more MVD precisions, for the one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, decoding the one or more syntax elements indicating the MVD using the determined current MVD precision, and decoding the encoded block of video data using the decoded MVD. Detailed Description: Part general_description_paragraphs: This application claims the benefit of U.S. Provisional Application No. 62/404,105, filed Oct. 4, 2016, the entire content of which is incorporated by reference herein. Part TECHNICAL FIELD: This disclosure relates to video coding and, more particularly, to inter-prediction video coding. Part BACKGROUND: Digital video capabilities can be incorporated into a wide range of devices, including digital televisions, digital direct broadcast systems, wireless broadcast systems, personal digital assistants (PDAs), laptop or desktop computers, digital cameras, digital recording devices, digital media players, video gaming devices, video game consoles, cellular or satellite radio telephones, video teleconferencing devices, and the like. Digital video devices implement video compression techniques, such as those described in the standards defined by MPEG-2, MPEG-4, ITU-T H.263 or ITU-T H.264/MPEG-4, Part 10, Advanced Video Coding (AVC), and extensions of such standards, to transmit and receive digital video information more efficiently. Video compression techniques perform spatial prediction and/or temporal prediction to reduce or remove redundancy inherent in video sequences. For block-based video coding, a video frame or slice may be partitioned into macroblocks. Each macroblock can be further partitioned. Macroblocks in an intra-coded (I) frame or slice are encoded using spatial prediction with respect to neighboring macroblocks. Macroblocks in an inter-coded (P or B) frame or slice may use spatial prediction with respect to neighboring macroblocks in the same frame or slice or temporal prediction with respect to other reference frames. Part SUMMARY: In general, this disclosure describes techniques for adaptively determining a motion vector and/or motion vector difference (MVD) precision for motion vectors used to encode blocks of video. In examples of this disclosure, a current MVD precision is determined from among three or more MVD precisions. The three or more MVD precisions may include one or more N-sample MVD precisions, where N is an integer indicating a number of samples indicated by each successive codeword of one or more syntax elements indicating an MVD. In some examples, N may be 2, 3, 4 or larger. In one example, this disclosure describes a method of decoding video data, the method comprising receiving an encoded block of video data that was encoded using an inter-prediction mode, receiving one or more syntax elements indicating an MVD associated with the encoded block of video data, determining a current MVD precision, from three or more MVD precisions, for the one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, decoding the one or more syntax elements indicating the MVD using the determined current MVD precision, and decoding the encoded block of video data using the decoded MVD. In another example, this disclosure describes an apparatus configured to decode video data, the apparatus comprising a memory configured to store an encoded block of video data, and one or more processors in communication with the memory, the one or more processors configured to receive an encoded block of video data that was encoded using an inter-prediction mode, receive one or more syntax elements indicating an MVD associated with the encoded block of video data, determine a current MVD precision, from three or more MVD precisions, for the one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, decode the one or more syntax elements indicating the MVD using the determined current MVD precision, and decode the encoded block of video data using the decoded MVD. In another example, this disclosure describes an apparatus configured to decode video data, the apparatus comprising means for receiving an encoded block of video data that was encoded using an inter-prediction mode, means for receiving one or more syntax elements indicating an MVD associated with the encoded block of video data, means for determining a current MVD precision, from three or more MVD precisions, for the one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, means for decoding the one or more syntax elements indicating the MVD using the determined current MVD precision, and means for decoding the encoded block of video data using the decoded MVD. In another example, this disclosure describes a computer-readable storage medium storing instructions that, when executed, cause one or more processors of a device configured to decode video data to receive an encoded block of video data that was encoded using an inter-prediction mode, receive one or more syntax elements indicating an MVD associated with the encoded block of video data, determine a current MVD precision, from three or more MVD precisions, for the one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, decode the one or more syntax elements indicating the MVD using the determined current MVD precision, and decode the encoded block of video data using the decoded MVD. In another example, this disclosure describes a method of encoding video data, the method comprising receiving a block of video data to be encoded using an inter-prediction mode, determining an MVD for the block of video data, determining a current MVD precision, from three or more MVD precisions, for encoding one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, encoding the block of video data using the MVD and the inter-prediction mode, and encoding the one or more syntax elements indicating the MVD using the determined current MVD precision. The details of one or more examples are set forth in the accompanying drawings and the description below. Other features, objects, and advantages will be apparent from the description and drawings, and from the claims. Part DETAILED DESCRIPTION: This disclosure is related to techniques for motion vector (MV) and/or motion vector difference (MVD) coding and signaling, including techniques for adaptively determining MV/MVD precision. The techniques described herein may be used in the context of advanced video codecs, such as extensions of HEVC or the next generation of video coding standards. H.264 and H.265 video encoders and video decoders support motion vectors having one-quarter-pixel precision. In one-quarter-pixel precision, the difference between successive codeword values for an MV or an MVD is equal to one-quarter of the distance between pixels. Likewise, in one-eighth-pixel prediction, the difference between successive codeword values for an MV or an MVD is equal to one-eighth of the distance between pixels. In integer pixel precision, the difference between successive codeword values for an MV or an MVD is equal to a full pixel in distance. The pixel precision used is typically neither signaled nor derived, but instead, is fixed (e.g., preconfigured or predetermined). In some instances, one-eighth-pixel precision may provide certain advantages over one-quarter-pixel precision or integer pixel precision. However, encoding every motion vector to one-eighth-pixel precision may use a large number of coding bits, which may outweigh the benefits otherwise provided by one-eighth-pixel precision motion vectors. That is, the bitrate required to signal an MV or MVD at one-eighth-pixel precision may outweigh any distortion gains. For some types of video content, it may be preferable to code motion vectors without interpolation at all, in other words, using only integer pixel precision. Screen content, such as the content generated by a computer (e.g., text or simple graphics), typically involves series of pixels that all have the exact same pixel values, followed by a sharp change in pixel values. For example, in screen content that includes blue text on a white background, the pixels forming a blue letter may all have the same pixel values, while the white background also all has the same pixel values, but the white pixel values may be significantly different than the blue pixel values. Camera acquired content (e.g., so-called natural images), by contrast, typically includes slow changes in pixel values due to motion, shadows, illumination changes, and other natural phenomena. As screen content and camera-acquired content typically have different characteristics, coding tools effective for one type of content may not necessarily be effective for the other type of content. As one example, sub-pixel interpolation for inter-prediction encoding may improve the coding of camera content, but the associated complexity and signaling overhead may actually reduce coding quality and/or bandwidth efficiency for screen content. In some examples, the techniques of this disclosure may include adaptively determining motion vector precision based on, for example, the content (e.g., the type of content) of the video being coded. In some examples, the techniques of this disclosure may include deriving, by an encoder, an appropriate motion vector precision for the video content being coded. Using the same derivation techniques, a video decoder may also determine, without receiving a syntax element indicating the motion vector precision, what motion vector precision was used to encode the video data. In other examples, a video encoder may signal (and the video decoder may receive), in the encoded video bitstream, the motion vector precision selected by the video encoder. Adaptively selecting motion vector precision may improve overall video coding quality by enabling higher precision motion vectors (e.g., ¼th or ⅛th precision motion vectors) to be used for video content where the use of such higher precision motion vector improves video coding quality, for example, by producing a better rate-distortion tradeoff. Adaptively selecting motion vector precision may also improve overall video coding quality by enabling the use of lower precision motion vectors (e.g., integer precision) for video content where the use of higher precision motion vectors does not improve, or even worsens, video coding quality. Various techniques in this disclosure may be described with reference to a video coder, which is intended to be a generic term that can refer to either a video encoder or a video decoder. Unless explicitly stated otherwise, it should not be assumed that techniques described with respect to a video encoder or a video decoder cannot be performed by the other of a video encoder or a video decoder. For example, in many instances, a video decoder performs the same, or sometimes a reciprocal, coding technique as a video encoder in order to decode encoded video data. In many instances, a video encoder also includes a video decoding loop, and thus the video encoder performs video decoding as part of encoding video data. Thus, unless stated otherwise, the techniques described in this disclosure with respect to a video decoder may also be performed by a video encoder, and vice versa. This disclosure may also use terms such as current layer, current block, current picture, current slice, etc. In the context of this disclosure, the term current is intended to identify a layer, block, picture, slice, etc. that is currently being coded, as opposed to, for example, previously coded layers, blocks, pictures, and slices or yet to be coded blocks, pictures, and slices. FIG. 1 is a block diagram illustrating an example video encoding and decoding system 10 that may utilize the techniques of this disclosure for coding MVs and/or MVDs. As shown in FIG. 1, system 10 includes a source device 12 that transmits encoded video to a destination device 14 via a communication channel 16. Source device 12 and destination device 14 may comprise any of a wide range of devices. In some cases, source device 12 and destination device 14 may comprise wireless communication devices, such as wireless handsets, so-called cellular or satellite radiotelephones, or any wireless devices that can communicate video information over a communication channel 16, in which case communication channel 16 is wireless. The techniques of this disclosure, however, which generally concern techniques for supporting adaptive sub-pixel precision for motion vectors, are not necessarily limited to wireless applications or settings. For example, these techniques may apply to over-the-air television broadcasts, cable television transmissions, satellite television transmissions, Internet video transmissions, encoded digital video that is encoded onto a storage medium, or other scenarios. Accordingly, communication channel 16 may comprise any combination of wireless or wired media suitable for transmission of encoded video data. In the example of FIG. 1, source device 12 includes a video source 18, video encoder 20, a modulator/demodulator (modem) 22 and a transmitter 24. Destination device 14 includes a receiver 26, a modem 28, a video decoder 30, and a display device 32. In accordance with this disclosure, video encoder 20 of source device 12 may be configured to apply the techniques for supporting two or more techniques for coding and/or signaling MVs and/or MVDs. In other examples, a source device and a destination device may include other components or arrangements. For example, source device 12 may receive video data from an external video source 18, such as an external camera. Likewise, destination device 14 may interface with an external display device, rather than including an integrated display device. The illustrated system 10 of FIG. 1 is merely one example. Techniques of this disclosure for coding and/or signaling MVs and/or MVDs may be performed by any digital video encoding and/or decoding device. Although generally the techniques of this disclosure are performed by a video encoding device, the techniques may also be performed by a video encoder/decoder, typically referred to as a “CODEC.” Moreover, the techniques of this disclosure may also be performed by a video preprocessor. Source device 12 and destination device 14 are merely examples of such coding devices in which source device 12 generates coded video data for transmission to destination device 14. In some examples, devices 12, 14 may operate in a substantially symmetrical manner such that each of devices 12, 14 include video encoding and decoding components. Hence, system 10 may support one-way or two-way video transmission between source device 12 and destination device 14, e.g., for video streaming, video playback, video broadcasting, or video telephony. Video source 18 of source device 12 may include a video capture device, such as a video camera, a video archive containing previously captured video, and/or a video feed from a video content provider. As a further alternative, video source 18 may generate computer graphics-based data as the source video, or a combination of live video, archived video, and computer-generated video. In some cases, if video source 18 is a video camera, source device 12 and destination device 14 may form so-called camera phones or video phones. As mentioned above, however, the techniques described in this disclosure may be applicable to video coding in general, and may be applied to wireless and/or wired applications. In each case, the captured, pre-captured, or computer-generated video may be encoded by video encoder 20. The encoded video information may then be modulated by modem 22 according to a communication standard, and transmitted to destination device 14 via transmitter 24. Modem 22 may include various mixers, filters, amplifiers or other components designed for signal modulation. Transmitter 24 may include circuits designed for transmitting data, including amplifiers, filters, and one or more antennas. Receiver 26 of destination device 14 receives information over channel 16, and modem 28 demodulates the information. Again, the video encoding process may implement one or more of the techniques described herein for coding MVs and/or MVDs. The information communicated over channel 16 may include syntax information defined by video encoder 20, which is also used by video decoder 30, that includes syntax elements that describe characteristics and/or processing of macroblocks and other coded units, e.g., groups of pictures (GOPs). Display device 32 displays the decoded video data to a user, and may comprise any of a variety of display devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), a plasma display, an organic light emitting diode (OLED) display, or another type of display device. In the example of FIG. 1, communication channel 16 may comprise any wireless or wired communication medium, such as a radio frequency (RF) spectrum or one or more physical transmission lines, or any combination of wireless and wired media. Communication channel 16 may form part of a packet-based network, such as a local area network, a wide-area network, or a global network such as the Internet. Communication channel 16 generally represents any suitable communication medium, or collection of different communication media, for transmitting video data from source device 12 to destination device 14, including any suitable combination of wired or wireless media. Communication channel 16 may include routers, switches, base stations, or any other equipment that may be useful to facilitate communication from source device 12 to destination device 14. Video encoder 20 and video decoder 30 may operate according to a video compression standard. The techniques of this disclosure, however, are not limited to any particular coding standard. Example standards include the ITU-T H.265 standard, the ITU-T H.264 standard, alternatively referred to as MPEG-4, Part 10, Advanced Video Coding (AVC), MPEG-2 and ITU-T H.263. Although not shown in FIG. 1, in some examples, video encoder 20 and video decoder 30 may each be integrated with an audio encoder and decoder, and may include appropriate MUX-DEMUX units, or other hardware and software, to handle encoding of both audio and video in a common data stream or separate data streams. If applicable, MUX-DEMUX units may conform to the ITU H.223 multiplexer protocol, or other protocols such as the user datagram protocol (UDP). Video coding standards further include ITU-T H.261, ISO/IEC MPEG-1 Visual, ITU-T H.262 or ISO/IEC MPEG-2 Visual, ITU-T H.263, ISO/IEC MPEG-4 Visual and ITU-T H.264 (also known as ISO/IEC MPEG-4 AVC), including its Scalable Video Coding (SVC) and Multi-view Video Coding (MVC) extensions. In addition, a new video coding standard, namely High Efficiency Video Coding (HEVC), has been developed by the Joint Collaboration Team on Video Coding (JCT-VC) of ITU-T Video Coding Experts Group (VCEG) and ISO/IEC Motion Picture Experts Group (MPEG). The latest HEVC draft specification, and referred to as HEVC WD hereinafter, is available from http://phenix.int-evry.fr/jct/doc_end_user/documents/14_Vienna/wg11/JCTVC-N1003-v1.zip. A copy of the finalized HEVC standard (i.e., ITU-T H.265, Series H: AUDIOVISUAL AND MULTIMEDIA SYSTEMS Infrastructure of audiovisual services—Coding of moving video, April, 2015) is available at https://www.itu.int/rec/T-REC-H.265-201504-I/en. ITU-T VCEG (Q6/16) and ISO/IEC MPEG (JTC 1/SC 29/WG 11) are now studying the potential need for standardization of future video coding technology with a compression capability that significantly exceeds that of the current HEVC standard (including its current extensions and near-term extensions for screen content coding and high-dynamic-range coding). The groups are working together on this exploration activity in a joint collaboration effort known as the Joint Video Exploration Team (JVET) to evaluate compression technology designs proposed by their experts in this area. The JVET first met during 19-21 Oct. 2015. And the latest version of reference software, i.e., Joint Exploration Model 3 (JEM 3.0) could be downloaded from: https://jvet.hhi.fraunhofer.de/svn/svn_HMJEMSoftware/tags/HM-16.6-JEM-3.0/ An algorithm description of Joint Exploration Test Model 3 (JEM3) is described in J. Chen, et al., “Algorithm Description of Joint Exploration Test Model 3,” Joint Video Exploration Team (JVET) of ITU-T SG 16 WP 3 and ISO/IEC JTC 1/SC 29/WG 11, 3rd Meeting: Geneva, CH, 26 May-1 Jun. 2016, JVET-C1001. Video encoder 20 and video decoder 30 each may be implemented as any of a variety of suitable encoder circuitry or decoder circuitry, such as one or more microprocessors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), discrete logic, software, hardware, firmware or any combinations thereof. Each of video encoder 20 and video decoder 30 may be included in one or more encoders or decoders, either of which may be integrated as part of a combined encoder/decoder (CODEC) in a respective camera, computer, mobile device, subscriber device, broadcast device, set-top box, server, or the like. A video sequence typically includes a series of video frames. A group of pictures (GOP) generally comprises a series of one or more video frames. A GOP may include syntax data in a header of the GOP, a header of one or more frames of the GOP, or elsewhere, that describes a number of frames included in the GOP. Each frame may include frame syntax data that describes an encoding mode for the respective frame. Video encoder 20 typically operates on video blocks within individual video frames in order to encode the video data. For H.264, a video block may correspond to a macroblock or a partition of a macroblock. The video blocks may have fixed or varying sizes, and may differ in size according to a specified coding standard. Each video frame may include a plurality of slices. Each slice may include a plurality of macroblocks, which may be arranged into partitions, also referred to as sub-blocks. As an example, the ITU-T H.264 standard supports intra prediction in various block sizes, such as 16 by 16, 8 by 8, or 4 by 4 for luma components, and 8×8 for chroma components, as well as inter prediction in various block sizes, such as 16×16, 16×8, 8×16, 8×8, 8×4, 4×8 and 4×4 for luma components and corresponding scaled sizes for chroma components. In this disclosure, “N×N” and “N by N” may be used interchangeably to refer to the pixel dimensions of the block in terms of vertical and horizontal dimensions, e.g., 16×16 pixels or 16 by 16 pixels. In general, a 16×16 block will have 16 pixels in a vertical direction (y=16) and 16 pixels in a horizontal direction (x=16). Likewise, an N×N block generally has N pixels in a vertical direction and N pixels in a horizontal direction, where N represents a nonnegative integer value. The pixels in a block may be arranged in rows and columns. Moreover, blocks need not necessarily have the same number of pixels in the horizontal direction as in the vertical direction. For example, blocks may comprise N×M pixels, where M is not necessarily equal to N. Block sizes that are less than 16 by 16 may be referred to as partitions of a 16 by 16 macroblock. Video blocks may comprise blocks of pixel data in the pixel domain, or blocks of transform coefficients in the transform domain, e.g., following application of a transform such as a discrete cosine transform (DCT), an integer transform, a wavelet transform, or a conceptually similar transform to the residual video block data representing pixel differences between coded video blocks and predictive video blocks. In some cases, a video block may comprise blocks of quantized transform coefficients in the transform domain. Smaller video blocks can provide better resolution, and may be used for locations of a video frame that include high levels of detail. In general, macroblocks and the various partitions, sometimes referred to as sub-blocks, may be considered video blocks. In addition, a slice may be considered to be a plurality of video blocks, such as macroblocks and/or sub-blocks. Each slice may be an independently decodable unit of a video frame. Alternatively, frames themselves may be decodable units, or other portions of a frame may be defined as decodable units. The term “coded unit” may refer to any independently decodable unit of a video frame such as an entire frame, a slice of a frame, a group of pictures (GOP), also referred to as a sequence, or another independently decodable unit defined according to applicable coding techniques. As discussed above, a new video coding standard, referred to as ITU-T H.265, High Efficiency Video Coding (HEVC), has been finalized. Extensions to HEVC include the Screen Content Coding extension. The HEVC standardization efforts were based on a model of a video coding device referred to as the HEVC Test Model (HM). The HM presumes several capabilities of video coding devices over devices according to, e.g., ITU-T H.264/AVC. For example, whereas H.264 provides nine intra-prediction encoding modes, HM provides as many as thirty-three intra-prediction encoding modes. HM refers to a block of video data as a coding unit (CU). Syntax data within a bitstream may define a largest coding unit (LCU), which is a largest coding unit in terms of the number of pixels. In general, a CU has a similar purpose to a macroblock of H.264, except that a CU does not have a size distinction. Thus, a CU may be split into sub-CUs. In general, references in this disclosure to a CU may refer to a largest coding unit of a picture or a sub-CU of an LCU. An LCU may be split into sub-CUs, and each sub-CU may be split into sub-CUs. Syntax data for a bitstream may define a maximum number of times an LCU may be split, referred to as CU depth. Accordingly, a bitstream may also define a smallest coding unit (SCU). This disclosure also uses the term “block” to refer to any of a CU, PU, or TU. Moreover, where this disclosure refers to examples involving a coding unit or CU, it should be understood that other examples may be provided with respect to macroblocks substituted for coding units. An LCU may be associated with a quadtree data structure. In general, a quadtree data structure includes one node per CU, where a root node corresponds to the LCU. If a CU is split into four sub-CUs, the node corresponding to the CU includes four leaf nodes, each of which corresponds to one of the sub-CUs. Each node of the quadtree data structure may provide syntax data for the corresponding CU. For example, a node in the quadtree may include a split flag, indicating whether the CU corresponding to the node is split into sub-CUs. Syntax elements for a CU may be defined recursively, and may depend on whether the CU is split into sub-CUs. A CU that is not split (e.g., corresponding to a leaf node in the quadtree data structure) may include one or more prediction units (PUs). In general, a PU represents all or a portion of the corresponding CU, and includes data for retrieving a reference sample for the PU. For example, when the PU is intra-mode encoded, the PU may include data describing an intra-prediction mode for the PU. As another example, when the PU is inter-mode encoded, the PU may include data defining a motion vector for the PU. The data defining the motion vector may describe, for example, a horizontal component of the motion vector, a vertical component of the motion vector, a resolution for the motion vector (e.g., integer pixel precision, one-quarter pixel precision, one-eighth pixel precision), a reference frame to which the motion vector points, and/or a reference list (e.g., list 0 or list 1) for the motion vector. Data for the CU defining the PU(s) may also describe, for example, partitioning of the CU into one or more PUs. Partitioning modes may differ between whether the CU is uncoded, intra-prediction mode encoded, or inter-prediction mode encoded. A CU having one or more PUs may also include one or more transform units (TUs). Following prediction using a PU, a video encoder may calculate a residual value for the portion of the CU corresponding to the PU. The residual value may be transformed, quantized, and scanned. A TU is not necessarily limited to the size of a PU. Thus, TUs may be larger or smaller than corresponding PUs for the same CU. In some examples, the maximum size of a TU may correspond to the size of the CU that includes the TU. Coding a PU using inter-prediction involves calculating a motion vector between a current block and a block in a reference frame. Motion vectors are calculated through a process called motion estimation (or motion search). A motion vector, for example, may indicate the displacement of a prediction unit in a current frame relative to a reference sample of a reference frame. A reference sample may be a block that is found to closely match the portion of the CU including the PU being coded in terms of pixel difference, which may be determined by sum of absolute difference (SAD), sum of squared difference (SSD), or other difference metrics. The reference sample may occur anywhere within a reference frame or reference slice. In some examples, the reference sample may occur at a fractional pixel position. Upon finding a portion of the reference frame that best matches the current portion, the encoder determines the current motion vector for the current portion as the difference in the location from the current portion to the matching portion in the reference frame (i.e., from the center of the current portion to the center of the matching portion). In some examples, video encoder 20 may signal the motion vector for each portion in the encoded video bitstream. The signaled motion vector is used by video decoder 30 to perform motion compensation in order to decode the video data. However, signaling the original motion vector directly may result in less efficient coding, as a large number of bits are typically needed to convey the information. In some examples, rather than directly signaling the original motion vector, video encoder 20 may predict a motion vector for each partition or video block (e.g., for each PU in HEVC). In performing this motion vector prediction, video encoder 20 may select a set of candidate motion vectors determined from spatially neighboring blocks in the same frame as the current portion or a candidate motion vector determined from a co-located block in a reference frame (e.g., a temporal motion vector predictor (MVP)). Video encoder 20 may perform motion vector prediction, and if needed, signal the prediction difference (also called motion vector difference (MVD)), rather than signal an original motion vector, to reduce bit rate in signaling. The candidate motion vector vectors from the spatially neighboring blocks may be referred to as spatial MVP candidates, whereas the candidate motion vector from the co-located block in another reference frame may be referred to as temporal MVP candidate. In a block-based video coding system, such as HEVC and H.264/AVC video coding standards, for each block, a set of motion information can be available, and is used to generate the inter-prediction results by using a motion compensation process. Typically, a set of motion information contains motion information for forward and backward prediction directions. Here, forward and backward prediction directions are two prediction directions of a bi-directional prediction mode and the terms “forward” and “backward” do not necessarily have a geometry meaning; instead they correspond to reference picture list 0 (RefPicList0) and reference picture list 1 (RefPicList1) of a current picture. When only one reference picture list is available for a picture or slice, only RefPicList0 is available and the motion information of each block of a slice is always forward. For each prediction direction, the motion information usually contains a reference index and a motion vector. In some cases, for simplicity, a motion vector itself may be referenced in a way that it is assumed that it has an associated reference index. A reference index is used to identify a reference picture in the current reference picture list (RefPicList0 or RefPicList1). A motion vector has a horizontal and a vertical component. In HEVC standard, there are two inter prediction modes, named merge (skip is considered as a special case of merge) and advanced motion vector prediction (AMVP) modes, respectively, for a prediction unit (PU). In either AMVP or merge mode, a motion vector (MV) predictor candidate list is maintained for multiple motion vector predictors. The motion vector(s), as well as reference indices in the merge mode, of the current PU are generated by taking one candidate from the MV candidate list. In merge mode, a merge candidate is identified by a merge index, the reference pictures are used for the prediction of the current blocks, as well as the associated motion vectors, and no further motion vector difference (MVD) information is signalled. In AMVP mode, for each potential prediction direction from either list 0 or list 1, a reference index is explicitly signaled, together with an MVP index to the MV candidate list, and the MVD information is further signaled to refine the MV information of the current PU. In merge mode, video encoder 20 instructs video decoder 30, through bitstream signaling of prediction syntax, to copy a motion vector, reference index (identifying a reference frame, in a given reference picture list, to which the motion vector points) and the motion prediction direction (which identifies the reference picture list (List 0 or List 1), i.e., in terms of whether the reference frame temporally precedes or follows the currently coded frame) from a selected candidate motion vector for a current portion of the frame. This is accomplished by signaling in the bitstream an index into a candidate motion vector list identifying the selected candidate motion vector (i.e., the particular spatial MVP candidate or temporal MVP candidate). Thus, for merge mode, the prediction syntax may include a flag identifying the mode (in this case “merge” mode) and an index identifying the selected candidate motion vector. In some instances, the candidate motion vector will be in a causal portion in reference to the current portion. That is, the candidate motion vector will have already been decoded by video decoder 30. As such, video decoder 30 has already received and/or determined the motion vector, reference index, and motion prediction direction for the causal portion. As such, the decoder may simply retrieve the motion vector, reference index, and motion prediction direction associated with the causal portion from memory and copy these values as the motion information for the current portion. To reconstruct a block in merge mode, the decoder obtains the predictive block using the derived motion information for the current portion, and adds the residual data to the predictive block to reconstruct the coded block. In AMVP, video encoder 20 instructs video decoder 30, through bitstream signaling, to only copy the motion vector from the candidate portion and use the copied vector as a predictor for motion vector of the current portion. Video encoder 20 also encodes and signals an MVD to video decoder 30 along with the reference index of the reference frame for motion vector predictor the prediction direction associated with the motion vector predictor of the current block. An MVD is the difference between the current motion vector for the current block and a motion vector predictor derived from a candidate block. In this case, video encoder 20, using motion estimation, determines an actual motion vector for the block to be coded, and then determines the difference between the actual motion vector and the motion vector predictor as the MVD value. In this way, video decoder 30 does not use an exact copy of the candidate motion vector as the current motion vector, as in the merge mode, but may rather use a candidate motion vector that may be “close” in value to the current motion vector determined from motion estimation and add the MVD to reproduce the current motion vector. To reconstruct a block in AMVP mode, video decoder 30 adds the corresponding residual data to the block pointed to by the current motion vector to reconstruct the coded block. In most circumstances, the MVD requires fewer bits to signal than the entire current motion vector. As such, AMVP allows for more precise signaling of the current motion vector while maintaining coding efficiency over sending the whole motion vector. In contrast, the merge mode does not allow for the specification of an MVD, and as such, merge mode sacrifices accuracy of motion vector signaling for increased signaling efficiency (i.e., fewer bits). The prediction syntax for AMVP may include a flag for the mode (in this case AMVP flag), the index for the candidate block, the MVD between the current motion vector and the predictive motion vector from the candidate block, the reference index, and the motion prediction direction. In accordance with example techniques of this disclosure, video encoder 20 may inter-mode encode a CU (e.g., using inter-prediction) using one or more PUs having motion vectors of varying sub-integer and/or integer pixel precision. For example, video encoder 20 may select between using a motion vector having integer pixel precision or fractional (e.g., one-fourth or one-eighth) pixel precision for a PU based on the content of the video data being encoded. According to some techniques of this disclosure, video encoder 20 may not need to generate, for inclusion in the bitstream of encoded video data, an indication of the sub-pixel precision for a motion vector of a PU. Instead, video decoder 30 may derive the motion vector precision using the same derivation techniques used by video encoder 20. According to other techniques of this disclosure, video encoder 20 may include, in the bitstream of encoded video data, one or more syntax elements that video decoder 30 may use to determine the selected motion vector precision. According to the techniques of the disclosure described in more detail below, video encoder 20 and/or video decoder 30 may be configured to determine a motion vector difference (MVD) for a current block of video data using one of a plurality of MVD precisions, including a larger than one integer pixel MVD precision (e.g., 2, 3, 4, or greater pixel precision), and code the MVD for the current block of video data. To calculate values for sub-integer pixel positions (e.g., when performing inter-prediction), video encoder 20 may include a variety of interpolation filters. For example, bilinear interpolation may be used to calculate values for sub-integer pixel positions. Video encoder 20 may be configured to perform a motion search with respect to luminance data of a PU to calculate a motion vector using the luminance data of the PU. Video encoder 20 may then reuse the motion vector to encode chrominance data of the PU. Typically, chrominance data has a lower resolution than corresponding luminance data, e.g., one-quarter of the resolution of luminance data. Therefore, the motion vector for chrominance data may have a higher precision than for luminance data. For example, video encoder 20 and video decoder 30 may use one-quarter pixel precision motion vectors (and calculated MVDs) for luminance data, and may use one-eighth pixel precision for chrominance data. Similarly, video encoder 20 and video decoder 30 may use one-eighth pixel precision motion vectors for luminance data, and may use one-sixteenth pixel precision for chrominance data. Following intra-predictive or inter-predictive coding to produce predictive data and residual data, and following any transforms (such as the 4×4 or 8×8 integer transform used in H.264/AVC or a discrete cosine transform DCT) to produce transform coefficients, quantization of transform coefficients may be performed. Quantization generally refers to a process in which transform coefficients are quantized to possibly reduce the amount of data used to represent the coefficients. The quantization process may reduce the bit depth associated with some or all of the coefficients. For example, an n-bit value may be rounded down to an m-bit value during quantization, where n is greater than m. Following quantization, entropy coding of the quantized data may be performed, e.g., according to content adaptive variable length coding (CAVLC), context adaptive binary arithmetic coding (CABAC), or another entropy coding methodology. A processing unit configured for entropy coding, or another processing unit, may perform other processing functions, such as zero run length coding of quantized coefficients and/or generation of syntax information such as coded block pattern (CBP) values, macroblock type, coding mode, LCU size, or the like. As will be explained in more detail below, video encoder 20 may be configured to receive a block of video data to be encoded using an inter-prediction mode, determine an MVD for the block of video data, determine a current MVD precision, from three or more MVD precisions, for encoding one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, encode the block of video data using the MVD and the inter-prediction mode, and encode the one or more syntax elements indicating the MVD using the determined current MVD precision. Likewise, video decoder 30 may be configured to receive an encoded block of video data that was encoded using an inter-prediction mode, receive one or more syntax elements indicating an MVD associated with the encoded block of video data, determine a current MVD precision, from three or more MVD precisions, for the one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, decode the one or more syntax elements indicating the MVD using the determined current MVD precision, and decode the encoded block of video data using the decoded MVD. Video decoder 30 of destination device 14 may be configured to perform techniques similar, and generally symmetric, to any or all of the techniques of video encoder 20 of this disclosure. FIG. 2 is a block diagram illustrating an example of video encoder 20 that may implement techniques for coding and/or signaling motion vectors and/or MVDs. Video encoder 20 may perform intra- and inter-prediction of blocks within video frames, including LCUs, CUs, and PUs, and calculate residual values that may be encoded as TUs. Intra-coding relies on spatial prediction to reduce or remove spatial redundancy in video within a given video frame. Inter-coding relies on temporal prediction to reduce or remove temporal redundancy in video within adjacent frames of a video sequence. Intra-mode (I-mode) may refer to any of several spatial based compression modes and inter-modes such as uni-directional prediction (P-mode) or bi-directional prediction (B-mode) may refer to any of several temporal-based compression modes. Motion estimation unit 42 and motion compensation unit 44 may perform inter-prediction coding, while intra-prediction unit 46 may perform intra-prediction coding. As shown in FIG. 2, video encoder 20 receives a current video block within a video frame to be encoded. In the example of FIG. 2, video encoder 20 includes video data memory 38, motion compensation unit 44, motion estimation unit 42, intra-prediction unit 46, decoded picture buffer 64, summer 50, transform unit 52, quantization unit 54, and entropy encoding unit 56. For video block reconstruction, video encoder 20 also includes inverse quantization unit 58, inverse transform unit 60, and summer 62. A deblocking filter (not shown in FIG. 2) may also be included to filter block boundaries to remove blockiness artifacts from reconstructed video. If desired, the deblocking filter would typically filter the output of summer 62. Video data memory 38 may store video data to be encoded by the components of video encoder 20. The video data stored in video data memory 38 may be obtained, for example, from video source 18. Decoded picture buffer 64 may be a reference picture memory that stores reference video data for use in encoding video data by video encoder 20, e.g., in intra- or inter-coding modes. Video data memory 38 and decoded picture buffer 64 may be formed by any of a variety of memory devices, such as dynamic random access memory (DRAM), including synchronous DRAM (SDRAM), magnetoresistive RAM (MRAM), resistive RAM (RRAM), or other types of memory devices. Video data memory 38 and decoded picture buffer 64 may be provided by the same memory device or separate memory devices. In various examples, video data memory 38 may be on-chip with other components of video encoder 20, or off-chip relative to those components. During the encoding process, video encoder 20 receives a video frame or slice to be coded. The frame or slice may be divided into multiple video blocks (e.g., LCUs). Motion estimation unit 42 and motion compensation unit 44 perform inter-predictive coding of the received video block relative to one or more blocks in one or more reference frames to provide temporal compression. Intra-prediction unit 46 may perform intra-predictive coding of the received video block relative to one or more neighboring blocks in the same frame or slice as the block to be coded to provide spatial compression. Mode select unit 40 may select one of the coding modes, intra or inter, e.g., based on error results, and provides the resulting intra- or inter-coded block to summer 50 to generate residual block data and to summer 62 to reconstruct the encoded block for use as a reference frame. When mode select unit 40 selects inter-mode encoding for a block, resolution selection unit 48 may select a resolution for a motion vector (e.g., a sub-pixel or integer pixel precision) for the block. For example, resolution selection unit 48 may select one-eighth-pixel precision or one-quarter-pixel precision for a motion vector and MVD for the block. As an example, resolution selection unit 48 may be configured to compare an error difference (e.g., the difference between a reconstructed block and the original block) between using a one-quarter-pixel precision motion vector to encode a block and using a one-eighth-pixel precision motion vector to encode the block. Motion estimation unit 42 may be configured to encode a block using one or more quarter-pixel precision motion vectors in a first coding pass and one or more eighth-pixel precision motion vectors in a second coding pass. Motion estimation unit 42 may further use a variety of combinations of one or more quarter-pixel precision motion vectors and one or more eighth-pixel precision motion vectors for the block in a third encoding pass. Resolution selection unit 48 may calculate rate-distortion values for each encoding pass of the block and calculate differences between the rate-distortion values. When the difference exceeds a threshold, resolution selection unit 48 may select the one-eighth-pixel precision motion vector for encoding the block. Resolution selection unit 48 may also evaluate rate-distortion information, analyze a bit budget, and/or analyze other factors to determine whether to use one-eighth-pixel precision or one-quarter-pixel precision for a motion vector when encoding a block during an inter-mode prediction process. After selecting one-eighth-pixel precision or one-quarter-pixel precision for a block to be inter-mode encoded, mode select unit 40 or motion estimation may send a message (e.g., a signal) to motion estimation unit 42 indicative of the selected precision for a motion vector. In addition, according to the techniques of the disclosure described in more detail below, video encoder 20 may be configured to determine a motion vector difference (MVD) for a current block of video data using one of a plurality of MVD precisions, and code the MVD for the current block of video data. As will be explained in more detail below, video encoder 20 may be configured to receive a block of video data to be encoded using an inter-prediction mode, determine an MVD for the block of video data, determine a current MVD precision, from three or more MVD precisions, for encoding one or more syntax elements indicating the MVD, wherein the three or more MVD precisions include an N-sample MVD precision, where N is an integer indicating a number of samples indicated by each successive codeword of the one or more syntax elements indicating the MVD, and wherein N is greater than 1, encode the block of video data using the MVD and the inter-prediction mode, and encode the one or more syntax elements indicating the MVD using the determined current MVD precision. Motion estimation unit 42 and motion compensation unit 44 may be highly integrated, but are illustrated separately for conceptual purposes. Motion estimation is the process of generating motion vectors, which estimate motion for video blocks.
{'bibliographic_information': "{'country': 'US', 'doc-number': '15724044', 'kind': 'B2', 'date': '20171003', 'extension': '22', 'invention_title': 'Adaptive motion vector precision for video coding'}", 'source_file': './grant/2021/ipg210413.xml', 'source_data': 'USPTO-Grant'}