Skip to content

Commit ead669c

Browse files
committed
to_lavc_vid_conv: remove some warn in 2 last conv
+ IWYU file
1 parent 3b26640 commit ead669c

File tree

1 file changed

+21
-14
lines changed

1 file changed

+21
-14
lines changed

src/libavcodec/to_lavc_vid_conv.c

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@
4646
#define __STDC_WANT_LIB_EXT1__ 1 // qsort_s
4747

4848
#include <assert.h>
49+
#include <libavutil/frame.h> // for AVFrame, av_frame_alloc
50+
#include <libavutil/pixdesc.h> // for av_get_pix_fmt_name
51+
#include <limits.h> // for CHAR_BIT
4952
#include <stdbool.h>
53+
#include <stddef.h> // for NULL, ptrdiff_t, size_t
5054
#include <stdint.h>
55+
#include <stdlib.h> // for free, calloc, abort
56+
#include <string.h> // for memcpy
5157

5258
#include "color_space.h"
5359
#include "compat/net.h" // for htonl
@@ -56,10 +62,14 @@
5662
#include "host.h"
5763
#include "libavcodec/to_lavc_vid_conv.h"
5864
#include "libavcodec/to_lavc_vid_conv_cuda.h"
65+
#include "libavcodec/utils.h" // for uv_to_av_pixfmt, get_u...
66+
#include "pixfmt_conv.h" // for get_decoder_from_to
67+
#include "tv.h" // for get_time_in_ns, time_ns_t
5968
#include "utils/macros.h" // OPTIMIZED_FOR
6069
#include "utils/parallel_conv.h"
6170
#include "utils/worker.h"
62-
#include "video.h"
71+
#include "video_codec.h" // for vc_get_linesize, get_p...
72+
#include "video_frame.h" // for buf_get_planes
6373

6474
#ifdef __SSE3__
6575
#include "pmmintrin.h"
@@ -788,14 +798,12 @@ r12l_to_p210le(AVFrame *__restrict out_frame,
788798
}
789799

790800
const int src_linesize = vc_get_linesize(width, R12L);
791-
for (int y = 0; y < height; ++y) {
792-
const unsigned char *src = in_data + y * src_linesize;
793-
uint16_t *dst_y =
794-
(uint16_t *) (void *) (out_frame->data[0] +
795-
out_frame->linesize[0] * y);
796-
uint16_t *dst_cbcr =
797-
(uint16_t *) (void *) (out_frame->data[1] +
798-
out_frame->linesize[1] * y);
801+
for (size_t y = 0; y < (size_t) height; ++y) {
802+
const unsigned char *src = in_data + (y * src_linesize);
803+
uint16_t *dst_y = (void *) (out_frame->data[0] +
804+
(out_frame->linesize[0] * y));
805+
uint16_t *dst_cbcr = (void *) (out_frame->data[1] +
806+
(out_frame->linesize[1] * y));
799807

800808
OPTIMIZED_FOR(int x = 0; x < width; x += 8)
801809
{
@@ -906,11 +914,10 @@ r12l_to_ayuv64le(AVFrame *__restrict out_frame,
906914
*dst++ = CLAMP_LIMITED_CBCR(res_cr, depth);
907915

908916
const int src_linesize = vc_get_linesize(width, R12L);
909-
for (int y = 0; y < height; ++y) {
910-
const unsigned char *src = in_data + y * src_linesize;
911-
uint16_t *dst =
912-
(uint16_t *) (void *) (out_frame->data[0] +
913-
out_frame->linesize[0] * y);
917+
for (size_t y = 0; y < (size_t) height; ++y) {
918+
const unsigned char *src = in_data + (y * src_linesize);
919+
uint16_t *dst = (void *) (out_frame->data[0] +
920+
(out_frame->linesize[0] * y));
914921

915922
OPTIMIZED_FOR(int x = 0; x < width; x += 8)
916923
{

0 commit comments

Comments
 (0)