You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
mpeg12enc: factor out check in encode_dc
Makes coverity less confused and the code more readable. CC: libav-stable@libav.org Bug-Id: CID 751744
This commit is contained in:
@@ -546,7 +546,8 @@ static void mpeg1_encode_motion(MpegEncContext *s, int val, int f_or_b_code)
|
|||||||
|
|
||||||
static inline void encode_dc(MpegEncContext *s, int diff, int component)
|
static inline void encode_dc(MpegEncContext *s, int diff, int component)
|
||||||
{
|
{
|
||||||
if (((unsigned) (diff + 255)) >= 511) {
|
unsigned int diff_u = diff + 255;
|
||||||
|
if (diff_u >= 511) {
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
if (diff < 0) {
|
if (diff < 0) {
|
||||||
|
Reference in New Issue
Block a user