| @@ -2377,7 +2377,7 @@ int ff_mjpeg_decode_frame_from_buf(AVCodecContext *avctx, AVFrame *frame, · 2376 unmodified lines |
| 2377 | int hshift, vshift; | 2377 | int hshift, vshift; |
| 2378 | int unescaped_buf_size; | 2378 | int unescaped_buf_size; |
| 2379 | int start_code; | 2379 | int start_code; |
| 2380 | int i, index; | 2380 | int index; |
| 2381 | int ret = 0; | 2381 | int ret = 0; |
| 2382 | int is16bit; | 2382 | int is16bit; |
| 2383 | AVDictionaryEntry *e = NULL; | 2383 | AVDictionaryEntry *e = NULL; |
| @@ -2657,7 +2657,7 @@ the_end: · 273 unmodified lines |
| 2657 | if (s->upscale_v[p] == 1) | 2657 | if (s->upscale_v[p] == 1) |
| 2658 | h = (h+1)>>1; | 2658 | h = (h+1)>>1; |
| 2659 | av_assert0(w > 0); | 2659 | av_assert0(w > 0); |
| 2660 | for (i = 0; i < h; i++) { | 2660 | for (int i = 0; i < h; i++) { |
| 2661 | if (s->upscale_h[p] == 1) { | 2661 | if (s->upscale_h[p] == 1) { |
| 2662 | if (is16bit) ((uint16_t*)line)[w - 1] = ((uint16_t*)line)[(w - 1) / 2]; | 2662 | if (is16bit) ((uint16_t*)line)[w - 1] = ((uint16_t*)line)[(w - 1) / 2]; |
| 2663 | else line[w - 1] = line[(w - 1) / 2]; | 2663 | else line[w - 1] = line[(w - 1) / 2]; |
| @@ -2735,7 +2735,7 @@ the_end: · 71 unmodified lines |
| 2735 | h = AV_CEIL_RSHIFT(h, vshift); | 2735 | h = AV_CEIL_RSHIFT(h, vshift); |
| 2736 | } | 2736 | } |
| 2737 | dst = &((uint8_t *)s->picture_ptr->data[p])[(h - 1) * s->linesize[p]]; | 2737 | dst = &((uint8_t *)s->picture_ptr->data[p])[(h - 1) * s->linesize[p]]; |
| 2738 | for (i = h - 1; i; i--) { | 2738 | for (int i = h - 1; i; i--) { |
| 2739 | uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[p])[i * s->upscale_v[p] / (s->upscale_v[p] + 1) * s->linesize[p]]; | 2739 | uint8_t *src1 = &((uint8_t *)s->picture_ptr->data[p])[i * s->upscale_v[p] / (s->upscale_v[p] + 1) * s->linesize[p]]; |
| 2740 | uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[p])[(i + 1) * s->upscale_v[p] / (s->upscale_v[p] + 1) * s->linesize[p]]; | 2740 | uint8_t *src2 = &((uint8_t *)s->picture_ptr->data[p])[(i + 1) * s->upscale_v[p] / (s->upscale_v[p] + 1) * s->linesize[p]]; |
| 2741 | if (s->upscale_v[p] != 2 && (src1 == src2 || i == h - 1)) { | 2741 | if (s->upscale_v[p] != 2 && (src1 == src2 || i == h - 1)) { |
| @@ -2777,7 +2777,7 @@ the_end: · 35 unmodified lines |
| 2777 | int w = s->picture_ptr->width; | 2777 | int w = s->picture_ptr->width; |
| 2778 | int h = s->picture_ptr->height; | 2778 | int h = s->picture_ptr->height; |
| 2779 | av_assert0(s->nb_components == 4); | 2779 | av_assert0(s->nb_components == 4); |
| 2780 | for (i=0; i<h; i++) { | 2780 | for (int i = 0; i < h; i++) { |
| 2781 | int j; | 2781 | int j; |
| 2782 | uint8_t *dst[4]; | 2782 | uint8_t *dst[4]; |
| 2783 | for (index=0; index<4; index++) { | 2783 | for (index=0; index<4; index++) { |
| @@ -2800,7 +2800,7 @@ the_end: · 16 unmodified lines |
| 2800 | int w = s->picture_ptr->width; | 2800 | int w = s->picture_ptr->width; |
| 2801 | int h = s->picture_ptr->height; | 2801 | int h = s->picture_ptr->height; |
| 2802 | av_assert0(s->nb_components == 4); | 2802 | av_assert0(s->nb_components == 4); |
| 2803 | for (i=0; i<h; i++) { | 2803 | for (int i = 0; i < h; i++) { |
| 2804 | int j; | 2804 | int j; |
| 2805 | uint8_t *dst[4]; | 2805 | uint8_t *dst[4]; |
| 2806 | for (index=0; index<4; index++) { | 2806 | for (index=0; index<4; index++) { |
| @@ -2833,10 +2833,9 @@ the_end: · 26 unmodified lines |
| 2833 | AVFrameSideData *sd; | 2833 | AVFrameSideData *sd; |
| 2834 | size_t offset = 0; | 2834 | size_t offset = 0; |
| 2835 | int total_size = 0; | 2835 | int total_size = 0; |
| 2836 | int i; | | |
| 2837 | | 2836 | |
| 2838 | /* Sum size of all parts. */ | 2837 | /* Sum size of all parts. */ |
| 2839 | for (i = 0; i < s->iccnum; i++) | 2838 | for (int i = 0; i < s->iccnum; i++) |
| 2840 | total_size += s->iccentries[i].length; | 2839 | total_size += s->iccentries[i].length; |
| 2841 | | 2840 | |
| 2842 | ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_ICC_PROFILE, total_size, &sd); | 2841 | ret = ff_frame_new_side_data(avctx, frame, AV_FRAME_DATA_ICC_PROFILE, total_size, &sd); |
| @@ -2847,7 +2846,7 @@ the_end: · 4 unmodified lines |
| 2847 | | 2846 | |
| 2848 | if (sd) { | 2847 | if (sd) { |
| 2849 | /* Reassemble the parts, which are now in-order. */ | 2848 | /* Reassemble the parts, which are now in-order. */ |
| 2850 | for (i = 0; i < s->iccnum; i++) { | 2849 | for (int i = 0; i < s->iccnum; i++) { |
| 2851 | memcpy(sd->data + offset, s->iccentries[i].data, s->iccentries[i].length); | 2850 | memcpy(sd->data + offset, s->iccentries[i].data, s->iccentries[i].length); |
| 2852 | offset += s->iccentries[i].length; | 2851 | offset += s->iccentries[i].length; |
| 2853 | } | 2852 | } |