{"record":{"id":"e7f599a3642fd0f1","repo":"DrKLO/Telegram","slug":"3-path-to-yuv-input-file-n","errorCode":null,"errorMessage":"3. Path to YUV input file\\n","messagePattern":"3\\. Path to YUV input file\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"TMessagesProj/jni/mozjpeg/yuvjpeg.c","lineNumber":120,"sourceCode":"  const char *jpg_path;\n  FILE *yuv_fd;\n  size_t yuv_size;\n  unsigned char *yuv_buffer;\n  JSAMPLE *jpg_buffer;\n  struct jpeg_compress_struct cinfo;\n  struct jpeg_error_mgr jerr;\n  FILE *jpg_fd;\n  JSAMPROW yrow_pointer[16];\n  JSAMPROW cbrow_pointer[8];\n  JSAMPROW crrow_pointer[8];\n  JSAMPROW *plane_pointer[3];\n  int y;\n\n  if (argc != 5) {\n    fprintf(stderr, \"Required arguments:\\n\");\n    fprintf(stderr, \"1. JPEG quality value, 0-100\\n\");\n    fprintf(stderr, \"2. Image size (e.g. '512x512')\\n\");\n    fprintf(stderr, \"3. Path to YUV input file\\n\");\n    fprintf(stderr, \"4. Path to JPG output file\\n\");\n    return 1;\n  }\n\n  errno = 0;\n\n  quality = strtol(argv[1], NULL, 10);\n  if (errno != 0 || quality < 0 || quality > 100) {\n    fprintf(stderr, \"Invalid JPEG quality value!\\n\");\n    return 1;\n  }\n\n  matches = sscanf(argv[2], \"%dx%d\", &luma_width, &luma_height);\n  if (matches != 2) {\n    fprintf(stderr, \"Invalid image size input!\\n\");\n    return 1;\n  }\n  if (luma_width <= 0 || luma_height <= 0) {","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/DrKLO/Telegram/blob/45ab8f4308496e1f01026a97fcdb0d58a5274474/TMessagesProj/jni/mozjpeg/yuvjpeg.c#L102-L138","documentation":"Third descriptive line of yuvjpeg's usage block: `3. Path to YUV input file`. Documents argument #3, the raw 4:2:0 YUV input path. Printed only on the argc != 5 error path.","triggerScenarios":"Same trigger as 191: yuvjpeg invoked with argc != 5.","commonSituations":"Confusing input vs output argument slots; this line makes clear argument 3 is the YUV input and argument 4 is the JPEG output.","solutions":["Pass the YUV input path as argument 3 and the JPEG output path as argument 4.","Confirm the YUV file exists and is readable.","Provide exactly four arguments in the documented order."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"#include <unistd.h>\n/* argument 3 must be a readable YUV file */\nif (access(yuv_in, R_OK) != 0) { /* report and do not invoke */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm the YUV input path exists and is readable.","Keep argument order: quality, size, YUV in, JPG out.","Quote paths containing spaces."],"tags":["cli","jpeg","mozjpeg","yuvjpeg","usage","documentation"],"backgroundTag":null,"analyzedSha":"45ab8f4308496e1f01026a97fcdb0d58a5274474","analyzedAt":"2026-08-14T05:19:30.815Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}